@Deprecated public class EnumerationType extends ComposedType
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.
ComposedType.ComposedTypeImplType.TypeImplTypeManagerManaged.TypeManagerManagedImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static String |
COMPARATION_ATTRIBUTE
Deprecated.
For sorted enumerations: the comparation attribute attribute string constant.
|
static String |
IS_RESORTABLE
Deprecated.
The resortable attribute string constant.
|
static String |
IS_SORTED
Deprecated.
The sorted attribute string constant.
|
static String |
VALUE_TYPE
Deprecated.
The value type attribute string constant.
|
static String |
VALUES
Deprecated.
The enumeration values attribute string constant.
|
ABSTRACT, ALLSUBTYPES, ALLSUPERTYPES, ATTRIBUTEDESCRIPTORS, DECLAREDATTRIBUTEDESCRIPTORS, DUMPPROPERTYTABLE, DYNAMIC, INHERITANCEPATH, INHERITEDATTRIBUTEDESCRIPTORS, JALOCLASS, JALOONLY, JNDINAME, SINGLETON, SUBTYPES, SUPERTYPE, TABLECODE, DEFAULTVALUE, DESCRIPTION, XMLDEFINITIONAUTOCREATE, DEPRECATED, EXTENSION_NAME, GENERATE, NAMELANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
EnumerationType()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected Item |
changeTypeIfNecessary(Item newOne,
ComposedType requestedType)
Deprecated.
Redefined to skip type changing since all enumtypes have to have the EnumerationMetaType as type.
|
protected void |
checkValues(List values)
Deprecated.
Helper for
setValues(List): checks if every item of the value list is instance of this type. |
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
Deprecated.
The generic creation method for enumeration types.
|
String |
exportXMLDefinition(XMLOutputter xout,
String forExtension)
Deprecated.
|
AttributeDescriptor |
getComparationAttribute()
Deprecated.
Returns the comparation attribute to sort values by in
getValues(). |
protected Item.ItemAttributeMap |
getNonInitialAttributes(SessionContext ctx,
Item.ItemAttributeMap allAttributes)
Deprecated.
Cuts
Type.CODE and VALUE_TYPE from attributes since these values have been set during creation. |
List<EnumerationValue> |
getValues()
Deprecated.
Returns all enum values.
|
protected List<EnumerationValue> |
getValues(boolean ordered)
Deprecated.
|
ComposedType |
getValueType()
Deprecated.
The item type of this enum type's values.
|
String |
getXMLDefinition()
Deprecated.
Assembles the XML definition text to put inside
items.xml . |
boolean |
isDefaultEnum()
Deprecated.
Returns true if this type holds instances of
EnumerationValue, false for any other kind of item. |
boolean |
isResortable()
Deprecated.
Tells if this enum type is able to change the order of its values (see
sortValues(List)). |
boolean |
isSorted()
Deprecated.
Returns true if the values of this enum type are sorted.
|
Object |
parseValue(SessionContext ctx,
String value)
Deprecated.
Reads
EnumerationValue instances from Code of type '.' Code of enum strings. |
void |
setComparationAttribute(AttributeDescriptor descr)
Deprecated.
Changes the ordering attribute of this enumeration type.
|
void |
setExtensionName(String extName)
Deprecated.
Changes the name of the extension which this type system item belongs to.
|
protected void |
setValues(List values)
Deprecated.
For generic access to value list.
|
void |
sortValues(List values)
Deprecated.
Changes the order of this enum type's values.
|
String |
toString(SessionContext ctx,
Object value)
Deprecated.
Converts
EnumerationValue instances into Code of type '.' Code of enum . |
_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, isAbstract, isAssignableFrom, isDynamic, isInstance, isJaloClassAbstract, isJaloOnly, isSameOrSuperTypeOf, isSingleton, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, setDeclaredAttributeDescriptors, setJaloClass, setJaloOnly, setSingleton, setTypeSearchSessionContex, toString, unsetTypeSearchContextcompareTo, getAllDescriptions, getAllDescriptions, getCode, getDefaultValue, getDefaultValue, getDescription, getDescription, getTypeImpl, setAllDescriptions, setAllDescriptions, setDefaultValue, setDefaultValue, setDescription, setDescriptiongetAllNames, getAllNames, getExtensionName, getImpl, getName, getName, isAutocreate, isDeprecated, isGenerate, setAllNames, setAllNames, setAutocreate, setGenerate, setName, setNamegetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, 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, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, 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, setTransientObject, setUseTA, useTA, writeReplacegetImplementation, setTenantpublic static final String COMPARATION_ATTRIBUTE
public static final String IS_SORTED
public static final String IS_RESORTABLE
public static final String VALUES
public static final String VALUE_TYPE
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Type.CODE, optionally VALUE_TYPE
may be specified. Please note that ComposedType.SUPERTYPE cannot be specified! createItem in class ComposedTypectx - 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 )JaloBusinessException - indicates an error during creation - any changes will be rollbackedprotected Item.ItemAttributeMap getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)
Type.CODE and VALUE_TYPE from attributes since these values have been set during creation.getNonInitialAttributes in class ComposedTypectx - session context with language = NULLallAttributes - a ItemAttributeMap contaning attribute values.ItemAttributeMap containing all attribute values, which belong to non-initial attributes.protected Item changeTypeIfNecessary(Item newOne, ComposedType requestedType) throws JaloInvalidParameterException
JaloInvalidParameterExceptionpublic String toString(SessionContext ctx, Object value) throws JaloInvalidParameterException
EnumerationValue instances into Code of type '.' Code of enum .toString in class ComposedTypeJaloInvalidParameterExceptionpublic Object parseValue(SessionContext ctx, String value) throws JaloInvalidParameterException
EnumerationValue instances from Code of type '.' Code of enum strings.parseValue in class ComposedTypeJaloInvalidParameterExceptionpublic String getXMLDefinition()
items.xml .getXMLDefinition in class ComposedTypeComposedType.getXMLDefinition(String)public String exportXMLDefinition(XMLOutputter xout, String forExtension)
exportXMLDefinition in class ComposedTypepublic ComposedType getValueType()
public boolean isSorted()
isDefaultEnum()) or if it holds a comparation attribute which allows ordering of values (see
getComparationAttribute()).public boolean isResortable()
sortValues(List)). This is either
the case if it is a default enum type (see isDefaultEnum()) or if it holds a comparation attribute of
atomic Integer type (see getComparationAttribute()).public List<EnumerationValue> getValues()
sortable the values are sorted.protected List<EnumerationValue> getValues(boolean ordered)
protected void setValues(List values) throws JaloInvalidParameterException
values - the new enum value listJaloInvalidParameterException - case a value doesnt belong to this type - means which is no instance of this typeprotected void checkValues(List values) throws JaloInvalidParameterException
setValues(List): checks if every item of the value list is instance of this type.JaloInvalidParameterException - in case there are items which are not instance of this typepublic void sortValues(List values) throws JaloInvalidParameterException
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 typepublic boolean isDefaultEnum()
EnumerationValue, false for any other kind of item.public void setComparationAttribute(AttributeDescriptor descr) throws JaloInvalidParameterException
isSorted() and
isResortable() so be careful.descr - the attribute descriptor to order values byJaloInvalidParameterException - 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 searchablepublic AttributeDescriptor getComparationAttribute()
getValues().public void setExtensionName(String extName)
TypeManagerManaged
Any type or decriptor declared by an extension's items.xml owns the name of this extension. Types or
descriptors created after initialization do not have an extension name automatically.
setExtensionName in class TypeManagerManagedCopyright © 2017 SAP SE. All Rights Reserved.