Module jakarta.data

Interface BasicAttribute<T,V>

Type Parameters:
T - entity class of the static metamodel.
V - type of entity attribute (or wrapper type if primitive).
All Superinterfaces:
Attribute<T>, Expression<T,V>
All Known Subinterfaces:
BooleanAttribute<T>, ComparableAttribute<T,V>, NumericAttribute<T,N>, TemporalAttribute<T,V>, TextAttribute<T>
All Known Implementing Classes:
TextAttributeRecord

public interface BasicAttribute<T,V> extends Attribute<T>, Expression<T,V>

Represents an entity attribute in the StaticMetamodel that is neither sortable nor capable of order-based comparison. Subclasses of BasicAttribute allow for entity attributes with those abilities.

Since:
1.1
  • Method Details

    • type

      Class<V> type()
      Obtain the Java class of the entity attribute.
      Specified by:
      type in interface Attribute<T>
      Specified by:
      type in interface Expression<T,V>
      Returns:
      the type of the entity attribute.
    • of

      static <T, V> BasicAttribute<T,V> of(Class<T> entityClass, String name, Class<V> attributeType)

      Creates a static metamodel BasicAttribute representing the entity attribute with the specified name.

      Type Parameters:
      T - entity class of the static metamodel.
      V - type of entity attribute (or wrapper type if primitive).
      Parameters:
      entityClass - the entity class.
      name - the name of the entity attribute.
      attributeType - type of the entity attribute.
      Returns:
      instance of BasicAttribute.