Klasse ExtraAttributes

java.lang.Object
de.esoco.entity.ExtraAttributes

public final class ExtraAttributes extends Object
A relation type factory class to create relation types for ExtraAttributes of Entities. Extra attribute relation types can be recognized
  • Felddetails

    • EXTRA_ATTRIBUTES_NAMESPACE

      public static final String EXTRA_ATTRIBUTES_NAMESPACE
      The default namespace for extra attributes.
      Siehe auch:
    • EXTRA_ATTRIBUTE_FLAG

      public static final org.obrel.core.RelationType<Boolean> EXTRA_ATTRIBUTE_FLAG
      A final flag relation that indicates an extra attribute relation type.
  • Methodendetails

    • newBooleanExtraAttribute

      public static org.obrel.core.RelationType<Boolean> newBooleanExtraAttribute(String name)
      Factory method to create a new extra attribute with a boolean datatype.
      Parameter:
      name - The name of the key
      Gibt zurück:
      A new extra attribute instance with the given name
    • newEnumExtraAttribute

      public static <E extends Enum<E>> org.obrel.core.RelationType<E> newEnumExtraAttribute(String name, Class<E> enumClass)
      Factory method to create a new extra attribute with a certain enum datatype.
      Parameter:
      name - The name of the key
      enumClass - The enum class of the attribute
      Gibt zurück:
      A new extra attribute instance with the given name
    • newExtraAttribute

      public static <T> org.obrel.core.RelationType<T> newExtraAttribute()
      Factory method to create a new extra attribute with a certain name and datatype. The type parameter of the datatype argument has been relaxed to '? super T' to allow the usage of other generic datatypes like the collection classes. This is necessary because, for example, the literal List.class would otherwise not be a valid argument to define a key with the datatype List<T>.
      Gibt zurück:
      A new extra attribute instance with the given name and datatype
    • newExtraAttribute

      public static <T> org.obrel.core.RelationType<T> newExtraAttribute(String name, Class<? super T> datatype)
      Factory method to create a new extra attribute with a certain name and datatype. The type parameter of the datatype argument has been relaxed to '? super T' to allow the usage of other generic datatypes like the collection classes. This is necessary because, for example, the literal List.class would otherwise not be a valid argument to define a key with the datatype List<T>.
      Parameter:
      name - The name of the key
      datatype - The class of the key datatype
      Gibt zurück:
      A new extra attribute instance with the given name and datatype
    • newIntegerExtraAttribute

      public static org.obrel.core.RelationType<Integer> newIntegerExtraAttribute(String name)
      Factory method to create a new extra attribute with an integer datatype.
      Parameter:
      name - The name of the key
      Gibt zurück:
      A new extra attribute instance with the given name
    • newListExtraAttribute

      public static <E> org.obrel.core.RelationType<List<E>> newListExtraAttribute(String name, Class<? super E> elementType)
      Factory method to create a new extra attribute with a List datatype. The element datatype must be of type ? super E to support collections of generic types.
      Parameter:
      name - The name of the key
      elementType - The class of the list element datatype
      Gibt zurück:
      A new extra attribute instance with the given name
    • newMapExtraAttribute

      public static <K, V> org.obrel.core.RelationType<Map<K,V>> newMapExtraAttribute(String name, Class<K> keyType, Class<V> valueType)
      Factory method to create a new extra attribute with a Map datatype.
      Parameter:
      name - The name of the key
      keyType - The datatype of the map keys
      valueType - The datatype of the map values
      Gibt zurück:
      A new extra attribute instance with the given name
    • newOrderedMapExtraAttribute

      public static <K, V> org.obrel.core.RelationType<Map<K,V>> newOrderedMapExtraAttribute()
      Factory method to create an extra attribute with an ordered Map datatype. Extra attributes with such a key will be read from the database as an ordered map implementation like LinkedHashMap. Because extra attributes have no default values the caller is responsible for setting an ordered map when initializing such an extra attribute.
      Gibt zurück:
      A new extra attribute instance
    • newOrderedSetExtraAttribute

      public static <E> org.obrel.core.RelationType<Set<E>> newOrderedSetExtraAttribute()
      Factory method to create an extra attribute with an ordered Set datatype. Extra attributes with such a key will be read from the database as an ordered set implementation like LinkedHashSet. Because extra attributes have no default values the caller is responsible for setting an ordered set when initializing such an extra attribute.
      Gibt zurück:
      A new extra attribute instance
    • newStringExtraAttribute

      public static org.obrel.core.RelationType<String> newStringExtraAttribute(String name)
      Factory method to create a new extra attribute with a string datatype.
      Parameter:
      name - The name of the key
      Gibt zurück:
      A new extra attribute instance with the given name