public abstract class CollectionProperty<V extends Persistent,E extends Collection<V>> extends BaseProperty<E> implements RelationshipProperty<E>
ListProperty
and SetProperty
Modifier and Type | Field and Description |
---|---|
protected Class<V> |
entityType |
expressionSupplier, name, type
Modifier | Constructor and Description |
---|---|
protected |
CollectionProperty(String name,
Expression expression,
Class<? super E> collectionType,
Class<V> entityType)
Constructs a new property with the given name and expression
|
Modifier and Type | Method and Description |
---|---|
Expression |
contains(Collection<V> values) |
Expression |
contains(V value) |
Expression |
contains(V firstValue,
V... moreValues) |
Expression |
containsId(Collection<Object> ids) |
Expression |
containsId(Object id) |
Expression |
containsId(Object firstId,
Object... moreId) |
EntityProperty<V> |
flat()
Create new "flat" property for toMany relationship.
|
protected Class<V> |
getEntityType() |
Expression |
notContains(Collection<V> values) |
Expression |
notContains(V value) |
Expression |
notContains(V firstValue,
V... moreValues) |
Expression |
notContainsId(Collection<Object> ids) |
Expression |
notContainsId(Object id) |
Expression |
notContainsId(Object firstId,
Object... moreId) |
alias, asc, ascInsensitive, ascInsensitives, ascs, count, countDistinct, desc, descInsensitive, descInsensitives, descs, enclosing, eq, eq, equals, function, function, getAlias, getExpression, getFrom, getFromAll, getName, getType, hashCode, in, in, in, isFalse, isNotNull, isNull, isTrue, ne, ne, nin, nin, nin, operator, operator, path, setIn, setInAll
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
disjoint, disjointById, dot, dot, dot, dot, dot, dot, dot, joint, outer
dot, dot, dot, dot, dot
getAlias, getExpression, getName, getType
protected Class<V extends Persistent> entityType
protected CollectionProperty(String name, Expression expression, Class<? super E> collectionType, Class<V> entityType)
name
- of the property (will be used as alias for the expression)expression
- expression for propertycollectionType
- type of the collectionentityType
- type of related entitypublic EntityProperty<V> flat()
Create new "flat" property for toMany relationship.
Example:
List<Object[]> result = ObjectSelect
.columnQuery(Artist.class, Artist.ARTIST_NAME, Artist.PAINTING_ARRAY.flat())
.select(context);
public Expression contains(V value)
public Expression notContains(V value)
@SafeVarargs public final Expression contains(V firstValue, V... moreValues)
public Expression contains(Collection<V> values)
public Expression containsId(Object id)
id
- object idpublic Expression containsId(Object firstId, Object... moreId)
public Expression containsId(Collection<Object> ids)
public Expression notContainsId(Object id)
id
- object idpublic Expression notContainsId(Object firstId, Object... moreId)
public Expression notContainsId(Collection<Object> ids)
public Expression notContains(Collection<V> values)
@SafeVarargs public final Expression notContains(V firstValue, V... moreValues)
Copyright © 2001–2021 Apache Cayenne. All rights reserved.