Package de.hybris.platform.jalo.type
Class Type
- All Implemented Interfaces:
Serializable,Comparable
- Direct Known Subclasses:
AtomicType,CollectionType,ComposedType,MapType
Abstract base class for all types.
Types have a unique (case insensitive) code, know their instances and may provide a default value.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe persistence layer implementation interface.Nested 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 StringThe code attribute string constant.static final StringThe default value attribute string constant.static final StringThe description attribute string constant.static final StringThe xml definition attribute string constant.Fields 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 TypeMethodDescriptionintMakes types comparable by their code (case insenesitive).getCode()Returns the unique code of this type.Returns the default value of this type.Returns the default value of this type.protected Type.TypeImplInternal access to persistence layer implementation.abstract StringReturns the XML definition string as expected byitems.xml.abstract booleanisAssignableFrom(Type type) Tests if this type is assignable from a given type.abstract booleanisInstance(Object o) Test whether an object is an instance of this type or not.abstract ObjectparseValue(SessionContext ctx, String value) voidsetAllDescriptions(SessionContext ctx, Map descriptions) Changes all descriptions by specifying a language-to-description map.voidsetAllDescriptions(Map descriptions) Changes all descriptions by specifying a language-to-description map.voidsetDefaultValue(SessionContext ctx, Object value) Changes the default value of this type.voidsetDefaultValue(Object value) Changes the default value of this type.voidsetDescription(SessionContext ctx, String description) Changes the type description for the given session context language.voidsetDescription(String description) Changes the type description for the current session language.toString()Provides a string representation of this type.abstract StringtoString(SessionContext ctx, Object value) 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, 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, 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, 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
-
DEFAULTVALUE
The default value attribute string constant. -
DESCRIPTION
The description attribute string constant. -
CODE
The code attribute string constant. -
XMLDEFINITION
The xml definition attribute string constant.
-
-
Constructor Details
-
Type
public Type()
-
-
Method Details
-
getCode
Returns the unique code of this type. -
getDefaultValue
Returns the default value of this type. -
getDefaultValue
Returns the default value of this type. -
setDefaultValue
Changes the default value of this type.- Throws:
JaloInvalidParameterException
-
setDefaultValue
Changes the default value of this type.- Throws:
JaloInvalidParameterException
-
toString
public abstract String toString(SessionContext ctx, Object value) throws JaloInvalidParameterException - Throws:
JaloInvalidParameterException- Since:
- 2.10
-
parseValue
public abstract Object parseValue(SessionContext ctx, String value) throws JaloInvalidParameterException - Throws:
JaloInvalidParameterException- Since:
- 2.10
-
isAssignableFrom
Tests if this type is assignable from a given type.This is
trueif this type equals or is supertype of the given type.- Parameters:
type- the type to be checked.
-
isInstance
Test whether an object is an instance of this type or not.This is
trueif this type is type of this object or is supertype of the object's type.- Parameters:
o- the object to be checked.
-
getDescription
- Returns:
- the description of this type localized for the current session language.
-
getDescription
- Returns:
- the description of this type localized by the given session context.
-
setDescription
Changes the type description for the current session language.- Parameters:
description- the new description.
-
setDescription
Changes the type description for the given session context language.- Parameters:
ctx- the session context defining the language to set the description fordescription- the new description.
-
getAllDescriptions
- Returns:
- all descriptions at once in form of a language-to-description map.
-
getAllDescriptions
- Returns:
- all descriptions at once in form of a language-to-description map.
-
setAllDescriptions
Changes all descriptions by specifying a language-to-description map. All previous descriptions are removed.- Parameters:
descriptions- all new names as language-to-description map
-
setAllDescriptions
Changes all descriptions by specifying a language-to-description map. All previous descriptions are removed.- Parameters:
descriptions- all new descriptions as language-to-description map
-
toString
Provides a string representation of this type. -
getXMLDefinition
Returns the XML definition string as expected byitems.xml. -
getTypeImpl
Internal access to persistence layer implementation. -
compareTo
Makes types comparable by their code (case insenesitive).- Specified by:
compareToin interfaceComparable- 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.
-