Class ListProperty<V extends Persistent>
java.lang.Object
org.apache.cayenne.exp.property.BaseProperty<List<V>>
org.apache.cayenne.exp.property.CollectionProperty<V,List<V>>
org.apache.cayenne.exp.property.ListProperty<V>
- All Implemented Interfaces:
PathProperty<List<V>>, Property<List<V>>, RelationshipProperty<List<V>>
Property that represents to-many relationship mapped on
List.
ObjectSelect.query(Artist.class)
.where(Artist.PAINTING_ARRAY.contains(painting));
- Since:
- 4.2
- See Also:
-
Field Summary
Fields inherited from class CollectionProperty
entityTypeFields inherited from class BaseProperty
expressionSupplier, path, typeModifier and TypeFieldDescriptionprotected final Supplier<Expression> Expression provider for the propertyprotected final CayennePathPath of this propertyExplicit type of the property -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedListProperty(CayennePath path, Expression expression, Class<V> entityType) Constructs a new property with the given path and expression -
Method Summary
Modifier and TypeMethodDescriptionCreates alias with different name for this propertyThis operator allows to access properties of the enclosing query from the subquery.outer()Returns a version of this property that represents an OUTER join.Methods inherited from class CollectionProperty
contains, contains, contains, containsId, containsId, containsId, containsIds, containsIdsCollection, containsValue, containsValues, containsValuesCollection, flat, getEntityType, notContains, notContains, notContains, notContainsId, notContainsId, notContainsId, notContainsIds, notContainsIdsCollection, notContainsValue, notContainsValues, notContainsValuesCollectionModifier and TypeMethodDescriptioncontains(Collection<V> values) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.containsValue(V)Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.containsValues(V...)containsId(Object id) containsId(Object firstId, Object... moreId) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.containsIds(Object...)containsId(Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.containsIdsCollection(Collection)containsIds(Object... ids) containsIdsCollection(Collection<?> ids) containsValue(V value) final ExpressioncontainsValues(V... values) containsValuesCollection(Collection<V> values) flat()Create new "flat" property for toMany relationship.notContains(Collection<V> values) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.notContainsValuesCollection(Collection)notContains(V value) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.notContainsValue(V)final ExpressionnotContains(V firstValue, V... moreValues) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.notContainsValues(V...)notContainsId(Object id) notContainsId(Object firstId, Object... moreId) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.notContainsIds(Object...)notContainsId(Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofCollectionProperty.notContainsIdsCollection(Collection)notContainsIds(Object... ids) notContainsIdsCollection(Collection<?> ids) notContainsValue(V value) final ExpressionnotContainsValues(V... values) notContainsValuesCollection(Collection<V> values) Methods inherited from class BaseProperty
aggregate, asc, ascInsensitive, ascInsensitives, ascs, count, countDistinct, desc, descInsensitive, descInsensitives, descs, eq, eq, equals, function, function, getAlias, getExpression, getFrom, getFromAll, getName, getPath, getType, hashCode, in, in, in, isFalse, isNotNull, isNull, isTrue, ne, ne, nin, nin, nin, operator, operator, setIn, setInAllModifier and TypeMethodDescription<T> BaseProperty<T> asc()ascs()count()desc()descs()eq(BaseProperty<?> value) boolean<T> BaseProperty<T> <T> BaseProperty<T> function(String functionName, Class<T> returnType, BaseProperty<?>... arguments) getAlias()This method returns fresh copy of the expression for each call.Extracts property value from an object using JavaBean-compatible introspection with one addition - a property can be a dot-separated property name path.getFromAll(Collection<?> beans) Extracts property value from a collection of objects using JavaBean-compatible introspection with one addition - a property can be a dot-separated property name path.getName()getPath()getType()inthashCode()in(Collection<List<V>> values) in(ColumnSelect<? extends List<V>> subquery) isFalse()isNull()isTrue()ne(BaseProperty<?> value) nin(Collection<List<V>> values) nin(ColumnSelect<? extends List<V>> subquery) <T> BaseProperty<T> <T> BaseProperty<T> operator(String operator, Class<T> returnType, BaseProperty<?>... arguments) voidSets a property value in 'obj' using JavaBean-compatible introspection with one addition - a property can be a dot-separated property name path.voidsetInAll(Collection<?> beans, List<V> value) Sets a property value in a collection of objects using JavaBean-compatible introspection with one addition - a property can be a dot-separated property name path.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PathProperty
dot, dot, dot, dot, dotModifier and TypeMethodDescriptiondefault BaseProperty<Object> Constructs a property path by appending the argument to the existing property separated by a dot.default <T> BaseProperty<T> dot(BaseProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <T> DateProperty<T> dot(DateProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <T extends Number>
NumericProperty<T> dot(NumericProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <T extends CharSequence>
StringProperty<T> dot(StringProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.Methods inherited from interface RelationshipProperty
disjoint, disjointById, dot, dot, dot, dot, dot, dot, dot, exists, joint, notExistsModifier and TypeMethodDescriptiondefault PrefetchTreeNodedisjoint()Returns a prefetch tree that follows this property path, potentially spanning a number of phantom nodes, and having a single leaf with "disjoint" prefetch semantics.default PrefetchTreeNodeReturns a prefetch tree that follows this property path, potentially spanning a number of phantom nodes, and having a single leaf with "disjoint by id" prefetch semantics.default <T> BaseIdProperty<T> dot(BaseIdProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <T extends EmbeddableObject>
EmbeddableProperty<T> dot(EmbeddableProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <T extends Persistent>
EntityProperty<T> dot(EntityProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <T extends Persistent>
ListProperty<T> dot(ListProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <K, V extends Persistent>
MapProperty<K, V> dot(MapProperty<K, V> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <T extends Number>
NumericIdProperty<T> dot(NumericIdProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default <T extends Persistent>
SetProperty<T> dot(SetProperty<T> property) Constructs a new property path by appending the argument to the existing property separated by a dot.default Expressionexists()default PrefetchTreeNodejoint()Returns a prefetch tree that follows this property path, potentially spanning a number of phantom nodes, and having a single leaf with "joint" prefetch semantics.default Expression
-
Constructor Details
-
ListProperty
Constructs a new property with the given path and expression- Parameters:
path- of the property (will be used as alias for the expression)expression- expression for propertyentityType- type of related entity
-
-
Method Details
-
alias
Creates alias with different name for this property- Overrides:
aliasin classBaseProperty<List<V extends Persistent>>
-
outer
Returns a version of this property that represents an OUTER join. -
enclosing
Description copied from class:BasePropertyThis operator allows to access properties of the enclosing query from the subquery. It allows multiple nesting levels to access a corresponding query in case of multiple levels of subqueries. Example:ObjectSelect.query(Artist.class) .where(ExpressionFactory.notExists(ObjectSelect.query(Painting.class) .where(Painting.TO_ARTIST.eq(Artist.ARTIST_ID_PK_PROPERTY.enclosing()))))- Overrides:
enclosingin classBaseProperty<List<V extends Persistent>>- Returns:
- property that will be translated relative to parent query
-
CollectionProperty.containsValuesCollection(Collection)