Package de.hybris.platform.jalo.type
Class RelationDescriptor
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable
public class RelationDescriptor extends AttributeDescriptor
A special attribute descriptor for describing the item relation ends.Item relations are accessed via attributes at each member of the relation. Besides their value type these attributes know the relation type which stores all relation tuples.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.AttributeDescriptor
AttributeDescriptor.AttributeDescriptorImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.type.Descriptor
Descriptor.DescriptorImpl
-
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.String
IS_SOURCE
The is source attribute string constant.static java.lang.String
ORDERED
The orderd attribute string constant.static java.lang.String
RELATION_NAME
The relation name attribute string constant.static java.lang.String
RELATION_TYPE
The relation type attribute string constant.-
Fields inherited from class de.hybris.platform.jalo.type.AttributeDescriptor
ALL, ALL_PUBLIC, ATTRIBUTE_HANDLER, DATABASECOLUMN, DECLARING_ENCLOSING_TYPE, DEFAULTVALUE, DEFAULTVALUE_DEFINITIONSTRING, DESCRIPTION, ENCLOSING_TYPE, ENCRYPTED, ENCRYPTED_FLAG, INHERITED, INHERITED_FLAG, INITIAL, INITIAL_FLAG, LOCALIZED, LOCALIZED_FLAG, MODIFIERS, OPTIONAL, OPTIONAL_FLAG, PARTOF, PARTOF_FLAG, PERSISTENCE_CLASS, PERSISTENCETYPE, PRIMITIVE, PRIMITIVE_FLAG, PRIVATE, PRIVATE_FLAG, PROPERTY, PROPERTY_FLAG, PROPOSED_DATABASE_COLUMN, READ, READ_FLAG, READABLE, REMOVABLE, REMOVE, REMOVE_FLAG, SEARCH, SEARCH_FLAG, TIM_IGNORE, TIM_IGNORE_FLAG, UNIQUE, WRITABLE, WRITE, WRITE_FLAG
-
Fields inherited from class de.hybris.platform.jalo.type.Descriptor
ATTRIBUTETYPE, QUALIFIER
-
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 RelationDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkSearchableChange(boolean newSearchable)
Overrides superclass since relation descriptors are always searchable.java.lang.String
exportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout)
java.lang.String
getRelationName()
Returns the relation name.RelationType
getRelationType()
Returns the relation type this attribute belongs to.java.lang.String
getXMLDefinition()
Since relation descriptors are created during relation creation, they do not have an XML definition of their own.boolean
isOrdered()
Tells whether this attribute has been marked as 'ordered'.boolean
isSource()
Tells whether this attribute belong to the source end of the relation or to the target end.-
Methods inherited from class de.hybris.platform.jalo.type.AttributeDescriptor
checkDefaultValueAssignability, checkLocalizedChange, checkPartOfChange, checkPropertyChange, checkSelectionOfDescriptor, checkTypeChange, checkTypePermission, checkTypePermission, createItem, exportXMLDefinitionDefaultValue, getAllDescriptions, getAllDescriptions, getAllNames, getAllSubAttributeDescriptors, getAttributeDescriptorImpl, getAttributeHandler, getDatabaseColumn, getDeclaringEnclosingType, getDefaultValue, getDefaultValue, getDefaultValueDefinitionString, getDescription, getDescription, getDontOptimize, getEnclosingType, getIntModifiersFromMap, getModifiers, getName, getNonInitialAttributes, getPersistenceClass, getPersistenceQualifier, getPersistenceType, getProposedDatabaseColumn, getSelectionOf, getSubAttributeDescriptors, getXMLCustomProperties, interpretAndReplaceDefaultValue, isEncrypted, isInherited, isInitial, isLocalized, isOptional, isPartOf, isPrimitive, isPrivate, isProperty, isReadable, isRedeclared, isRemovable, isSearchable, isUnique, isWritable, isWriteable, redeclareAttributeType, removeLocalizedProperty, removeLocalizedPropertyNonRecursively, removeProperty, removePropertyNonRecursively, setAllDescriptions, setAllDescriptions, setAttributeHandler, setAttributeType, setDatabaseColumn, setDefaultValue, setDefaultValue, setDescription, setDescription, setDontOptimize, setEncrypted, setInitial, setLocalized, setLocalizedProperty, setLocalizedPropertyNonRecursively, setModifiers, setOptional, setPartOf, setPrimitive, setPrivate, setProperty, setProperty, setPropertyNonRecursively, setReadable, setRemovable, setSearchable, setSelectionOf, setUnique, setWritable, toString, toString, writeDefaultValueTagAtomic
-
Methods inherited from class de.hybris.platform.jalo.type.Descriptor
compareTo, getAttributeType, getAttributeType, getContextAdjustedAttributeType, getDescriptorImpl, getQualifier, getRealAttributeType
-
Methods inherited from class de.hybris.platform.jalo.type.TypeManagerManaged
getAllNames, getExtensionName, getImpl, 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, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty
-
Methods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getImplementation, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, setAllProperties, setAllProperties, 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, 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, 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
-
RELATION_TYPE
public static final java.lang.String RELATION_TYPE
The relation type attribute string constant.- See Also:
- Constant Field Values
-
IS_SOURCE
public static final java.lang.String IS_SOURCE
The is source attribute string constant.- See Also:
- Constant Field Values
-
RELATION_NAME
public static final java.lang.String RELATION_NAME
The relation name attribute string constant.- See Also:
- Constant Field Values
-
ORDERED
public static final java.lang.String ORDERED
The orderd attribute string constant.- See Also:
- Constant Field Values
-
-
Method Detail
-
checkSearchableChange
protected void checkSearchableChange(boolean newSearchable) throws JaloInvalidParameterException
Overrides superclass since relation descriptors are always searchable.- Overrides:
checkSearchableChange
in classAttributeDescriptor
- Throws:
JaloInvalidParameterException
- if it cannot become searchable
-
isSource
public boolean isSource()
Tells whether this attribute belong to the source end of the relation or to the target end.
-
isOrdered
public boolean isOrdered()
Tells whether this attribute has been marked as 'ordered'.
-
getRelationName
public java.lang.String getRelationName()
Returns the relation name.This is just a shortcut for getting the relation type and calling
Type.getCode()
on it. Nervertheless surely faster.
-
getRelationType
public RelationType getRelationType()
Returns the relation type this attribute belongs to.
-
getXMLDefinition
public java.lang.String getXMLDefinition()
Since relation descriptors are created during relation creation, they do not have an XML definition of their own.- Overrides:
getXMLDefinition
in classAttributeDescriptor
- Returns:
- empty string
-
exportXMLDefinition
public java.lang.String exportXMLDefinition(org.znerd.xmlenc.XMLOutputter xout)
- Overrides:
exportXMLDefinition
in classAttributeDescriptor
-
-