Class EnumerationType
- All Implemented Interfaces:
Serializable,Comparable
Deprecated.
since ages - please use {see de.hybris.platform.core.model.enumeration.EnumerationMetaTypeModel} instead.
A special composed type describing enumeration types.
Enumeration types may have sorted and resortable instances. Mostly enumeration types describe
EnumerationValue item instances but any item type may be value type of a
enumeration type too.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.ComposedType
ComposedType.ComposedTypeImplNested classes/interfaces inherited from class de.hybris.platform.jalo.type.Type
Type.TypeImplNested classes/interfaces inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
TypeManagerManaged.TypeManagerManagedImplNested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImplNested 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
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.For sorted enumerations: the comparation attribute attribute string constant.static final StringDeprecated.The resortable attribute string constant.static final StringDeprecated.The sorted attribute string constant.static final StringDeprecated.The value type attribute string constant.static final StringDeprecated.The enumeration values attribute string constant.Fields inherited from class de.hybris.platform.jalo.type.ComposedType
ABSTRACT, ALLSUBTYPES, ALLSUPERTYPES, ATTRIBUTEDESCRIPTORS, DECLAREDATTRIBUTEDESCRIPTORS, DUMPPROPERTYTABLE, DYNAMIC, INHERITANCEPATH, INHERITEDATTRIBUTEDESCRIPTORS, JALOCLASS, JALOONLY, JNDINAME, SINGLETON, SUBTYPES, SUPERTYPE, TABLEFields inherited from class de.hybris.platform.jalo.type.Type
CODE, DEFAULTVALUE, DESCRIPTION, XMLDEFINITIONFields inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
AUTOCREATE, DEPRECATED, EXTENSION_NAME, GENERATE, NAMEFields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLEDFields 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, TYPEFields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ItemchangeTypeIfNecessary(Item newOne, ComposedType requestedType) Deprecated.Redefined to skip type changing since all enumtypes have to have the EnumerationMetaType as type.protected voidcheckValues(List values) Deprecated.Helper forsetValues(List): checks if every item of the value list is instance of this type.protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) Deprecated.The generic creation method for enumeration types.exportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout, String forExtension) Deprecated.Deprecated.Returns the comparation attribute to sort values by ingetValues().protected Item.ItemAttributeMapgetNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes) Deprecated.CutsType.CODEandVALUE_TYPEfrom attributes since these values have been set during creation.Deprecated.Returns all enum values.protected List<EnumerationValue>getValues(boolean ordered) Deprecated.Deprecated.The item type of this enum type's values.Deprecated.Assembles the XML definition text to put insideitems.xml.booleanDeprecated.Returns true if this type holds instances ofEnumerationValue, false for any other kind of item.booleanDeprecated.Tells if this enum type is able to change the order of its values (seesortValues(List)).booleanisSorted()Deprecated.Returns true if the values of this enum type are sorted.parseValue(SessionContext ctx, String value) Deprecated.ReadsEnumerationValueinstances fromCode of type '.' Code of enumstrings.voidDeprecated.Changes the ordering attribute of this enumeration type.voidsetExtensionName(String extName) Deprecated.Changes the name of the extension which this type system item belongs to.protected voidDeprecated.For generic access to value list.voidsortValues(List values) Deprecated.Changes the order of this enum type's values.toString(SessionContext ctx, Object value) Deprecated.ConvertsEnumerationValueinstances intoCode of type '.' Code of enum.Methods inherited from class de.hybris.platform.jalo.type.ComposedType
_sortAttributesByQualifier, checkItemPermission, checkTypePermission, checkTypePermission, createAttributeDescriptor, createAttributeDescriptor, createJaloOnlyInstance, exportXMLDefinition, getAllConcreteItemTypeCodes, getAllDefaultValues, getAllDefaultValues, getAllInstances, getAllInstances, getAllInstancesCount, getAllSubTypes, getAllSuperTypes, getAttributeDescriptor, getAttributeDescriptorIncludingPrivate, getAttributeDescriptors, getAttributeDescriptorsIncludingPrivate, getAttributeDescriptorsIncludingPrivate, getComposedTypeImpl, getCreatorInstance, getDeclaredAttributeDescriptor, getDeclaredAttributeDescriptors, getDeclaredJaloClass, getDefaultValues, getDefaultValues, getDumpPropertyTable, getEveryAttributeDescriptor, getInheritancePathString, getInheritedAttributeDescriptors, getInitialAttributeDescriptors, getItemTypeCode, getJaloClass, getJNDIName, getPartOfAutoRemovalAttributeDescriptors, getRelations, getSingletonInstance, getSubTypes, getSuperType, getTable, getXMLCustomProperties, getXMLDefinition, hasAttribute, hasOwnDeployment, isAbstract, isAssignableFrom, isDynamic, isInstance, isJaloClassAbstract, isJaloOnly, isSameOrSuperTypeOf, isSingleton, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, setDeclaredAttributeDescriptors, setJaloClass, setJaloOnly, setSingleton, setTypeSearchSessionContex, toString, unsetTypeSearchContextMethods inherited from class de.hybris.platform.jalo.type.Type
compareTo, getAllDescriptions, getAllDescriptions, getCode, getDefaultValue, getDefaultValue, getDescription, getDescription, getTypeImpl, setAllDescriptions, setAllDescriptions, setDefaultValue, setDefaultValue, setDescription, setDescriptionMethods inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
getAllNames, getAllNames, getExtensionName, getImpl, getName, getName, isAutocreate, isDeprecated, isGenerate, setAllNames, setAllNames, setAutocreate, setGenerate, setName, setNameMethods 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, setLocalizedPropertyMethods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getImplementation, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyMethods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, 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, getPartOfRemovedSessionMarker, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRelatedItems, 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, suppressRelation, useTA, writeReplaceMethods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
Field Details
-
COMPARATION_ATTRIBUTE
Deprecated.For sorted enumerations: the comparation attribute attribute string constant.- See Also:
-
IS_SORTED
Deprecated.The sorted attribute string constant.- See Also:
-
IS_RESORTABLE
Deprecated.The resortable attribute string constant.- See Also:
-
VALUES
Deprecated.The enumeration values attribute string constant.- See Also:
-
VALUE_TYPE
Deprecated.The value type attribute string constant.- See Also:
-
-
Constructor Details
-
EnumerationType
public EnumerationType()Deprecated.
-
-
Method Details
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException Deprecated.The generic creation method for enumeration types. Required isType.CODE, optionallyVALUE_TYPEmay be specified. Please note thatComposedType.SUPERTYPEcannot be specified!- Overrides:
createItemin classComposedType- 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.CutsType.CODEandVALUE_TYPEfrom attributes since these values have been set during creation.- Overrides:
getNonInitialAttributesin classComposedType- Parameters:
ctx- session context with language = NULLallAttributes- aItemAttributeMapcontaning attribute values.- Returns:
- a
ItemAttributeMapcontaining all attribute values, which belong to non-initial attributes.
-
changeTypeIfNecessary
protected Item changeTypeIfNecessary(Item newOne, ComposedType requestedType) throws JaloInvalidParameterException Deprecated.Redefined to skip type changing since all enumtypes have to have the EnumerationMetaType as type.- Throws:
JaloInvalidParameterException
-
toString
Deprecated.ConvertsEnumerationValueinstances intoCode of type '.' Code of enum.- Overrides:
toStringin classComposedType- Throws:
JaloInvalidParameterException- Since:
- 2.10
-
parseValue
Deprecated.ReadsEnumerationValueinstances fromCode of type '.' Code of enumstrings.- Overrides:
parseValuein classComposedType- Throws:
JaloInvalidParameterException- Since:
- 2.10
-
getXMLDefinition
Deprecated.Assembles the XML definition text to put insideitems.xml.- Overrides:
getXMLDefinitionin classComposedType- See Also:
-
exportXMLDefinition
Deprecated.- Overrides:
exportXMLDefinitionin classComposedType
-
getValueType
Deprecated.The item type of this enum type's values. -
isSorted
public boolean isSorted()Deprecated.Returns true if the values of this enum type are sorted. This is either the case if it is a default enum type (seeisDefaultEnum()) or if it holds a comparation attribute which allows ordering of values (seegetComparationAttribute()). -
isResortable
public boolean isResortable()Deprecated.Tells if this enum type is able to change the order of its values (seesortValues(List)). This is either the case if it is a default enum type (seeisDefaultEnum()) or if it holds a comparation attribute of atomic Integer type (seegetComparationAttribute()). -
getValues
Deprecated.Returns all enum values. If the type issortablethe values are sorted. -
getValues
Deprecated. -
setValues
Deprecated.For generic access to value list. Removes all of its values which are not contained inside the new value list. If the type is resortable the value are put in list order.- Parameters:
values- the new enum value list- Throws:
JaloInvalidParameterException- case a value doesnt belong to this type - means which is no instance of this type
-
checkValues
Deprecated.Helper forsetValues(List): checks if every item of the value list is instance of this type.- Throws:
JaloInvalidParameterException- in case there are items which are not instance of this type
-
sortValues
Deprecated.Changes the order of this enum type's values.- Throws:
JaloInvalidParameterException- if the type is not resortable, the list doesnt contain all values of this type or a item of the list is not instance of this type
-
isDefaultEnum
public boolean isDefaultEnum()Deprecated.Returns true if this type holds instances ofEnumerationValue, false for any other kind of item. -
setComparationAttribute
Deprecated.Changes the ordering attribute of this enumeration type. This affects directlyisSorted()andisResortable()so be careful.- Parameters:
descr- the attribute descriptor to order values by- Throws:
JaloInvalidParameterException- in case the type is a defaul enum type ( has built-in ordering), the attribute descriptor doesnt belong to this enum type or the attribute is not searchable
-
getComparationAttribute
Deprecated.Returns the comparation attribute to sort values by ingetValues(). -
setExtensionName
Deprecated.Description copied from class:TypeManagerManagedChanges the name of the extension which this type system item belongs to.Any type or decriptor declared by an extension's
items.xmlowns the name of this extension. Types or descriptors created after initialization do not have an extension name automatically.- Overrides:
setExtensionNamein classTypeManagerManaged
-