Class JaloOnlyItemHelper
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.jalo.order.JaloOnlyItemHelper
-
- All Implemented Interfaces:
JaloOnlyItem,java.io.Serializable
public class JaloOnlyItemHelper extends java.lang.Object implements JaloOnlyItem, java.io.Serializable
Default implementation of theJaloOnlyIteminterface.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JaloOnlyItemHelper(PK pk, Item item, ComposedType type, java.util.Date creationTime, java.util.Date modifiedTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToCollectionProperty(SessionContext ctx, java.lang.String qualifier, java.lang.Object element, java.lang.Class<? extends java.util.Collection> collectionClass)voidaddToCollectionProperty(SessionContext ctx, java.lang.String qualifier, java.util.Collection elements, java.lang.Class<? extends java.util.Collection> collectionClass)java.lang.ObjectdoGetAttribute(SessionContext ctx, java.lang.String attrQualifier)Implements in-memory attributes backed by aMap.voiddoSetAttribute(SessionContext ctx, java.lang.String attrQualifier, java.lang.Object value)Implements in-memory attributes backed by aMap.<T> TgetProperty(SessionContext ctx, java.lang.String qualifier)<T> TgetProperty(SessionContext ctx, java.lang.String qualifier, T defaultValue)booleangetPropertyBoolean(SessionContext ctx, java.lang.String qualifier, boolean defaultValue)<T extends java.util.Collection>
TgetPropertyCollection(SessionContext ctx, java.lang.String qualifier, T defaultValue)doublegetPropertyDouble(SessionContext ctx, java.lang.String qualifier, double defaultValue)intgetPropertyInt(SessionContext ctx, java.lang.String qualifier, int defaultValue)longgetPropertyLong(SessionContext ctx, java.lang.String qualifier, long defaultValue)voidmarkModified()voidmarkModified(java.util.Date date)ComposedTypeprovideComposedType()Should provide the composed type of this item.java.util.DateprovideCreationTime()Should provide a fixed creation time for this item.java.util.DateprovideModificationTime()Should provide a modification time for this item.PKprovidePK()Should provide a fixed PK for this item.voidremoveCollectionProperty(SessionContext ctx, java.lang.String qualifier)voidremoveFromCollectionProperty(SessionContext ctx, java.lang.String qualifier, java.lang.Object element)voidremoveFromCollectionProperty(SessionContext ctx, java.lang.String qualifier, java.util.Collection elements)voidremoveJaloOnly()Called when a jalo only item is removed.voidsetCreationTime(java.util.Date date)<T> voidsetProperty(SessionContext ctx, java.lang.String qualifier, T newValue)voidsetPropertyCollection(SessionContext ctx, java.lang.String qualifier, java.util.Collection newValue, java.lang.Class<? extends java.util.Collection> collectionClass)
-
-
-
Constructor Detail
-
JaloOnlyItemHelper
public JaloOnlyItemHelper(PK pk, Item item, ComposedType type, java.util.Date creationTime, java.util.Date modifiedTime)
-
-
Method Detail
-
provideComposedType
public final ComposedType provideComposedType()
Description copied from interface:JaloOnlyItemShould provide the composed type of this item.- Specified by:
provideComposedTypein interfaceJaloOnlyItem- Returns:
- ComposedType of this item
-
provideCreationTime
public final java.util.Date 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
public void setCreationTime(java.util.Date date)
-
provideModificationTime
public final java.util.Date 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
public final PK providePK()
Description copied from interface:JaloOnlyItemShould provide a fixed PK for this item.- Specified by:
providePKin interfaceJaloOnlyItem- Returns:
- PK of this item
-
removeJaloOnly
public void removeJaloOnly() throws ConsistencyCheckExceptionDescription 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 java.lang.Object doGetAttribute(SessionContext ctx, java.lang.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, java.lang.String attrQualifier, java.lang.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
public void markModified(java.util.Date date)
-
getProperty
public <T> T getProperty(SessionContext ctx, java.lang.String qualifier)
-
getProperty
public <T> T getProperty(SessionContext ctx, java.lang.String qualifier, T defaultValue)
-
setProperty
public <T> void setProperty(SessionContext ctx, java.lang.String qualifier, T newValue)
-
getPropertyCollection
public <T extends java.util.Collection> T getPropertyCollection(SessionContext ctx, java.lang.String qualifier, T defaultValue)
-
setPropertyCollection
public void setPropertyCollection(SessionContext ctx, java.lang.String qualifier, java.util.Collection newValue, java.lang.Class<? extends java.util.Collection> collectionClass)
-
addToCollectionProperty
public void addToCollectionProperty(SessionContext ctx, java.lang.String qualifier, java.lang.Object element, java.lang.Class<? extends java.util.Collection> collectionClass)
-
addToCollectionProperty
public void addToCollectionProperty(SessionContext ctx, java.lang.String qualifier, java.util.Collection elements, java.lang.Class<? extends java.util.Collection> collectionClass)
-
removeFromCollectionProperty
public void removeFromCollectionProperty(SessionContext ctx, java.lang.String qualifier, java.lang.Object element)
-
removeFromCollectionProperty
public void removeFromCollectionProperty(SessionContext ctx, java.lang.String qualifier, java.util.Collection elements)
-
removeCollectionProperty
public void removeCollectionProperty(SessionContext ctx, java.lang.String qualifier)
-
getPropertyInt
public int getPropertyInt(SessionContext ctx, java.lang.String qualifier, int defaultValue)
-
getPropertyLong
public long getPropertyLong(SessionContext ctx, java.lang.String qualifier, long defaultValue)
-
getPropertyDouble
public double getPropertyDouble(SessionContext ctx, java.lang.String qualifier, double defaultValue)
-
getPropertyBoolean
public boolean getPropertyBoolean(SessionContext ctx, java.lang.String qualifier, boolean defaultValue)
-
-