# Class ListProperty<V extends Persistent>

java.lang.Object
org.apache.cayenne.exp.property.BaseProperty<List<V>>
org.apache.cayenne.exp.property.CollectionProperty<V,List<V>>
org.apache.cayenne.exp.property.ListProperty<V>

All Implemented Interfaces:
  `PathProperty<List<V>>, Property<List<V>>, RelationshipProperty<List<V>>`

public class ListProperty<V extends Persistent> extends CollectionProperty<V,List<V>>
Property that represents to-many relationship mapped on `List`.

    ObjectSelect.query(Artist.class)
         .where(Artist.PAINTING_ARRAY.contains(painting));

Since:
  4.2
See Also:
  - `org.apache.cayenne.exp.property`

- ## Field Summary

  ### Fields inherited from class CollectionProperty

  `entityType`

  ### Fields inherited from class BaseProperty

  `expressionSupplier, path, type`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ListProperty(CayennePath path, Expression expression, Class<V> entityType)`
  Constructs a new property with the given path and expression

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ListProperty<V>`
  `alias(String alias)`
  Creates alias with different name for this property
  `ListProperty<V>`
  `enclosing()`
  This operator allows to access properties of the enclosing query from the subquery.
  `ListProperty<V>`
  `outer()`
  Returns a version of this property that represents an OUTER join.

  ### Methods inherited from class CollectionProperty

  `contains, contains, contains, containsId, containsId, containsId, containsIds, containsIdsCollection, containsValue, containsValues, containsValuesCollection, flat, getEntityType, notContains, notContains, notContains, notContainsId, notContainsId, notContainsId, notContainsIds, notContainsIdsCollection, notContainsValue, notContainsValues, notContainsValuesCollection`

  ### Methods inherited from class BaseProperty

  `aggregate, 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, setInAll`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface PathProperty

  `dot, dot, dot, dot, dot`

  ### Methods inherited from interface Property

  `getAlias, getExpression, getName, getPath, getType`

  ### Methods inherited from interface RelationshipProperty

  `disjoint, disjointById, dot, dot, dot, dot, dot, dot, dot, exists, joint, notExists`

- ## Constructor Details

  - ### ListProperty

    protected ListProperty(CayennePath path, Expression expression, 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
      `entityType` - type of related entity

- ## Method Details

  - ### alias

    public ListProperty<V> alias(String alias)
    Creates alias with different name for this property
    Overrides:
      `alias` in class `BaseProperty<List<V extends Persistent>>`

  - ### outer

    public ListProperty<V> outer()
    Returns a version of this property that represents an OUTER join.

  - ### enclosing

    public ListProperty<V> enclosing()
    Description copied from class: `BaseProperty`
    This 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:
      `enclosing` in class `BaseProperty<List<V extends Persistent>>`
    Returns:
      property that will be translated relative to parent query