Interface ItemModelInternalContext
- All Superinterfaces:
ItemModelContext
- All Known Implementing Classes:
ItemModelContextImpl
Warning: this context represents all methods considered to be internal to the hybris model layer. Therefore they
should be used with care because no guarantees can be given for them staying in the same shape!
-
Method Summary
Modifier and TypeMethodDescriptionGenerate the new PK and assigns it to the current model.<T> TgetDynamicValue(AbstractItemModel model, String attribute) Retrieves the dynamic value of the attribute.<T> TgetLocalizedDynamicValue(AbstractItemModel model, String attribute, Locale loc) Retrieves the dynamic value of the attribute with the local.<T> TgetLocalizedRelationValue(String attribute, Locale loc) Retrieves the current value of the specific attribute with the locale.<T> TgetLocalizedValue(String attribute, Locale loc) Retrieves the current value of the specific attribute with the locale.getNewPK()Returns the newPK assigned to the current model<T> TgetPropertyValue(String attribute) Returns a value of a property with given name.<T> TRetrieves the current value of the specific attribute.inthashCode(AbstractItemModel abstractItemModel) Calculates the hash code of the model.booleanisDynamicAttribute(String attributeName) Returns information whether given attribute is dynamic or notloadOriginalValue(String attribute) Returns the original value for the given attributeloadOriginalValue(String attribute, Locale locale) Returns the original localized value for the given attribute<T> voidsetDynamicValue(AbstractItemModel model, String attribute, T value) Sets the dynamic value of the attribute.<T> voidsetLocalizedDynamicValue(AbstractItemModel model, String attribute, Locale loc, T value) Sets the dynamic value of the attribute under the locale.<T> voidsetLocalizedValue(String attribute, Locale usedLoc, T value) Sets the new value for the specific attribute with the locale.<T> voidsetPropertyValue(String attribute, T value) Allows to set a value of a property with given name.<T> TSets the new value for the specific attribute.voidunloadAttribute(String attribute) Unloads the given attributewriteReplace(Object model) YXXMethods inherited from interface de.hybris.platform.servicelayer.model.ItemModelContext
exists, getDirtyAttributes, getDirtyLocalizedAttributes, getItemType, getOriginalValue, getOriginalValue, getPersistenceVersion, getPK, getSource, getTenantId, isDirty, isDirty, isDirty, isLoaded, isLoaded, isNew, isRemoved, isUpToDate
-
Method Details
-
getValue
Retrieves the current value of the specific attribute.- Returns:
- the current value.
-
setValue
Sets the new value for the specific attribute.- Returns:
- the new value of the attribute.
-
getLocalizedValue
Retrieves the current value of the specific attribute with the locale.- Returns:
- the current value with the locale.
-
getLocalizedRelationValue
Retrieves the current value of the specific attribute with the locale.- Returns:
- the current value with the locale.
-
setLocalizedValue
Sets the new value for the specific attribute with the locale. -
getDynamicValue
Retrieves the dynamic value of the attribute.- Parameters:
model- YTODO- Returns:
- the dynamic value.
-
setDynamicValue
Sets the dynamic value of the attribute.- Parameters:
model- YTODO
-
getLocalizedDynamicValue
Retrieves the dynamic value of the attribute with the local.- Parameters:
model- YTODO- Returns:
- the dynamic value.
-
setLocalizedDynamicValue
Sets the dynamic value of the attribute under the locale.- Parameters:
model- YTODO
-
hashCode
Calculates the hash code of the model.- Returns:
- the hash code value
-
writeReplace
YXX- Throws:
ObjectStreamException
-
getNewPK
PK getNewPK()Returns the newPK assigned to the current model- Returns:
- new PK for the not saved model
-
generateNewPK
PK generateNewPK()Generate the new PK and assigns it to the current model. Will be generated only for new models if the new PK has not been generated yet- Returns:
- new generated PK for the not saved model
-
getPropertyValue
Returns a value of a property with given name.- Parameters:
attribute- name- Returns:
- value of property with given name
-
setPropertyValue
Allows to set a value of a property with given name.- Parameters:
attribute- namevalue- value to set
-
isDynamicAttribute
Returns information whether given attribute is dynamic or not- Parameters:
attributeName- attribute name- Returns:
- true if attribute is dynamic, false otherwise
-
loadOriginalValue
Returns the original value for the given attribute- Parameters:
attribute- attribute name- Returns:
- original value of the given attribute
-
loadOriginalValue
Returns the original localized value for the given attribute- Parameters:
attribute- attribute namelocale- locale name- Returns:
- original value of the given attribute
-
unloadAttribute
Unloads the given attribute- Parameters:
attribute- attribute name
-