Class JaloOnlyItemHelper
java.lang.Object
de.hybris.platform.servicelayer.internal.jalo.order.JaloOnlyItemHelper
- All Implemented Interfaces:
JaloOnlyItem,Serializable
Default implementation of the
JaloOnlyItem interface.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJaloOnlyItemHelper(PK pk, Item item, ComposedType type, Date creationTime, Date modifiedTime) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCollectionProperty(SessionContext ctx, String qualifier, Object element, Class<? extends Collection> collectionClass) voidaddToCollectionProperty(SessionContext ctx, String qualifier, Collection elements, Class<? extends Collection> collectionClass) doGetAttribute(SessionContext ctx, String attrQualifier) Implements in-memory attributes backed by aMap.voiddoSetAttribute(SessionContext ctx, String attrQualifier, Object value) Implements in-memory attributes backed by aMap.<T> TgetProperty(SessionContext ctx, String qualifier) <T> TgetProperty(SessionContext ctx, String qualifier, T defaultValue) booleangetPropertyBoolean(SessionContext ctx, String qualifier, boolean defaultValue) <T extends Collection>
TgetPropertyCollection(SessionContext ctx, String qualifier, T defaultValue) doublegetPropertyDouble(SessionContext ctx, String qualifier, double defaultValue) intgetPropertyInt(SessionContext ctx, String qualifier, int defaultValue) longgetPropertyLong(SessionContext ctx, String qualifier, long defaultValue) voidvoidmarkModified(Date date) final ComposedTypeShould provide the composed type of this item.final DateShould provide a fixed creation time for this item.final DateShould provide a modification time for this item.final PKShould provide a fixed PK for this item.voidremoveCollectionProperty(SessionContext ctx, String qualifier) voidremoveFromCollectionProperty(SessionContext ctx, String qualifier, Object element) voidremoveFromCollectionProperty(SessionContext ctx, String qualifier, Collection elements) voidCalled when a jalo only item is removed.voidsetCreationTime(Date date) <T> voidsetProperty(SessionContext ctx, String qualifier, T newValue) voidsetPropertyCollection(SessionContext ctx, String qualifier, Collection newValue, Class<? extends Collection> collectionClass)
-
Constructor Details
-
JaloOnlyItemHelper
public JaloOnlyItemHelper(PK pk, Item item, ComposedType type, Date creationTime, Date modifiedTime)
-
-
Method Details
-
provideComposedType
Description copied from interface:JaloOnlyItemShould provide the composed type of this item.- Specified by:
provideComposedTypein interfaceJaloOnlyItem- Returns:
- ComposedType of this item
-
provideCreationTime
Description copied from interface:JaloOnlyItemShould provide a fixed creation time for this item.- Specified by:
provideCreationTimein interfaceJaloOnlyItem- Returns:
- creation time date of this item
-
setCreationTime
-
provideModificationTime
Description copied from interface:JaloOnlyItemShould provide a modification time for this item.- Specified by:
provideModificationTimein interfaceJaloOnlyItem- Returns:
- modification time date of this item
-
providePK
Description copied from interface:JaloOnlyItemShould provide a fixed PK for this item.- Specified by:
providePKin interfaceJaloOnlyItem- Returns:
- PK of this item
-
removeJaloOnly
Description copied from interface:JaloOnlyItemCalled when a jalo only item is removed. This is the place to do any cleanup if necessary.- Specified by:
removeJaloOnlyin interfaceJaloOnlyItem- Throws:
ConsistencyCheckException- to signal that this item removal failed
-
doGetAttribute
public Object doGetAttribute(SessionContext ctx, String attrQualifier) throws JaloInvalidParameterException, JaloSecurityException Implements in-memory attributes backed by aMap.- Specified by:
doGetAttributein interfaceJaloOnlyItem- Parameters:
ctx- the session contextattrQualifier- the qualifier of the requested attribute- Returns:
- the attribute value
- Throws:
JaloInvalidParameterException- in case no value could be read for this attributeJaloSecurityException
-
doSetAttribute
public void doSetAttribute(SessionContext ctx, String attrQualifier, Object value) throws JaloInvalidParameterException, JaloSecurityException, JaloBusinessException Implements in-memory attributes backed by aMap.- Specified by:
doSetAttributein interfaceJaloOnlyItem- Parameters:
ctx- the session contextattrQualifier- the qualifier of the requested attributevalue- the new attribute value- Throws:
JaloInvalidParameterException- in case the value could not be written for this attributeJaloSecurityException- in case the session user is not allowed to write this attributeJaloBusinessException- in case any other error occured
-
markModified
public void markModified() -
markModified
-
getProperty
-
getProperty
-
setProperty
-
getPropertyCollection
public <T extends Collection> T getPropertyCollection(SessionContext ctx, String qualifier, T defaultValue) -
setPropertyCollection
public void setPropertyCollection(SessionContext ctx, String qualifier, Collection newValue, Class<? extends Collection> collectionClass) -
addToCollectionProperty
public void addToCollectionProperty(SessionContext ctx, String qualifier, Object element, Class<? extends Collection> collectionClass) -
addToCollectionProperty
public void addToCollectionProperty(SessionContext ctx, String qualifier, Collection elements, Class<? extends Collection> collectionClass) -
removeFromCollectionProperty
-
removeFromCollectionProperty
-
removeCollectionProperty
-
getPropertyInt
-
getPropertyLong
-
getPropertyDouble
-
getPropertyBoolean
-