Class EnumerationValue
- 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.enumeration.EnumerationValue
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
@Deprecated public class EnumerationValue extends LocalizableItem
Deprecated.since ages - please use {see de.hybris.platform.core.model.enumeration.EnumerationValueModel} instead.This class represents a value of an enumeration- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
EnumerationValue.EnumerationValueImpl
Deprecated.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 Modifier and Type Field Description static java.lang.String
CODE
Deprecated.static java.lang.String
DEPRECATED
Deprecated.static java.lang.String
EXTENSION_NAME
Deprecated.static java.lang.String
NAME
Deprecated.static java.lang.String
SEQUENCENUMBER
Deprecated.-
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 EnumerationValue()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compareTo(java.lang.Object o)
Deprecated.Implements item comparison by PK.protected Item
createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)
Deprecated.Has to be implemented for each concrete subtype of item.void
exportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout)
Deprecated.java.util.Map
getAllNames(SessionContext ctx)
Deprecated.Gets all names (in all languages)java.lang.String
getCode()
Deprecated.java.lang.String
getCodeLowerCase()
Deprecated.In Jalo this getter is simply returninggetCode()
as lower case value.java.lang.String
getExtensionName()
Deprecated.java.lang.String
getExtensionName(SessionContext ctx)
Deprecated.java.lang.String
getName()
Deprecated.The localized name of this enumeration value.java.lang.String
getName(SessionContext ctx)
Deprecated.The localized name of this enum value.protected Item.ItemAttributeMap
getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)
Deprecated.Defines all attributes which should be set after item creation.int
getSequenceNumber()
Deprecated.java.lang.String
getXMLDefinition()
Deprecated.boolean
isDeprecated()
Deprecated.Tells whether this enum value was marked as deprecated by the last re-initialization.void
setAllNames(SessionContext ctx, java.util.Map names)
Deprecated.Sets names (in all languages)void
setCode(java.lang.String newCode)
Deprecated.void
setCodeLowerCase(java.lang.String codeLowerCase)
Deprecated.In Jalo this setter is a no-op.void
setExtensionName(SessionContext ctx, java.lang.String name)
Deprecated.void
setExtensionName(java.lang.String name)
Deprecated.void
setName(SessionContext ctx, java.lang.String name)
Deprecated.Sets the localized name for this enum value for language specified in ctx.void
setName(java.lang.String name)
Deprecated.Sets the localized name for this enum value for current session language.void
setSequenceNumber(int i)
Deprecated.java.lang.String
toString()
Deprecated.Returns theString
representation of this item.-
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, 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, 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, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
Deprecated.- See Also:
- Constant Field Values
-
CODE
public static final java.lang.String CODE
Deprecated.- See Also:
- Constant Field Values
-
SEQUENCENUMBER
public static final java.lang.String SEQUENCENUMBER
Deprecated.- See Also:
- Constant Field Values
-
DEPRECATED
public static final java.lang.String DEPRECATED
Deprecated.- See Also:
- Constant Field Values
-
EXTENSION_NAME
public static final java.lang.String EXTENSION_NAME
Deprecated.- See Also:
- Constant Field Values
-
-
Method Detail
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Deprecated.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
-
getNonInitialAttributes
protected Item.ItemAttributeMap getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)
Deprecated.Description copied from class:Item
Defines all attributes which should be set after item creation. this is done be removing all attributes which are already set byItem.createItem(SessionContext, ComposedType, ItemAttributeMap)
.use it like this:
protected ItemAttributeMap getNonInitialAttributes( SessionContext ctx, ItemAttributeMap allAttributes ) { // let all superclasses remove their intial attributes too final ItemAttributeMap attributes = super.getNonInitialAttributes( ctx, allAttributes ); // remove own initial attributes here attributes.remove( MyItem.MY_INITIAL_ATTR ); return ret; }
it is vital to optain the map via super.getNonInitialAttributes and pass it on as such since this ensures that attribute qualifiers are treated case insensitive!- Overrides:
getNonInitialAttributes
in classItem
- Parameters:
ctx
- session context with language = NULLallAttributes
- aItemAttributeMap
contaning attribute values.- Returns:
- a
ItemAttributeMap
containing all attribute values, which belong to non-initial attributes.
-
toString
public java.lang.String toString()
Deprecated.Description copied from class:Item
Returns theString
representation of this item. This is by default the representation of the primary key of this item.
-
isDeprecated
public boolean isDeprecated()
Deprecated.Tells whether this enum value was marked as deprecated by the last re-initialization. This means that this element was created by previous re-initializations and exists as long as the system is initialized completely.
-
getSequenceNumber
public int getSequenceNumber()
Deprecated.
-
setSequenceNumber
public void setSequenceNumber(int i)
Deprecated.
-
getCode
public java.lang.String getCode()
Deprecated.
-
setCode
public void setCode(java.lang.String newCode) throws ConsistencyCheckException
Deprecated.- Throws:
ConsistencyCheckException
-
getCodeLowerCase
public java.lang.String getCodeLowerCase()
Deprecated.In Jalo this getter is simply returninggetCode()
as lower case value. The attribute 'codeLowerCase' is exposed for Service Layer Direct only.
-
setCodeLowerCase
public void setCodeLowerCase(java.lang.String codeLowerCase)
Deprecated.In Jalo this setter is a no-op. The attribute 'codeLowerCase' is exposed for Service Layer Direct only.
-
getName
public java.lang.String getName()
Deprecated.The localized name of this enumeration value.- Returns:
- the localized name of this enumeration value in the current session language
-
getName
public java.lang.String getName(SessionContext ctx)
Deprecated.The localized name of this enum value.- Parameters:
ctx
- specifies the language to use- Returns:
- the localized name of this enumeration value in the language specified in ctx
-
setName
public void setName(java.lang.String name)
Deprecated.Sets the localized name for this enum value for current session language.- Parameters:
name
- the new name
-
setName
public void setName(SessionContext ctx, java.lang.String name)
Deprecated.Sets the localized name for this enum value for language specified in ctx.- Parameters:
ctx
- specifies the language to usename
- the new name
-
getAllNames
public java.util.Map getAllNames(SessionContext ctx)
Deprecated.Gets all names (in all languages)- Parameters:
ctx
- the SessionContext object to use- Returns:
- map with following combination key:language, value:name
-
setAllNames
public void setAllNames(SessionContext ctx, java.util.Map names)
Deprecated.Sets names (in all languages)- Parameters:
ctx
- the SessionContext object to usenames
- map with following combination key:language, value:name
-
getXMLDefinition
public java.lang.String getXMLDefinition()
Deprecated.
-
exportXMLDefinition
public void exportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout)
Deprecated.
-
getExtensionName
public java.lang.String getExtensionName()
Deprecated.
-
getExtensionName
public java.lang.String getExtensionName(SessionContext ctx)
Deprecated.
-
setExtensionName
public void setExtensionName(java.lang.String name)
Deprecated.
-
setExtensionName
public void setExtensionName(SessionContext ctx, java.lang.String name)
Deprecated.
-
compareTo
public int compareTo(java.lang.Object o)
Deprecated.Description copied from class:Item
Implements item comparison by PK. Subclasses may override this.- Specified by:
compareTo
in interfacejava.lang.Comparable
- Overrides:
compareTo
in classItem
- Parameters:
o
- which will be compared to this item.- Returns:
- the value 0 if the argument item pk is equal to this item pk; a value less than 0 if this item pk is lexicographically less than the argument item pk; and a value greater than 0 if this item pk is lexicographically greater than the argument item pk.
-
-