Package org.apache.cayenne.exp
Class Property<E>
java.lang.Object
org.apache.cayenne.exp.property.BaseProperty<E>
org.apache.cayenne.exp.Property<E>
- Type Parameters:
- E- The type this property returns.
- All Implemented Interfaces:
- ComparableProperty<E>,- PathProperty<E>,- Property<E>,- RelationshipProperty<E>
@Deprecated
public class Property<E>
extends BaseProperty<E>
implements ComparableProperty<E>, RelationshipProperty<E>
Deprecated.
 A property in a DataObject.
 
Used to construct Expressions quickly and with type-safety, and to construct Orderings.
Instances of this class are immutable.
 Must be created via factory methods Property.create(..)
 
- Since:
- 4.0
- See Also:
- 
Field SummaryFieldsFields inherited from class org.apache.cayenne.exp.property.BasePropertyexpressionSupplier, name, type
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabs()Deprecated.Deprecated.Creates alias with different name for this propertyavg()Deprecated.Deprecated.Arguments will be converted as follows: if argument is aPropertythan its expression will be used if argument is aExpressionthan it will be used as is all other values will be converted to StringDeprecated.Creates an expression for a database "LIKE" query with the value converted to a pattern matching anywhere in the String.containsIgnoreCase(String value) Deprecated.Same ascontains(String), only using case-insensitive comparison.static <T> Property<T> Deprecated.Creates property with name and typestatic <T> Property<T> create(String name, Expression expression, Class<? super T> type) Deprecated.Creates property with name, expression and typestatic <T> Property<T> create(Expression expression, Class<? super T> type) Deprecated.Creates property with expression and typestatic <T extends Persistent>
 Property<T> createSelf(Class<? super T> type) Deprecated.Creates "self" Property for persistent class.Deprecated.Constructs a property path by appending the argument to the existing property separated by a dot.<T> Property<T> Deprecated.Deprecated.Creates an expression for a database "LIKE" query with the value converted to a pattern matching the tail of a String.endsWithIgnoreCase(String value) Deprecated.Same asendsWith(String), only using case-insensitive comparison.<T extends Persistent>
 Property<T> Deprecated.Create new "flat" property for toMany relationship.length()Deprecated.Deprecated.Deprecated.likeIgnoreCase(String pattern) Deprecated.Deprecated.Deprecated.lower()Deprecated.max()Deprecated.min()Deprecated.Deprecated.Deprecated.nlikeIgnoreCase(String value) Deprecated.outer()Deprecated.Returns a version of this property that represents an OUTER join.sqrt()Deprecated.startsWith(String value) Deprecated.Creates an expression for a database "LIKE" query with the value converted to a pattern matching the beginning of a String.startsWithIgnoreCase(String value) Deprecated.Same asstartsWith(String), only using case-insensitive comparison.substring(int offset, int length) Deprecated.sum()Deprecated.trim()Deprecated.upper()Deprecated.Methods inherited from class org.apache.cayenne.exp.property.BasePropertyasc, ascInsensitive, ascInsensitives, ascs, count, countDistinct, desc, descInsensitive, descInsensitives, descs, enclosing, 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, setInAllMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cayenne.exp.property.ComparablePropertybetween, between, gt, gt, gte, gte, lt, lt, lte, lteMethods inherited from interface org.apache.cayenne.exp.property.PathPropertydot, dot, dot, dotMethods inherited from interface org.apache.cayenne.exp.property.PropertygetAlias, getExpression, getName, getType
- 
Field Details- 
COUNTDeprecated.since 4.2 usePropertyFactory.COUNTProperty that can be used in COUNT(*) queries List<Object[]> result = ObjectSelect .columnQuery(Artist.class, Property.COUNT, Artist.ARTIST_NAME) .having(Property.COUNT.gt(1L)) .select(context);
 
