Class DataAttribute


  • public class DataAttribute
    extends java.lang.Object
    A class holding meta information about an attribute. See DataType for further information.
    • 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 Map with keytype Locale.
      • 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
      • 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:
        toString in class java.lang.Object