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 theHJMPTest
and some other test classes.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TestItem.TestItemImpl
interface 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 Item
createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.java.lang.String
getA()
java.lang.String
getA(SessionContext ctx)
java.lang.String
getB()
java.lang.String
getB(SessionContext ctx)
java.lang.Boolean
getBoolean()
java.lang.Boolean
getBoolean(SessionContext ctx)
java.lang.Byte
getByte()
java.lang.Byte
getByte(SessionContext ctx)
java.lang.Character
getCharacter()
java.lang.Character
getCharacter(SessionContext ctx)
java.util.Date
getDate()
java.util.Date
getDate(SessionContext ctx)
java.lang.Double
getDouble()
java.lang.Double
getDouble(SessionContext ctx)
java.lang.Float
getFloat()
java.lang.Float
getFloat(SessionContext ctx)
java.lang.Integer
getInteger()
java.lang.Integer
getInteger(SessionContext ctx)
java.lang.Long
getLong()
java.lang.Long
getLong(SessionContext ctx)
java.lang.String
getLongString(SessionContext ctx)
boolean
getPrimitiveBoolean()
boolean
getPrimitiveBoolean(SessionContext ctx)
byte
getPrimitiveByte()
byte
getPrimitiveByte(SessionContext ctx)
char
getPrimitiveChar()
char
getPrimitiveChar(SessionContext ctx)
double
getPrimitiveDouble()
double
getPrimitiveDouble(SessionContext ctx)
float
getPrimitiveFloat()
float
getPrimitiveFloat(SessionContext ctx)
int
getPrimitiveInteger()
int
getPrimitiveInteger(SessionContext ctx)
long
getPrimitiveLong()
long
getPrimitiveLong(SessionContext ctx)
short
getPrimitiveShort()
short
getPrimitiveShort(SessionContext ctx)
java.io.Serializable
getSerializable()
java.io.Serializable
getSerializable(SessionContext ctx)
java.lang.String
getString()
java.lang.String
getString(SessionContext ctx)
void
setA(SessionContext ctx, java.lang.String a)
void
setA(java.lang.String a)
void
setB(SessionContext ctx, java.lang.String b)
void
setB(java.lang.String b)
void
setBoolean(SessionContext ctx, java.lang.Boolean b)
void
setBoolean(java.lang.Boolean b)
void
setByte(SessionContext ctx, java.lang.Byte b)
void
setByte(java.lang.Byte b)
void
setCharacter(SessionContext ctx, java.lang.Character c)
void
setCharacter(java.lang.Character c)
void
setDate(SessionContext ctx, java.util.Date d)
void
setDate(java.util.Date d)
void
setDouble(SessionContext ctx, java.lang.Double d)
void
setDouble(java.lang.Double d)
void
setFloat(SessionContext ctx, java.lang.Float f)
void
setFloat(java.lang.Float f)
void
setInteger(SessionContext ctx, java.lang.Integer i)
void
setInteger(java.lang.Integer i)
void
setLong(SessionContext ctx, java.lang.Long l)
void
setLong(java.lang.Long l)
void
setLongString(SessionContext ctx, java.lang.String s)
void
setPrimitiveBoolean(boolean b)
void
setPrimitiveBoolean(SessionContext ctx, boolean b)
void
setPrimitiveByte(byte b)
void
setPrimitiveByte(SessionContext ctx, byte b)
void
setPrimitiveChar(char c)
void
setPrimitiveChar(SessionContext ctx, char c)
void
setPrimitiveDouble(double d)
void
setPrimitiveDouble(SessionContext ctx, double d)
void
setPrimitiveFloat(float f)
void
setPrimitiveFloat(SessionContext ctx, float f)
void
setPrimitiveInteger(int i)
void
setPrimitiveInteger(SessionContext ctx, int i)
void
setPrimitiveLong(long l)
void
setPrimitiveLong(SessionContext ctx, long l)
void
setPrimitiveShort(short s)
void
setPrimitiveShort(SessionContext ctx, short s)
void
setSerializable(SessionContext ctx, java.io.Serializable s)
void
setSerializable(java.io.Serializable s)
void
setString(SessionContext ctx, java.lang.String s)
void
setString(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:Item
Has 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:
createItem
in 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)
-
-