Package org.apache.cayenne.exp.property
Class MapProperty<K,V extends Persistent> 
java.lang.Object
org.apache.cayenne.exp.property.BaseProperty<Map<K,V>>
 
org.apache.cayenne.exp.property.MapProperty<K,V> 
- All Implemented Interfaces:
- PathProperty<Map<K,,- V>> - Property<Map<K,,- V>> - RelationshipProperty<Map<K,- V>> 
public class MapProperty<K,V extends Persistent> 
extends BaseProperty<Map<K,V>>
implements RelationshipProperty<Map<K,V>>  
Property that represents to-many relationship mapped on 
Map.- Since:
- 4.2
- See Also:
- 
Field SummaryFieldsFields inherited from class org.apache.cayenne.exp.property.BasePropertyexpressionSupplier, path, type
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedMapProperty(CayennePath path, Expression expression, Class<K> keyType, Class<V> entityType) Constructs a new property with the given path and expression
- 
Method SummaryModifier and TypeMethodDescriptionCreates alias with different name for this propertycontains(Collection<V> values) Deprecated, for removal: This API element is subject to removal in a future version.final ExpressionDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofcontainsValues(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 ofcontainsIds(Object...)containsId(Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofcontainsIdsCollection(Collection)containsIds(Object... ids) containsIdsCollection(Collection<?> ids) final ExpressioncontainsValues(V... values) containsValuesCollection(Collection<V> values) This operator allows to access properties of the enclosing query from the subquery.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 ofnotContainsValuesCollection(Collection)notContains(V value) 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 ofnotContainsValues(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 ofnotContainsIds(Object...)notContainsId(Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofnotContainsIdsCollection(Collection)notContainsIds(Object... ids) notContainsIdsCollection(Collection<?> ids) final ExpressionnotContainsValues(V... values) notContainsValuesCollection(Collection<V> values) outer()Returns a version of this property that represents an OUTER join.Methods inherited from class org.apache.cayenne.exp.property.BasePropertyaggregate, 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, setInAllMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cayenne.exp.property.PathPropertydot, dot, dot, dot, dot
- 
Field Details- 
keyType
- 
entityType
 
- 
- 
Constructor Details- 
MapPropertyprotected MapProperty(CayennePath path, Expression expression, Class<K> keyType, Class<V> entityType) 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 property
- keyType- type of keys of the property
- entityType- type of related entities
- See Also:
 
 
- 
- 
Method Details- 
flatCreate 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);
- 
contains- Returns:
- An expression representing equality to a value.
 
- 
notContains- Returns:
- An expression representing inequality to a value.
 
- 
contains@Deprecated(since="5.0", forRemoval=true) @SafeVarargs public final Expression contains(V firstValue, V... moreValues) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofcontainsValues(V...)- Returns:
- An expression for finding objects with values in the given set.
 
- 
containsValues- Returns:
- An expression for finding objects with values in the given set.
- Since:
- 5.0
 
- 
containsDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofcontainsValuesCollection(Collection)- Returns:
- An expression for finding objects with values in the given set.
 
- 
containsValuesCollection- Returns:
- An expression for finding objects with values in the given set.
- Since:
- 5.0
 
- 
notContainsDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofnotContainsValuesCollection(Collection)- Returns:
- An expression for finding objects with values not in the given set.
 
- 
notContainsValuesCollection- Returns:
- An expression for finding objects with values in the given set.
- Since:
- 5.0
 
- 
notContains@Deprecated(since="5.0", forRemoval=true) @SafeVarargs public final Expression notContains(V firstValue, V... moreValues) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofnotContainsValues(V...)- Returns:
- An expression for finding objects with values not in the given set.
 
- 
notContainsValues- Returns:
- An expression for finding objects with values not in the given set.
- Since:
- 5.0
 
- 
containsId- Parameters:
- id- object id
- Returns:
- An expression for finding object with given id.
 
- 
containsId@Deprecated(since="5.0", forRemoval=true) public Expression containsId(Object firstId, Object... moreId) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofcontainsIds(Object...)- Returns:
- An expression for finding objects with given id set
 
- 
containsIds- Returns:
- An expression for finding objects with given id set
- Since:
- 5.0
 
- 
containsIdDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofcontainsIdsCollection(Collection)- Returns:
- An expression for finding objects with given id set.
 
- 
containsIdsCollection- Returns:
- An expression for finding objects with given id set.
- Since:
- 5.0
 
- 
notContainsId- Parameters:
- id- object id
- Returns:
- An expression for finding object without given id.
 
- 
notContainsId@Deprecated(since="5.0", forRemoval=true) public Expression notContainsId(Object firstId, Object... moreId) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofnotContainsIds(Object...)- Returns:
- An expression for finding objects without given id set.
 
- 
notContainsIds- Returns:
- An expression for finding objects without given id set.
- Since:
- 5.0
 
- 
notContainsIdDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofnotContainsIdsCollection(Collection)- Returns:
- An expression for finding objects without given id set.
 
- 
notContainsIdsCollection- Returns:
- An expression for finding objects without given id set.
- Since:
- 5.0
 
- 
aliasCreates alias with different name for this property- Overrides:
- aliasin class- BaseProperty<Map<K,- V extends Persistent>> 
 
- 
outerReturns a version of this property that represents an OUTER join.- Specified by:
- outerin interface- RelationshipProperty<K>
 
- 
getKeyType- Returns:
- type of keys in represented attribute
 
- 
getEntityType- Returns:
- type of object entity in represented attribute
 
- 
enclosingDescription 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 class- BaseProperty<Map<K,- V extends Persistent>> 
- Returns:
- property that will be translated relative to parent query
 
 
- 
containsValuesCollection(Collection)