Class 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
    • Constructor Detail

      • EnumerationValue

        public EnumerationValue()
        Deprecated.
    • 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. ) during ComposedType.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 class Item
        Parameters:
        ctx - the current session context which this item is created within
        type - 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 by Item.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 class Item
        Parameters:
        ctx - session context with language = NULL
        allAttributes - a ItemAttributeMap 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 the String representation of this item. This is by default the representation of the primary key of this item.
        Overrides:
        toString in class Item
        Returns:
        the String representation 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.
      • getCodeLowerCase

        public java.lang.String getCodeLowerCase()
        Deprecated.
        In Jalo this getter is simply returning getCode() 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 use
        name - 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 use
        names - 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 interface java.lang.Comparable
        Overrides:
        compareTo in class Item
        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.