public class MapProperty<K,V extends Persistent> extends BaseProperty<Map<K,V>> implements RelationshipProperty<Map<K,V>>
Map
.org.apache.cayenne.exp.property
Modifier and Type | Field and Description |
---|---|
protected Class<V> |
entityType |
protected Class<K> |
keyType |
expressionSupplier, name, type
Modifier | Constructor and Description |
---|---|
protected |
MapProperty(String name,
Expression expression,
Class<K> keyType,
Class<V> entityType)
Constructs a new property with the given name and expression
|
Modifier and Type | Method and Description |
---|---|
MapProperty<K,V> |
alias(String alias)
Creates alias with different name for this property
|
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) |
MapProperty<K,V> |
enclosing() |
EntityProperty<V> |
flat()
Create new "flat" property for toMany relationship.
|
protected Class<V> |
getEntityType() |
protected Class<K> |
getKeyType() |
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) |
MapProperty<K,V> |
outer()
Returns a version of this property that represents an OUTER join.
|
asc, ascInsensitive, ascInsensitives, ascs, count, countDistinct, desc, descInsensitive, descInsensitives, descs, eq, eq, equals, function, function, getAlias, getExpression, getFrom, getFromAll, getName, getType, hashCode, in, in, in, isFalse, isNotNull, isNull, isTrue, ne, ne, nin, nin, nin, path, setIn, setInAll
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
disjoint, disjointById, dot, dot, dot, dot, dot, dot, dot, joint
dot, dot, dot, dot, dot
getAlias, getExpression, getName, getType
protected Class<V extends Persistent> entityType
protected MapProperty(String name, Expression expression, Class<K> keyType, Class<V> entityType)
name
- of the property (will be used as alias for the expression)expression
- expression for propertykeyType
- type of keys of the propertyentityType
- type of related entitiesPropertyFactory.createMap(String, Expression, Class, Class)
public 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(Painting.class))
.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 notContains(Collection<V> values)
@SafeVarargs public final Expression notContains(V firstValue, V... moreValues)
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 MapProperty<K,V> alias(String alias)
alias
in class BaseProperty<Map<K,V extends Persistent>>
public MapProperty<K,V> outer()
outer
in interface RelationshipProperty<Map<K,V extends Persistent>>
protected Class<V> getEntityType()
public MapProperty<K,V> enclosing()
enclosing
in class BaseProperty<Map<K,V extends Persistent>>
Copyright © 2001–2020 Apache Cayenne. All rights reserved.