org.apache.cayenne.exp
Class Property<E>

java.lang.Object
  extended by org.apache.cayenne.exp.Property<E>
Type Parameters:
E - The type this property returns.

public class Property<E>
extends Object

A property in a DataObject.

Used to construct Expressions quickly and with type-safety, and to construct Orderings

Instances of this class are immutable

Since:
3.2

Constructor Summary
Property(String name)
          Constructs a new property with the given name.
 
Method Summary
 Ordering asc()
           
 Ordering ascInsensitive()
           
 List<Ordering> ascInsensitives()
           
 List<Ordering> ascs()
           
 Expression between(E lower, E upper)
           
 Ordering desc()
           
 Ordering descInsensitive()
           
 List<Ordering> descInsensitives()
           
 List<Ordering> descs()
           
 PrefetchTreeNode disjoint()
           
 PrefetchTreeNode disjointById()
           
<T> Property<T>
dot(Property<T> property)
           
 Property<Object> dot(String property)
           
 Expression eq(E value)
           
 String getName()
           
 Expression gt(E value)
           
 Expression gte(E value)
           
 Expression in(Collection<E> values)
           
 Expression in(E firstValue, E... moreValues)
           
 Expression isFalse()
           
 Expression isNotNull()
           
 Expression isNull()
           
 Expression isTrue()
           
 PrefetchTreeNode joint()
           
 Expression like(E value)
           
 Expression likeInsensitive(E value)
           
 Expression lt(E value)
           
 Expression lte(E value)
           
 Expression ne(E value)
           
 Expression nin(Collection<E> values)
           
 Expression nin(E firstValue, E... moreValues)
           
 Expression nlike(E value)
           
 Expression nlikeInsensitive(E value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Property

public Property(String name)
Constructs a new property with the given name.

Method Detail

getName

public String getName()
Returns:
Name of the property in the object.

dot

public Property<Object> dot(String property)
Returns:
Constructs a property path by appending the argument to the existing property separated by a dot

dot

public <T> Property<T> dot(Property<T> property)
Returns:
Constructs a property path by appending the argument to the existing property separated by a dot

isNull

public Expression isNull()
Returns:
An expression representing null.

isNotNull

public Expression isNotNull()
Returns:
An expression representing a non-null value.

isTrue

public Expression isTrue()
Returns:
An expression representing equality to TRUE.

isFalse

public Expression isFalse()
Returns:
An expression representing equality to FALSE.

eq

public Expression eq(E value)
Returns:
An expression representing equality to a value.

ne

public Expression ne(E value)
Returns:
An expression representing inequality to a value.

like

public Expression like(E value)
Returns:
An expression for a Database "Like" query.

likeInsensitive

public Expression likeInsensitive(E value)
Returns:
An expression for a case insensitive "Like" query.

nlike

public Expression nlike(E value)
Returns:
An expression for a Database "NOT LIKE" query.

nlikeInsensitive

public Expression nlikeInsensitive(E value)
Returns:
An expression for a case insensitive "NOT LIKE" query.

between

public Expression between(E lower,
                          E upper)
Parameters:
lower - The lower bound.
upper - The upper bound.
Returns:
An expression checking for objects between a lower and upper bound inclusive

in

public Expression in(E firstValue,
                     E... moreValues)
Returns:
An expression for finding objects with values in the given set.

nin

public Expression nin(E firstValue,
                      E... moreValues)
Returns:
An expression for finding objects with values not in the given set.

in

public Expression in(Collection<E> values)
Returns:
An expression for finding objects with values in the given set.

nin

public Expression nin(Collection<E> values)
Returns:
An expression for finding objects with values not in the given set.

gt

public Expression gt(E value)
Returns:
A greater than Expression.

gte

public Expression gte(E value)
Returns:
A greater than or equal to Expression.

lt

public Expression lt(E value)
Returns:
A less than Expression.

lte

public Expression lte(E value)
Returns:
A less than or equal to Expression.

asc

public Ordering asc()
Returns:
Ascending sort orderings on this property.

ascs

public List<Ordering> ascs()
Returns:
Ascending sort orderings on this property.

ascInsensitive

public Ordering ascInsensitive()
Returns:
Ascending case insensitive sort orderings on this property.

ascInsensitives

public List<Ordering> ascInsensitives()
Returns:
Ascending case insensitive sort orderings on this property.

desc

public Ordering desc()
Returns:
Descending sort orderings on this property.

descs

public List<Ordering> descs()
Returns:
Descending sort orderings on this property.

descInsensitive

public Ordering descInsensitive()
Returns:
Descending case insensitive sort orderings on this property.

descInsensitives

public List<Ordering> descInsensitives()
Returns:
Descending case insensitive sort orderings on this property.

joint

public PrefetchTreeNode joint()

disjoint

public PrefetchTreeNode disjoint()

disjointById

public PrefetchTreeNode disjointById()


Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.