Package de.hybris.platform.jalo.type
Class Descriptor
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable
- Direct Known Subclasses:
AttributeDescriptor
public abstract class Descriptor extends TypeManagerManaged
Base class of all descriptor items.Basically it just owns a qualifier and a value type.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDescriptor.DescriptorImplInternal - interface to persistence layer implementation.-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
TypeManagerManaged.TypeManagerManagedImpl
-
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.StringATTRIBUTETYPEThe attribute type attribute string constant.static java.lang.StringQUALIFIERThe qualifier attribute string constant.-
Fields inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
AUTOCREATE, DEPRECATED, EXTENSION_NAME, GENERATE, NAME
-
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 Descriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object o)Makes descriptors comparable by their qualifer (case insensitive).TypegetAttributeType()Returns the type of this descriptor.TypegetAttributeType(SessionContext ctx)Returns the type of this field.protected TypegetContextAdjustedAttributeType(SessionContext ctx, Type realtype)Translates the real type of this descriptor into the one matching the given session context.protected Descriptor.DescriptorImplgetDescriptorImpl()Internal access to persistence layer implementation.java.lang.StringgetQualifier()Returns the qualifier of this descriptor.TypegetRealAttributeType()Returns the real type if this descriptor without translating it according to the current session context.java.lang.StringtoString()The string representation of this descriptor.-
Methods inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
exportXMLDefinition, getAllNames, getAllNames, getExtensionName, getImpl, getName, getName, isAutocreate, isDeprecated, isGenerate, setAllNames, setAllNames, setAutocreate, setExtensionName, setGenerate, setName, setName
-
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, createItem, 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, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Field Detail
-
ATTRIBUTETYPE
public static final java.lang.String ATTRIBUTETYPE
The attribute type attribute string constant.- See Also:
- Constant Field Values
-
QUALIFIER
public static final java.lang.String QUALIFIER
The qualifier attribute string constant.- See Also:
- Constant Field Values
-
-
Method Detail
-
getQualifier
public java.lang.String getQualifier()
Returns the qualifier of this descriptor.
-
getAttributeType
public Type getAttributeType()
Returns the type of this descriptor. Please note that the current session context is condiered. This means you will get the type describing the result value ofItem.getAttribute(String)with the same session context.E.g. with present context language a localized field descriptor will not return its map type but the return type. To get the map type just set the context language to null.
-
getAttributeType
public Type getAttributeType(SessionContext ctx)
Returns the type of this field. Please note that the specified session context is condiered. This means you will get the type describing the result value ofItem.getAttribute(String)with the same session context.E.g. with present context language a localized field descriptor will not return its map type but the return type. To get the map type just set the context language to null.
-
getRealAttributeType
public Type getRealAttributeType()
Returns the real type if this descriptor without translating it according to the current session context.
-
getContextAdjustedAttributeType
protected Type getContextAdjustedAttributeType(SessionContext ctx, Type realtype)
Translates the real type of this descriptor into the one matching the given session context.By now this only applies to map types describing localized field: if a context language is set this method will return its argument type.
- Parameters:
ctx- the session contextrealtype- this descriptors real type
-
toString
public java.lang.String toString()
The string representation of this descriptor.
-
getDescriptorImpl
protected Descriptor.DescriptorImpl getDescriptorImpl()
Internal access to persistence layer implementation.
-
compareTo
public int compareTo(java.lang.Object o)
Makes descriptors comparable by their qualifer (case insensitive).- Specified by:
compareToin interfacejava.lang.Comparable- Overrides:
compareToin 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.
-
-