Package io.objectbox
Class Property<ENTITY>
java.lang.Object
io.objectbox.Property<ENTITY>
- All Implemented Interfaces:
Serializable
Meta data describing a Property of an ObjectBox Entity.
Properties are typically used when defining
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 io.objectbox.converter.PropertyConverter>final Class<?>Type, which is converted to a type supported by the DB.final Stringfinal EntityInfo<ENTITY>final intfinal booleanfinal booleanfinal Stringfinal intfinal 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 io.objectbox.converter.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 io.objectbox.converter.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) For a String-key map property, matches if at least one key and value combination equals the given values usingStringOrder#CASE_SENSITIVE.containsKeyValue(String key, String value, QueryBuilder.StringOrder order) Creates an ends with condition usingStringOrder#CASE_SENSITIVE.endsWith(String value, QueryBuilder.StringOrder order) Deprecated.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 - toleranceas lower bound andvalue + toleranceas 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.intintgetId()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.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.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.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.Deprecated.Useless(short)instead.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.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.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
-
Property
-
-
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 - toleranceas lower bound andvalue + toleranceas 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. -
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 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
For a String-key map property, matches if at least one key and value combination equals the given values usingStringOrder#CASE_SENSITIVE. -
containsKeyValue
public PropertyQueryCondition<ENTITY> containsKeyValue(String key, String value, QueryBuilder.StringOrder order) - See Also:
-
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
@Internal public int getEntityId() -
getId
@Internal public int getId() -
toString
-
equal(boolean)instead.