Package org.apache.cayenne.exp.property
Class SetProperty<V extends Persistent>
- java.lang.Object
-
- org.apache.cayenne.exp.property.BaseProperty<E>
-
- org.apache.cayenne.exp.property.CollectionProperty<V,Set<V>>
-
- org.apache.cayenne.exp.property.SetProperty<V>
-
- All Implemented Interfaces:
PathProperty<Set<V>>
,Property<Set<V>>
,RelationshipProperty<Set<V>>
public class SetProperty<V extends Persistent> extends CollectionProperty<V,Set<V>>
Property that represents to-many relationship mapped onSet
.- Since:
- 4.2
- See Also:
org.apache.cayenne.exp.property
-
-
Field Summary
-
Fields inherited from class org.apache.cayenne.exp.property.CollectionProperty
entityType
-
Fields inherited from class org.apache.cayenne.exp.property.BaseProperty
expressionSupplier, name, type
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SetProperty(String name, Expression expression, Class<V> entityType)
Constructs a new property with the given name and expression
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SetProperty<V>
alias(String alias)
Creates alias with different name for this propertySetProperty<V>
enclosing()
SetProperty<V>
outer()
Returns a version of this property that represents an OUTER join.-
Methods inherited from class org.apache.cayenne.exp.property.CollectionProperty
contains, contains, contains, containsId, containsId, containsId, flat, getEntityType, notContains, notContains, notContains, notContainsId, notContainsId, notContainsId
-
Methods inherited from class org.apache.cayenne.exp.property.BaseProperty
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, operator, operator, path, setIn, setInAll
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cayenne.exp.property.PathProperty
dot, dot, dot, dot, dot
-
Methods inherited from interface org.apache.cayenne.exp.property.Property
getAlias, getExpression, getName, getType
-
-
-
-
Constructor Detail
-
SetProperty
protected SetProperty(String name, Expression expression, Class<V> entityType)
Constructs a new property with the given name and expression- Parameters:
name
- of the property (will be used as alias for the expression)expression
- expression for propertyentityType
- type of related entity
-
-
Method Detail
-
alias
public SetProperty<V> alias(String alias)
Creates alias with different name for this property- Overrides:
alias
in classBaseProperty<Set<V extends Persistent>>
-
outer
public SetProperty<V> outer()
Returns a version of this property that represents an OUTER join. It is up to caller to ensure that the property corresponds to a relationship, as "outer" attributes make no sense.
-
enclosing
public SetProperty<V> enclosing()
- Overrides:
enclosing
in classBaseProperty<Set<V extends Persistent>>
- Returns:
- property that will be translated relative to parent query
-
-