|
1 | 1 | /* |
2 | | - * Copyright 2017 ObjectBox Ltd. All rights reserved. |
| 2 | + * Copyright 2017-2019 ObjectBox Ltd. All rights reserved. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
29 | 29 | import io.objectbox.query.QueryCondition.PropertyCondition.Operation; |
30 | 30 |
|
31 | 31 | /** |
32 | | - * Meta data describing a property |
| 32 | + * Meta data describing a property of an ObjectBox entity. |
| 33 | + * Properties are typically used to define query criteria using {@link io.objectbox.query.QueryBuilder}. |
33 | 34 | */ |
34 | 35 | @SuppressWarnings("WeakerAccess,UnusedReturnValue, unused") |
35 | 36 | public class Property<ENTITY> implements Serializable { |
@@ -89,48 +90,48 @@ public Property(EntityInfo<ENTITY> entity, int ordinal, int id, Class<?> type, S |
89 | 90 | this.customType = customType; |
90 | 91 | } |
91 | 92 |
|
92 | | - /** Creates an "equal ('=')" condition for this property. */ |
| 93 | + /** Creates an "equal ('=')" condition for this property. */ |
93 | 94 | public QueryCondition eq(Object value) { |
94 | 95 | return new PropertyCondition(this, Operation.EQUALS, value); |
95 | 96 | } |
96 | 97 |
|
97 | | - /** Creates an "not equal ('<>')" condition for this property. */ |
| 98 | + /** Creates an "not equal ('<>')" condition for this property. */ |
98 | 99 | public QueryCondition notEq(Object value) { |
99 | 100 | return new PropertyCondition(this, Operation.NOT_EQUALS, value); |
100 | 101 | } |
101 | 102 |
|
102 | | - /** Creates an "BETWEEN ... AND ..." condition for this property. */ |
| 103 | + /** Creates an "BETWEEN ... AND ..." condition for this property. */ |
103 | 104 | public QueryCondition between(Object value1, Object value2) { |
104 | 105 | Object[] values = {value1, value2}; |
105 | 106 | return new PropertyCondition(this, Operation.BETWEEN, values); |
106 | 107 | } |
107 | 108 |
|
108 | | - /** Creates an "IN (..., ..., ...)" condition for this property. */ |
| 109 | + /** Creates an "IN (..., ..., ...)" condition for this property. */ |
109 | 110 | public QueryCondition in(Object... inValues) { |
110 | 111 | return new PropertyCondition(this, Operation.IN, inValues); |
111 | 112 | } |
112 | 113 |
|
113 | | - /** Creates an "IN (..., ..., ...)" condition for this property. */ |
| 114 | + /** Creates an "IN (..., ..., ...)" condition for this property. */ |
114 | 115 | public QueryCondition in(Collection<?> inValues) { |
115 | 116 | return in(inValues.toArray()); |
116 | 117 | } |
117 | 118 |
|
118 | | - /** Creates an "greater than ('>')" condition for this property. */ |
| 119 | + /** Creates an "greater than ('>')" condition for this property. */ |
119 | 120 | public QueryCondition gt(Object value) { |
120 | 121 | return new PropertyCondition(this, Operation.GREATER_THAN, value); |
121 | 122 | } |
122 | 123 |
|
123 | | - /** Creates an "less than ('<')" condition for this property. */ |
| 124 | + /** Creates an "less than ('<')" condition for this property. */ |
124 | 125 | public QueryCondition lt(Object value) { |
125 | 126 | return new PropertyCondition(this, Operation.LESS_THAN, value); |
126 | 127 | } |
127 | 128 |
|
128 | | - /** Creates an "IS NULL" condition for this property. */ |
| 129 | + /** Creates an "IS NULL" condition for this property. */ |
129 | 130 | public QueryCondition isNull() { |
130 | 131 | return new PropertyCondition(this, Operation.IS_NULL, null); |
131 | 132 | } |
132 | 133 |
|
133 | | - /** Creates an "IS NOT NULL" condition for this property. */ |
| 134 | + /** Creates an "IS NOT NULL" condition for this property. */ |
134 | 135 | public QueryCondition isNotNull() { |
135 | 136 | return new PropertyCondition(this, Operation.IS_NOT_NULL, null); |
136 | 137 | } |
|
0 commit comments