Package de.esoco.entity
Klasse ExtraAttributes
java.lang.Object
de.esoco.entity.ExtraAttributes
A relation type factory class to create relation types for
ExtraAttributes
of Entities
. Extra
attribute relation types can be recognized-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic org.obrel.core.RelationType
<Boolean> Factory method to create a new extra attribute with a boolean datatype.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.static <T> org.obrel.core.RelationType
<T> Factory method to create a new extra attribute with a certain name and datatype.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.static org.obrel.core.RelationType
<Integer> Factory method to create a new extra attribute with an integer datatype.static <E> org.obrel.core.RelationType
<List<E>> newListExtraAttribute
(String name, Class<? super E> elementType) Factory method to create a new extra attribute with aList
datatype.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 aMap
datatype.static <K,
V> org.obrel.core.RelationType <Map<K, V>> Factory method to create an extra attribute with an orderedMap
datatype.static <E> org.obrel.core.RelationType
<Set<E>> Factory method to create an extra attribute with an orderedSet
datatype.static org.obrel.core.RelationType
<String> Factory method to create a new extra attribute with a string datatype.
-
Felddetails
-
EXTRA_ATTRIBUTES_NAMESPACE
The default namespace for extra attributes.- Siehe auch:
-
EXTRA_ATTRIBUTE_FLAG
A final flag relation that indicates an extra attribute relation type.
-
-
Methodendetails
-
newBooleanExtraAttribute
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 keyenumClass
- 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 literalList.class
would otherwise not be a valid argument to define a key with the datatypeList<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 literalList.class
would otherwise not be a valid argument to define a key with the datatypeList<T>
.- Parameter:
name
- The name of the keydatatype
- The class of the key datatype- Gibt zurück:
- A new extra attribute instance with the given name and datatype
-
newIntegerExtraAttribute
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 aList
datatype. The element datatype must be of type ? super E to support collections of generic types.- Parameter:
name
- The name of the keyelementType
- 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 aMap
datatype.- Parameter:
name
- The name of the keykeyType
- The datatype of the map keysvalueType
- The datatype of the map values- Gibt zurück:
- A new extra attribute instance with the given name
-
newOrderedMapExtraAttribute
Factory method to create an extra attribute with an orderedMap
datatype. Extra attributes with such a key will be read from the database as an ordered map implementation likeLinkedHashMap
. 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
Factory method to create an extra attribute with an orderedSet
datatype. Extra attributes with such a key will be read from the database as an ordered set implementation likeLinkedHashSet
. 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
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
-