- Type Parameters:
T- entity class of the static metamodel.
- All Superinterfaces:
Attribute<T>,BasicAttribute<T,,Boolean> BooleanExpression<T>,ComparableAttribute<T,,Boolean> ComparableExpression<T,,Boolean> Expression<T,,Boolean> SortableAttribute<T>
Represents a boolean entity attribute in the
StaticMetamodel.
Boolean entity attributes can be sorted on in query results and can be
compared in query restrictions. When sorting in ascending direction,
the value false is ordered before the value true.
When sorting in descending direction, the value true is ordered
before the value false.
Entity attribute types that are considered boolean include:
booleanprimitve typeBooleanwrapper type
Where possible, BooleanAttribute, which provides more function,
is preferred over ComparableAttribute and SortableAttribute.
- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> BooleanAttribute<T> Creates a static metamodelBooleanAttributerepresenting the entity attribute with the specified name.type()Returnsboolean.classorBoolean.classas the entity attribute type for boolean attributes.Methods inherited from interface jakarta.data.metamodel.Attribute
declaringType, nameMethods inherited from interface jakarta.data.expression.BooleanExpression
isFalse, isTrueMethods inherited from interface jakarta.data.expression.ComparableExpression
between, between, greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, lessThan, lessThan, lessThanEqual, lessThanEqual, notBetween, notBetweenMethods inherited from interface jakarta.data.expression.Expression
equalTo, equalTo, in, in, in, isNull, notEqualTo, notEqualTo, notIn, notIn, notIn, notNull, satisfiesMethods inherited from interface jakarta.data.metamodel.SortableAttribute
asc, desc
-
Method Details
-
of
Creates a static metamodel
BooleanAttributerepresenting the entity attribute with the specified name.- Type Parameters:
T- entity class of the static metamodel.- Parameters:
entityClass- the entity class.name- the name of the entity attribute.attributeType- type of the entity attribute:boolean.classorBoolean.class.- Returns:
- instance of
BooleanAttribute.
-
type
Returnsboolean.classorBoolean.classas the entity attribute type for boolean attributes.- Specified by:
typein interfaceAttribute<T>- Specified by:
typein interfaceBasicAttribute<T,Boolean> - Specified by:
typein interfaceBooleanExpression<T>- Specified by:
typein interfaceExpression<T,Boolean> - Returns:
boolean.classorBoolean.class.
-