Class DataAttribute
- java.lang.Object
-
- com.hybris.cockpitng.dataaccess.facades.type.DataAttribute
-
public class DataAttribute extends java.lang.ObjectA class holding meta information about an attribute. SeeDataTypefor further information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDataAttribute.AttributeTypeEnumeration for the different types of attributes.static classDataAttribute.BuilderBuilder forDataAttribute.static classDataAttribute.MapTypeMap key and value type information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.util.Locale,java.lang.String>getAllDescriptions()java.util.Map<java.util.Locale,java.lang.String>getAllLabels()Returns all labels for this attribute.DataAttribute.AttributeTypegetAttributeType()java.lang.ObjectgetDefaultValue()DataTypegetDefinedType()java.lang.StringgetDescription(java.util.Locale locale)java.lang.StringgetLabel(java.util.Locale locale)DataAttribute.MapTypegetMapType()java.lang.StringgetQualifier()java.lang.StringgetSelectionOf()DataTypegetValueType()booleanisEncrypted()booleanisLocalized()booleanisMandatory()booleanisOrdered()booleanisPartOf()booleanisPrimitive()booleanisSearchable()booleanisUnique()booleanisVariantAttribute()booleanisWritable()booleanisWritableOnCreation()booleanisWriteThrough()java.lang.StringtoString()
-
-
-
Method Detail
-
isSearchable
public boolean isSearchable()
- Returns:
- whether search can be performed against this attribute
-
isMandatory
public boolean isMandatory()
- Returns:
- true, if this attribute must have a non-null value.
-
getQualifier
public java.lang.String getQualifier()
- Returns:
- the qualifier of this attribute.
-
isUnique
public boolean isUnique()
- Returns:
- true, if this attribute is unique.
-
getDefinedType
public DataType getDefinedType()
- Returns:
- actual attribute's type definition
- See Also:
getValueType()
-
getValueType
public DataType getValueType()
- Returns:
- element type, if attribute is collection, value type if attribute is map or defined type otherwise
-
isLocalized
public boolean isLocalized()
- Returns:
- true, if this attribute is localized, i.e. it's value could be something like a
Mapwith keytypeLocale.
-
isWritable
public boolean isWritable()
- Returns:
- true, if this attribute is writable.
-
isWritableOnCreation
public boolean isWritableOnCreation()
- Returns:
- true, if this attribute is writable on creation, e.g. it could be in general not writable but is mandatory. So one can set it only once.
-
isOrdered
public boolean isOrdered()
- Returns:
- true, if this attribute is ordered, e.g. in case of Collection, when elements order can be changed
-
isVariantAttribute
public boolean isVariantAttribute()
- Returns:
- true if the attribute is a variant attribute, defaults to false and all type systems that do not provide variant attributes should return the default value
-
getAttributeType
public DataAttribute.AttributeType getAttributeType()
- Returns:
- additional information for this attribute wrapped in an instance of
DataAttribute.AttributeType.
-
getMapType
public DataAttribute.MapType getMapType()
- Returns:
- the
DataAttribute.MapTypefor this attribute, if it is of typeDataAttribute.AttributeType.MAPor null otherwise.
-
getLabel
public java.lang.String getLabel(java.util.Locale locale)
- Returns:
- the label for the given locale.
-
getAllLabels
public java.util.Map<java.util.Locale,java.lang.String> getAllLabels()
Returns all labels for this attribute.
-
getAllDescriptions
public java.util.Map<java.util.Locale,java.lang.String> getAllDescriptions()
- Returns:
- all descriptions for this attribute.
-
getDescription
public java.lang.String getDescription(java.util.Locale locale)
- Returns:
- the description for the given locale.
-
isPartOf
public boolean isPartOf()
-
isPrimitive
public boolean isPrimitive()
-
isWriteThrough
public boolean isWriteThrough()
- Returns:
- true if the act of setting the attribute value may lead to a side effect of persisting the entity. For example platform's jalo attributes behave this way.
-
getSelectionOf
public java.lang.String getSelectionOf()
- Returns:
- the selectionOf property
-
getDefaultValue
public java.lang.Object getDefaultValue()
- Returns:
- the defaultValue property
-
isEncrypted
public boolean isEncrypted()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-