Package org.apache.cayenne.exp.property
Class EntityProperty<E extends Persistent>
java.lang.Object
org.apache.cayenne.exp.property.BaseProperty<E>
org.apache.cayenne.exp.property.EntityProperty<E>
- All Implemented Interfaces:
- PathProperty<E>,- Property<E>,- RelationshipProperty<E>
- Direct Known Subclasses:
- SelfProperty
public class EntityProperty<E extends Persistent>
extends BaseProperty<E>
implements RelationshipProperty<E>
Property that represents to-one relationships.
 
Usage examples in where clause:
 ObjectSelect.query(Paintings.class)
      .where(Painting.TO_ARTIST.dot(Artist.ARTIST_NAME).eq("Pablo Picasso"));Usage examples in column select, in this case full Artist entity will be returned as the result:
 ObjectSelect
      .columnQuery(Paintings.class, Painting.PAINTING_TITLE, Painting.TO_ARTIST);
 - Since:
- 4.2
- See Also:
- 
Field SummaryFields inherited from class org.apache.cayenne.exp.property.BasePropertyexpressionSupplier, path, type
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedEntityProperty(CayennePath path, Expression expression, Class<E> type) Constructs a new property with the given name and expression
- 
Method SummaryModifier and TypeMethodDescriptionCreates alias with different name for this propertyThis operator allows to access properties of the enclosing query from the subquery.idsInCollection(Collection<?> ids) idsNotInCollection(Collection<?> ids) Deprecated, for removal: This API element is subject to removal in a future version.inId(Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofidsInCollection(Collection)Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofidsNotIn(Object...)ninId(Collection<Object> ids) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofidsNotInCollection(Collection)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
- 
Constructor Details- 
EntityPropertyConstructs a new property with the given name and expression- Parameters:
- path- of the property (will be used as alias for the expression)
- expression- expression for property
- type- of the property
- See Also:
 
 
- 
- 
Method Details- 
eqId
- 
inIdDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofidsInCollection(Collection)
- 
idsInCollection- Parameters:
- ids- to use for "IN" expression
- Returns:
- INexpression comparing path represented by this property with provided ids
- Since:
- 5.0
 
- 
inIdDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofidsIn(Object...)
- 
idsIn- Parameters:
- ids- to use for "IN" expression
- Returns:
- INexpression comparing path represented by this property with provided ids
- Since:
- 5.0
 
- 
neqId
- 
ninIdDeprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofidsNotInCollection(Collection)
- 
idsNotInCollection- Parameters:
- ids- collection of IDs to use for "- NOT IN" expression
- Returns:
- NOT INexpression comparing path represented by this property with provided IDs
- Since:
- 5.0
 
- 
ninId@Deprecated(since="5.0", forRemoval=true) public Expression ninId(Object firstId, Object... moreIds) Deprecated, for removal: This API element is subject to removal in a future version.since 5.0 in favour ofidsNotIn(Object...)
- 
idsNotIn- Parameters:
- ids- to use for "- NOT IN" expression
- Returns:
- NOT INexpression comparing path represented by this property with provided ids
- Since:
- 5.0
 
- 
aliasCreates alias with different name for this property- Overrides:
- aliasin class- BaseProperty<E extends Persistent>
 
- 
outerReturns a version of this property that represents an OUTER join.- Specified by:
- outerin interface- RelationshipProperty<E extends Persistent>
 
- 
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<E extends Persistent>
- Returns:
- property that will be translated relative to parent query
 
 
- 
idsIn(Object...)