Package de.hybris.platform.jalo.test
Class TestItem
- java.lang.Object
-
- de.hybris.platform.util.BridgeAbstraction
-
- de.hybris.platform.jalo.Item
-
- de.hybris.platform.jalo.ExtensibleItem
-
- de.hybris.platform.jalo.c2l.LocalizableItem
-
- de.hybris.platform.jalo.test.TestItem
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable
- Direct Known Subclasses:
GeneratedTestIntegrationItem,GeneratedTestIntegrationItemDetail,GeneratedTestItem3
public class TestItem extends LocalizableItem
This class represents an item, which will be used by theHJMPTestand some other test classes.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTestItem.TestItemImplinterface to persistence layer-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLED
-
Fields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPE
-
Fields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant
-
-
Constructor Summary
Constructors Constructor Description TestItem()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)Has to be implemented for each concrete subtype of item.java.lang.StringgetA()java.lang.StringgetA(SessionContext ctx)java.lang.StringgetB()java.lang.StringgetB(SessionContext ctx)java.lang.BooleangetBoolean()java.lang.BooleangetBoolean(SessionContext ctx)java.lang.BytegetByte()java.lang.BytegetByte(SessionContext ctx)java.lang.CharactergetCharacter()java.lang.CharactergetCharacter(SessionContext ctx)java.util.DategetDate()java.util.DategetDate(SessionContext ctx)java.lang.DoublegetDouble()java.lang.DoublegetDouble(SessionContext ctx)java.lang.FloatgetFloat()java.lang.FloatgetFloat(SessionContext ctx)java.lang.IntegergetInteger()java.lang.IntegergetInteger(SessionContext ctx)java.lang.LonggetLong()java.lang.LonggetLong(SessionContext ctx)java.lang.StringgetLongString(SessionContext ctx)booleangetPrimitiveBoolean()booleangetPrimitiveBoolean(SessionContext ctx)bytegetPrimitiveByte()bytegetPrimitiveByte(SessionContext ctx)chargetPrimitiveChar()chargetPrimitiveChar(SessionContext ctx)doublegetPrimitiveDouble()doublegetPrimitiveDouble(SessionContext ctx)floatgetPrimitiveFloat()floatgetPrimitiveFloat(SessionContext ctx)intgetPrimitiveInteger()intgetPrimitiveInteger(SessionContext ctx)longgetPrimitiveLong()longgetPrimitiveLong(SessionContext ctx)shortgetPrimitiveShort()shortgetPrimitiveShort(SessionContext ctx)java.io.SerializablegetSerializable()java.io.SerializablegetSerializable(SessionContext ctx)java.lang.StringgetString()java.lang.StringgetString(SessionContext ctx)voidsetA(SessionContext ctx, java.lang.String a)voidsetA(java.lang.String a)voidsetB(SessionContext ctx, java.lang.String b)voidsetB(java.lang.String b)voidsetBoolean(SessionContext ctx, java.lang.Boolean b)voidsetBoolean(java.lang.Boolean b)voidsetByte(SessionContext ctx, java.lang.Byte b)voidsetByte(java.lang.Byte b)voidsetCharacter(SessionContext ctx, java.lang.Character c)voidsetCharacter(java.lang.Character c)voidsetDate(SessionContext ctx, java.util.Date d)voidsetDate(java.util.Date d)voidsetDouble(SessionContext ctx, java.lang.Double d)voidsetDouble(java.lang.Double d)voidsetFloat(SessionContext ctx, java.lang.Float f)voidsetFloat(java.lang.Float f)voidsetInteger(SessionContext ctx, java.lang.Integer i)voidsetInteger(java.lang.Integer i)voidsetLong(SessionContext ctx, java.lang.Long l)voidsetLong(java.lang.Long l)voidsetLongString(SessionContext ctx, java.lang.String s)voidsetPrimitiveBoolean(boolean b)voidsetPrimitiveBoolean(SessionContext ctx, boolean b)voidsetPrimitiveByte(byte b)voidsetPrimitiveByte(SessionContext ctx, byte b)voidsetPrimitiveChar(char c)voidsetPrimitiveChar(SessionContext ctx, char c)voidsetPrimitiveDouble(double d)voidsetPrimitiveDouble(SessionContext ctx, double d)voidsetPrimitiveFloat(float f)voidsetPrimitiveFloat(SessionContext ctx, float f)voidsetPrimitiveInteger(int i)voidsetPrimitiveInteger(SessionContext ctx, int i)voidsetPrimitiveLong(long l)voidsetPrimitiveLong(SessionContext ctx, long l)voidsetPrimitiveShort(short s)voidsetPrimitiveShort(SessionContext ctx, short s)voidsetSerializable(SessionContext ctx, java.io.Serializable s)voidsetSerializable(java.io.Serializable s)voidsetString(SessionContext ctx, java.lang.String s)voidsetString(java.lang.String s)-
Methods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedProperty
-
Methods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getImplementation, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setProperty
-
Methods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getDefaultAttributeModes, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getNonInitialAttributes, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRelatedItems, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isMarkModifiedDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setRelatedItems, setTransientObject, setUseTA, toString, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Method Detail
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Description copied from class:ItemHas to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) duringComposedType.newInstance(Map).In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap)too.
Sn example:public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) ); // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes( SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret = super.getNonInitialAttributes( ctx, allAttributes ); // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }- Specified by:
createItemin classItem- Parameters:
ctx- the current session context which this item is created withintype- the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )- Returns:
- the new item instance
- Throws:
JaloBusinessException- indicates an error during creation - any changes will be rollbacked
-
getA
public java.lang.String getA()
-
getA
public java.lang.String getA(SessionContext ctx)
-
setA
public void setA(java.lang.String a)
-
setA
public void setA(SessionContext ctx, java.lang.String a)
-
getB
public java.lang.String getB()
-
getB
public java.lang.String getB(SessionContext ctx)
-
setB
public void setB(java.lang.String b)
-
setB
public void setB(SessionContext ctx, java.lang.String b)
-
getBoolean
public java.lang.Boolean getBoolean(SessionContext ctx)
-
setBoolean
public void setBoolean(SessionContext ctx, java.lang.Boolean b)
-
getByte
public java.lang.Byte getByte(SessionContext ctx)
-
setByte
public void setByte(SessionContext ctx, java.lang.Byte b)
-
getCharacter
public java.lang.Character getCharacter(SessionContext ctx)
-
setCharacter
public void setCharacter(SessionContext ctx, java.lang.Character c)
-
getDate
public java.util.Date getDate(SessionContext ctx)
-
setDate
public void setDate(SessionContext ctx, java.util.Date d)
-
getDouble
public java.lang.Double getDouble(SessionContext ctx)
-
setDouble
public void setDouble(SessionContext ctx, java.lang.Double d)
-
getFloat
public java.lang.Float getFloat(SessionContext ctx)
-
setFloat
public void setFloat(SessionContext ctx, java.lang.Float f)
-
getInteger
public java.lang.Integer getInteger(SessionContext ctx)
-
setInteger
public void setInteger(SessionContext ctx, java.lang.Integer i)
-
getLong
public java.lang.Long getLong(SessionContext ctx)
-
setLong
public void setLong(SessionContext ctx, java.lang.Long l)
-
getPrimitiveBoolean
public boolean getPrimitiveBoolean(SessionContext ctx)
-
setPrimitiveBoolean
public void setPrimitiveBoolean(SessionContext ctx, boolean b)
-
getPrimitiveByte
public byte getPrimitiveByte(SessionContext ctx)
-
setPrimitiveByte
public void setPrimitiveByte(SessionContext ctx, byte b)
-
getPrimitiveChar
public char getPrimitiveChar(SessionContext ctx)
-
setPrimitiveChar
public void setPrimitiveChar(SessionContext ctx, char c)
-
getPrimitiveDouble
public double getPrimitiveDouble(SessionContext ctx)
-
setPrimitiveDouble
public void setPrimitiveDouble(SessionContext ctx, double d)
-
getPrimitiveFloat
public float getPrimitiveFloat(SessionContext ctx)
-
setPrimitiveFloat
public void setPrimitiveFloat(SessionContext ctx, float f)
-
getPrimitiveInteger
public int getPrimitiveInteger(SessionContext ctx)
-
setPrimitiveInteger
public void setPrimitiveInteger(SessionContext ctx, int i)
-
getPrimitiveLong
public long getPrimitiveLong(SessionContext ctx)
-
setPrimitiveLong
public void setPrimitiveLong(SessionContext ctx, long l)
-
getPrimitiveShort
public short getPrimitiveShort(SessionContext ctx)
-
setPrimitiveShort
public void setPrimitiveShort(SessionContext ctx, short s)
-
getSerializable
public java.io.Serializable getSerializable(SessionContext ctx)
-
setSerializable
public void setSerializable(SessionContext ctx, java.io.Serializable s)
-
getString
public java.lang.String getString(SessionContext ctx)
-
setString
public void setString(SessionContext ctx, java.lang.String s)
-
getLongString
public java.lang.String getLongString(SessionContext ctx)
-
setLongString
public void setLongString(SessionContext ctx, java.lang.String s)
-
getBoolean
public java.lang.Boolean getBoolean()
-
setBoolean
public void setBoolean(java.lang.Boolean b)
-
getByte
public java.lang.Byte getByte()
-
setByte
public void setByte(java.lang.Byte b)
-
getCharacter
public java.lang.Character getCharacter()
-
setCharacter
public void setCharacter(java.lang.Character c)
-
getDate
public java.util.Date getDate()
-
setDate
public void setDate(java.util.Date d)
-
getDouble
public java.lang.Double getDouble()
-
setDouble
public void setDouble(java.lang.Double d)
-
getFloat
public java.lang.Float getFloat()
-
setFloat
public void setFloat(java.lang.Float f)
-
getInteger
public java.lang.Integer getInteger()
-
setInteger
public void setInteger(java.lang.Integer i)
-
getLong
public java.lang.Long getLong()
-
setLong
public void setLong(java.lang.Long l)
-
getPrimitiveBoolean
public boolean getPrimitiveBoolean()
-
setPrimitiveBoolean
public void setPrimitiveBoolean(boolean b)
-
getPrimitiveByte
public byte getPrimitiveByte()
-
setPrimitiveByte
public void setPrimitiveByte(byte b)
-
getPrimitiveChar
public char getPrimitiveChar()
-
setPrimitiveChar
public void setPrimitiveChar(char c)
-
getPrimitiveDouble
public double getPrimitiveDouble()
-
setPrimitiveDouble
public void setPrimitiveDouble(double d)
-
getPrimitiveFloat
public float getPrimitiveFloat()
-
setPrimitiveFloat
public void setPrimitiveFloat(float f)
-
getPrimitiveInteger
public int getPrimitiveInteger()
-
setPrimitiveInteger
public void setPrimitiveInteger(int i)
-
getPrimitiveLong
public long getPrimitiveLong()
-
setPrimitiveLong
public void setPrimitiveLong(long l)
-
getPrimitiveShort
public short getPrimitiveShort()
-
setPrimitiveShort
public void setPrimitiveShort(short s)
-
getSerializable
public java.io.Serializable getSerializable()
-
setSerializable
public void setSerializable(java.io.Serializable s)
-
getString
public java.lang.String getString()
-
setString
public void setString(java.lang.String s)
-
-