Class Property<ENTITY>
- All Implemented Interfaces:
Serializable
Query
conditions
using QueryBuilder
.
Access properties using the generated underscore class of an entity (e.g. Example_.id
).- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Class<? extends PropertyConverter>
final Class<?>
Type, which is converted to a type supported by the DB.final String
final EntityInfo<ENTITY>
final int
final boolean
final boolean
final String
final int
final Class<?>
One of the supported types to be mapped to the DB. -
Constructor Summary
ConstructorsConstructorDescriptionProperty
(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name) Property
(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name, boolean isVirtual) Property
(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name, boolean isId, boolean isVirtual, String dbName, Class<? extends PropertyConverter> converterClass, Class<?> customType) Property
(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name, boolean isId, String dbName) Property
(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name, boolean isId, String dbName, Class<? extends PropertyConverter> converterClass, Class<?> customType) -
Method Summary
Modifier and TypeMethodDescriptionbetween
(double lowerBoundary, double upperBoundary) Creates a "BETWEEN ...between
(int lowerBoundary, int upperBoundary) Creates a "BETWEEN ...between
(long lowerBoundary, long upperBoundary) Creates a "BETWEEN ...between
(short lowerBoundary, short upperBoundary) Creates a "BETWEEN ...Creates a "BETWEEN ...Creates a contains condition for this property usingStringOrder#CASE_SENSITIVE
.contains
(String value, QueryBuilder.StringOrder order) containsElement
(String value) For a String array, list or String-key map property, matches if at least one element equals the given value usingStringOrder#CASE_SENSITIVE
.containsElement
(String value, QueryBuilder.StringOrder order) containsKeyValue
(String key, String value) Deprecated.containsKeyValue
(String key, String value, QueryBuilder.StringOrder order) Deprecated.Use theequalKeyValue(String, String, StringOrder)
condition instead.Creates an ends with condition usingStringOrder#CASE_SENSITIVE
.endsWith
(String value, QueryBuilder.StringOrder order) Deprecated.Useequal(boolean)
instead.equal
(boolean value) Creates an "equal ('=')" condition for this property.equal
(byte[] value) Creates an "equal ('=')" condition for this property.equal
(double value, double tolerance) Callsbetween(double, double)
withvalue - tolerance
as lower bound andvalue + tolerance
as upper bound.equal
(int value) Creates an "equal ('=')" condition for this property.equal
(long value) Creates an "equal ('=')" condition for this property.equal
(short value) Creates an "equal ('=')" condition for this property.Creates an "equal ('=')" condition for this property usingStringOrder#CASE_SENSITIVE
.equal
(String value, QueryBuilder.StringOrder order) Creates an "equal ('=')" condition for this property.Creates an "equal ('=')" condition for this property.equalKeyValue
(String key, double value) For a String-key map property, matches the combination where the key and value of at least one map entry is equal to the givenkey
andvalue
.equalKeyValue
(String key, long value) For a String-key map property, matches the combination where the key and value of at least one map entry is equal to the givenkey
andvalue
.equalKeyValue
(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is equal to the givenkey
andvalue
.int
int
getId()
greater
(byte[] value) Creates a "greater than ('>')" condition for this property.greater
(double value) Creates a "greater than ('>')" condition for this property.greater
(int value) Creates a "greater than ('>')" condition for this property.greater
(long value) Creates a "greater than ('>')" condition for this property.greater
(short value) Creates a "greater than ('>')" condition for this property.Creates a "greater than ('>')" condition for this property usingStringOrder#CASE_SENSITIVE
.greater
(String value, QueryBuilder.StringOrder order) Creates a "greater than ('>')" condition for this property.Creates a "greater than ('>')" condition for this property.greaterKeyValue
(String key, double value) For a String-key map property, matches the combination where the key and value of at least one map entry is greater than the givenkey
andvalue
.greaterKeyValue
(String key, long value) For a String-key map property, matches the combination where the key and value of at least one map entry is greater than the givenkey
andvalue
.greaterKeyValue
(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is greater than the givenkey
andvalue
.greaterOrEqual
(byte[] value) Creates a "greater or equal ('>=')" condition for this property.greaterOrEqual
(double value) Creates a "greater or equal ('>=')" condition for this property.greaterOrEqual
(int value) Creates a "greater or equal ('>=')" condition for this property.greaterOrEqual
(long value) Creates a "greater or equal ('>=')" condition for this property.greaterOrEqual
(short value) Creates a "greater or equal ('>=')" condition for this property.greaterOrEqual
(String value, QueryBuilder.StringOrder order) Creates a "greater or equal ('>=')" condition for this property.greaterOrEqual
(Date value) Creates a "greater or equal ('>=')" condition for this property.greaterOrEqualKeyValue
(String key, double value) For a String-key map property, matches the combination where the key and value of at least one map entry is greater than or equal to the givenkey
andvalue
.greaterOrEqualKeyValue
(String key, long value) For a String-key map property, matches the combination where the key and value of at least one map entry is greater than or equal to the givenkey
andvalue
.greaterOrEqualKeyValue
(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is greater than or equal to the givenkey
andvalue
.Deprecated.Usegreater(short)
instead.Deprecated.UseoneOf(int[])
instead.in
(Collection<?> inValues) Deprecated.UseoneOf(int[])
instead.Deprecated.UsenotNull()
instead.isNull()
Creates an "IS NULL" condition for this property.less
(byte[] value) Creates a "less than ('<')" condition for this property.less
(double value) Creates a "less than ('<')" condition for this property.less
(int value) Creates a "less than ('<')" condition for this property.less
(long value) Creates a "less than ('<')" condition for this property.less
(short value) Creates a "less than ('<')" condition for this property.Creates a "less than ('<')" condition for this property usingStringOrder#CASE_SENSITIVE
.less
(String value, QueryBuilder.StringOrder order) Creates a "less than ('<')" condition for this property.Creates a "less than ('<')" condition for this property.lessKeyValue
(String key, double value) For a String-key map property, matches the combination where the key and value of at least one map entry is less than the givenkey
andvalue
.lessKeyValue
(String key, long value) For a String-key map property, matches the combination where the key and value of at least one map entry is less than the givenkey
andvalue
.lessKeyValue
(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is less than the givenkey
andvalue
.lessOrEqual
(byte[] value) Creates a "less or equal ('<=')" condition for this property.lessOrEqual
(double value) Creates a "less or equal ('<=')" condition for this property.lessOrEqual
(int value) Creates a "less or equal ('<=')" condition for this property.lessOrEqual
(long value) Creates a "less or equal ('<=')" condition for this property.lessOrEqual
(short value) Creates a "less or equal ('<=')" condition for this property.lessOrEqual
(String value, QueryBuilder.StringOrder order) Creates a "less or equal ('<=')" condition for this property.lessOrEqual
(Date value) Creates a "less or equal ('<=')" condition for this property.lessOrEqualKeyValue
(String key, double value) For a String-key map property, matches the combination where the key and value of at least one map entry is less than or equal to the givenkey
andvalue
.lessOrEqualKeyValue
(String key, long value) For a String-key map property, matches the combination where the key and value of at least one map entry is less than or equal to the givenkey
andvalue
.lessOrEqualKeyValue
(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is less than or equal to the givenkey
andvalue
.Deprecated.Useless(short)
instead.nearestNeighbors
(float[] queryVector, int maxResultCount) Performs an approximate nearest neighbor (ANN) search to find objects near to the givenqueryVector
.Deprecated.UsenotEqual(boolean)
instead.notEqual
(boolean value) Creates a "not equal ('<>')" condition for this property.notEqual
(int value) Creates a "not equal ('<>')" condition for this property.notEqual
(long value) Creates a "not equal ('<>')" condition for this property.notEqual
(short value) Creates a "not equal ('<>')" condition for this property.Creates a "not equal ('<>')" condition for this property usingStringOrder#CASE_SENSITIVE
.notEqual
(String value, QueryBuilder.StringOrder order) Creates a "not equal ('<>')" condition for this property.Creates a "not equal ('<>')" condition for this property.notNull()
Creates an "IS NOT NULL" condition for this property.notOneOf
(int[] values) Creates a "NOT IN (..., ..., ...)" condition for this property.notOneOf
(long[] values) Creates a "NOT IN (..., ..., ...)" condition for this property.Creates a "NOT IN (..., ..., ...)" condition for this property.oneOf
(int[] values) Creates an "IN (..., ..., ...)" condition for this property.oneOf
(long[] values) Creates an "IN (..., ..., ...)" condition for this property.Creates an "IN (..., ..., ...)" condition for this property usingStringOrder#CASE_SENSITIVE
.oneOf
(String[] values, QueryBuilder.StringOrder order) Creates an "IN (..., ..., ...)" condition for this property.Creates an "IN (..., ..., ...)" condition for this property.startsWith
(String value) Creates a starts with condition usingStringOrder#CASE_SENSITIVE
.startsWith
(String value, QueryBuilder.StringOrder order) toString()
-
Field Details
-
entity
-
ordinal
public final int ordinal -
id
public final int id -
type
One of the supported types to be mapped to the DB. -
name
-
isId
public final boolean isId -
isVirtual
public final boolean isVirtual -
dbName
-
converterClass
-
customType
Type, which is converted to a type supported by the DB.
-
-
Constructor Details
-
Property
-
Property
public Property(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name, boolean isVirtual) -
Property
public Property(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name, boolean isId, @Nullable String dbName) -
Property
public Property(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name, boolean isId, @Nullable String dbName, @Nullable Class<? extends PropertyConverter> converterClass, @Nullable Class<?> customType) -
Property
public Property(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, String name, boolean isId, boolean isVirtual, @Nullable String dbName, @Nullable Class<? extends PropertyConverter> converterClass, @Nullable Class<?> customType)
-
-
Method Details
-
isNull
Creates an "IS NULL" condition for this property. -
notNull
Creates an "IS NOT NULL" condition for this property. -
equal
Creates an "equal ('=')" condition for this property. -
notEqual
Creates a "not equal ('<>')" condition for this property. -
equal
Creates an "equal ('=')" condition for this property. -
notEqual
Creates a "not equal ('<>')" condition for this property. -
greater
Creates a "greater than ('>')" condition for this property. -
greaterOrEqual
Creates a "greater or equal ('>=')" condition for this property. -
less
Creates a "less than ('<')" condition for this property. -
lessOrEqual
Creates a "less or equal ('<=')" condition for this property. -
between
Creates a "BETWEEN ... AND ..." condition for this property. Finds objects with property value between and including the first and second value. -
equal
Creates an "equal ('=')" condition for this property. -
notEqual
Creates a "not equal ('<>')" condition for this property. -
greater
Creates a "greater than ('>')" condition for this property. -
greaterOrEqual
Creates a "greater or equal ('>=')" condition for this property. -
less
Creates a "less than ('<')" condition for this property. -
lessOrEqual
Creates a "less or equal ('<=')" condition for this property. -
between
Creates a "BETWEEN ... AND ..." condition for this property. Finds objects with property value between and including the first and second value. -
oneOf
Creates an "IN (..., ..., ...)" condition for this property. -
notOneOf
Creates a "NOT IN (..., ..., ...)" condition for this property. -
equal
Creates an "equal ('=')" condition for this property. -
notEqual
Creates a "not equal ('<>')" condition for this property. -
greater
Creates a "greater than ('>')" condition for this property. -
greaterOrEqual
Creates a "greater or equal ('>=')" condition for this property. -
less
Creates a "less than ('<')" condition for this property. -
lessOrEqual
Creates a "less or equal ('<=')" condition for this property. -
between
Creates a "BETWEEN ... AND ..." condition for this property. Finds objects with property value between and including the first and second value. -
oneOf
Creates an "IN (..., ..., ...)" condition for this property. -
notOneOf
Creates a "NOT IN (..., ..., ...)" condition for this property. -
equal
Callsbetween(double, double)
withvalue - tolerance
as lower bound andvalue + tolerance
as upper bound. -
greater
Creates a "greater than ('>')" condition for this property. -
greaterOrEqual
Creates a "greater or equal ('>=')" condition for this property. -
less
Creates a "less than ('<')" condition for this property. -
lessOrEqual
Creates a "less or equal ('<=')" condition for this property. -
between
Creates a "BETWEEN ... AND ..." condition for this property. Finds objects with property value between and including the first and second value. -
nearestNeighbors
Performs an approximate nearest neighbor (ANN) search to find objects near to the givenqueryVector
.This requires the vector property to have an
HnswIndex
.The dimensions of the query vector should be at least the dimensions of this vector property.
Use
maxResultCount
to set the maximum number of objects to return by the ANN condition. Hint: it can also be used as the "ef" HNSW parameter to increase the search quality in combination with a query limit. For example, use maxResultCount of 100 with a Query limit of 10 to have 10 results that are of potentially better quality than just passing in 10 for maxResultCount (quality/performance tradeoff).To change the given parameters after building the query, use
Query.setParameter(Property, float[])
andQuery.setParameter(Property, long)
or their alias equivalent. -
equal
Creates an "equal ('=')" condition for this property. -
notEqual
Creates a "not equal ('<>')" condition for this property. -
greater
Creates a "greater than ('>')" condition for this property. -
greaterOrEqual
Creates a "greater or equal ('>=')" condition for this property. -
less
Creates a "less than ('<')" condition for this property. -
lessOrEqual
Creates a "less or equal ('<=')" condition for this property. -
oneOf
Creates an "IN (..., ..., ...)" condition for this property. -
notOneOf
Creates a "NOT IN (..., ..., ...)" condition for this property. -
between
Creates a "BETWEEN ... AND ..." condition for this property. Finds objects with property value between and including the first and second value. -
equal
Creates an "equal ('=')" condition for this property usingStringOrder#CASE_SENSITIVE
.- See Also:
-
equal
Creates an "equal ('=')" condition for this property. -
notEqual
Creates a "not equal ('<>')" condition for this property usingStringOrder#CASE_SENSITIVE
.- See Also:
-
notEqual
Creates a "not equal ('<>')" condition for this property. -
greater
Creates a "greater than ('>')" condition for this property usingStringOrder#CASE_SENSITIVE
.- See Also:
-
greater
Creates a "greater than ('>')" condition for this property. -
greaterOrEqual
Creates a "greater or equal ('>=')" condition for this property. -
less
Creates a "less than ('<')" condition for this property usingStringOrder#CASE_SENSITIVE
.- See Also:
-
less
Creates a "less than ('<')" condition for this property. -
lessOrEqual
Creates a "less or equal ('<=')" condition for this property. -
contains
Creates a contains condition for this property usingStringOrder#CASE_SENSITIVE
.Note: for a String array property, use
containsElement(java.lang.String)
instead.- See Also:
-
contains
-
containsElement
For a String array, list or String-key map property, matches if at least one element equals the given value usingStringOrder#CASE_SENSITIVE
.- See Also:
-
containsElement
-
containsKeyValue
Deprecated.Use theequalKeyValue(String, String, StringOrder)
condition instead.For a String-key map property, matches if at least one key and value combination equals the given values usingStringOrder#CASE_SENSITIVE
. -
containsKeyValue
@Deprecated public PropertyQueryCondition<ENTITY> containsKeyValue(String key, String value, QueryBuilder.StringOrder order) Deprecated.Use theequalKeyValue(String, String, StringOrder)
condition instead.- See Also:
-
equalKeyValue
public PropertyQueryCondition<ENTITY> equalKeyValue(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is equal to the givenkey
andvalue
. -
greaterKeyValue
public PropertyQueryCondition<ENTITY> greaterKeyValue(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is greater than the givenkey
andvalue
. -
greaterOrEqualKeyValue
public PropertyQueryCondition<ENTITY> greaterOrEqualKeyValue(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is greater than or equal to the givenkey
andvalue
. -
lessKeyValue
public PropertyQueryCondition<ENTITY> lessKeyValue(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is less than the givenkey
andvalue
. -
lessOrEqualKeyValue
public PropertyQueryCondition<ENTITY> lessOrEqualKeyValue(String key, String value, QueryBuilder.StringOrder order) For a String-key map property, matches the combination where the key and value of at least one map entry is less than or equal to the givenkey
andvalue
. -
equalKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is equal to the givenkey
andvalue
. -
greaterKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is greater than the givenkey
andvalue
. -
greaterOrEqualKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is greater than or equal to the givenkey
andvalue
. -
lessKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is less than the givenkey
andvalue
. -
lessOrEqualKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is less than or equal to the givenkey
andvalue
. -
equalKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is equal to the givenkey
andvalue
. -
greaterKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is greater than the givenkey
andvalue
. -
greaterOrEqualKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is greater than or equal to the givenkey
andvalue
. -
lessKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is less than the givenkey
andvalue
. -
lessOrEqualKeyValue
For a String-key map property, matches the combination where the key and value of at least one map entry is less than or equal to the givenkey
andvalue
. -
startsWith
Creates a starts with condition usingStringOrder#CASE_SENSITIVE
.- See Also:
-
startsWith
-
endsWith
Creates an ends with condition usingStringOrder#CASE_SENSITIVE
.- See Also:
-
endsWith
-
oneOf
Creates an "IN (..., ..., ...)" condition for this property usingStringOrder#CASE_SENSITIVE
.- See Also:
-
oneOf
Creates an "IN (..., ..., ...)" condition for this property. -
equal
Creates an "equal ('=')" condition for this property. -
greater
Creates a "greater than ('>')" condition for this property. -
greaterOrEqual
Creates a "greater or equal ('>=')" condition for this property. -
less
Creates a "less than ('<')" condition for this property. -
lessOrEqual
Creates a "less or equal ('<=')" condition for this property. -
eq
Deprecated.Useequal(boolean)
instead.Creates an "equal ('=')" condition for this property. -
notEq
Deprecated.UsenotEqual(boolean)
instead.Creates an "not equal ('<>')" condition for this property. -
in
Deprecated.UseoneOf(int[])
instead.Creates an "IN (..., ..., ...)" condition for this property. -
in
Deprecated.UseoneOf(int[])
instead.Creates an "IN (..., ..., ...)" condition for this property. -
gt
Deprecated.Usegreater(short)
instead.Creates an "greater than ('>')" condition for this property. -
lt
Deprecated.Useless(short)
instead.Creates an "less than ('<')" condition for this property. -
isNotNull
Deprecated.UsenotNull()
instead.Creates an "IS NOT NULL" condition for this property. -
getEntityId
-
getId
-
toString
-
equalKeyValue(String, String, StringOrder)
condition instead.