- 
- 
Constructor Details- 
PropertyDeprecated.Constructs a new property with the given name and type.- Parameters:
- name- of the property (usually it's obj path)
- type- of the property
- See Also:
 
- 
PropertyDeprecated.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 property
- type- of the property
- See Also:
 
 
- 
- 
Method Details- 
likeDeprecated.- Parameters:
- pattern- a pattern matching property value. Pattern may include "_" and "%" wildcard symbols to match any single character or a sequence of characters. To prevent "_" and "%" from being treated as wildcards, they need to be escaped and escape char passed with- like(String, char)method.
- Returns:
- An expression for a Database "LIKE" query.
 
- 
likeDeprecated.- Parameters:
- pattern- a properly escaped pattern matching property value. Pattern may include "_" and "%" wildcard symbols to match any single character or a sequence of characters.
- escapeChar- an escape character used in the pattern to escape "%" and "_".
- Returns:
- An expression for a Database "LIKE" query.
 
- 
likeIgnoreCaseDeprecated.- Returns:
- An expression for a case insensitive "LIKE" query.
 
- 
nlikeDeprecated.- Returns:
- An expression for a Database "NOT LIKE" query.
 
- 
nlikeIgnoreCaseDeprecated.- Returns:
- An expression for a case insensitive "NOT LIKE" query.
 
- 
containsDeprecated.Creates an expression for a database "LIKE" query with the value converted to a pattern matching anywhere in the String.- Parameters:
- substring- a String to match against property value. "_" and "%" symbols are NOT treated as wildcards and are escaped when converted to a LIKE expression.
- Returns:
- a newly created expression.
 
- 
startsWithDeprecated.Creates an expression for a database "LIKE" query with the value converted to a pattern matching the beginning of a String.- Parameters:
- value- a String to match against property value. "_" and "%" symbols are NOT treated as wildcards and are escaped when converted to a LIKE expression.
- Returns:
- a newly created expression.
 
- 
endsWithDeprecated.Creates an expression for a database "LIKE" query with the value converted to a pattern matching the tail of a String.- Parameters:
- value- a String to match against property value. "_" and "%" symbols are NOT treated as wildcards and are escaped when converted to a LIKE expression.
- Returns:
- a newly created expression.
 
- 
containsIgnoreCaseDeprecated.Same ascontains(String), only using case-insensitive comparison.
- 
startsWithIgnoreCaseDeprecated.Same asstartsWith(String), only using case-insensitive comparison.
- 
endsWithIgnoreCaseDeprecated.Same asendsWith(String), only using case-insensitive comparison.
- 
lengthDeprecated.- See Also:
 
- 
locateDeprecated.- See Also:
 
- 
locateDeprecated.- See Also:
 
- 
trimDeprecated.- See Also:
 
- 
upperDeprecated.- See Also:
 
- 
lowerDeprecated.- See Also:
 
- 
concatDeprecated.Arguments will be converted as follows: - if argument is a Propertythan its expression will be used
- if argument is a Expressionthan it will be used as is
- all other values will be converted to String
 Usage: Property<String> fullName = Artist.FIRST_NAME.concat(" ", Artist.SECOND_NAME);- See Also:
 
- if argument is a 
- 
substringDeprecated.- See Also:
 
- 
avgDeprecated.- See Also:
 
- 
sumDeprecated.- See Also:
 
- 
modDeprecated.- See Also:
 
- 
absDeprecated.- See Also:
 
- 
sqrtDeprecated.- See Also:
 
- 
flatDeprecated.Create 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);
- 
aliasDeprecated.Creates alias with different name for this property- Overrides:
- aliasin class- BaseProperty<E>
 
- 
outerDeprecated.Description copied from interface:RelationshipPropertyReturns 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.- Specified by:
- outerin interface- RelationshipProperty<E>
 
- 
dotDeprecated.
- 
dotDeprecated.Constructs a property path by appending the argument to the existing property separated by a dot.- Specified by:
- dotin interface- PathProperty<E>
- Returns:
- a newly created Property object.
 
- 
maxDeprecated.- Specified by:
- maxin interface- ComparableProperty<E>
- See Also:
 
- 
minDeprecated.- Specified by:
- minin interface- ComparableProperty<E>
- See Also:
 
- 
createDeprecated.Creates property with name and type- See Also:
 
- 
createDeprecated.Creates property with expression and type- See Also:
 
- 
createDeprecated.Creates property with name, expression and type- See Also:
 
- 
createSelfDeprecated.Creates "self" Property for persistent class. This property can be used to select full object along with some of it properties (or properties that can be resolved against query root) Here is sample code, that will select all Artists and count of their Paintings: Property<Artist> artistFull = Property.createSelf(Artist.class); List<Object[]> result = ObjectSelect .columnQuery(Artist.class, artistFull, Artist.PAINTING_ARRAY.count()) .select(context);
 
- 
PropertyFactoryandorg.apache.cayenne.exp.propertypackage.