Package org.apache.cayenne.exp.property
Class DateProperty<E>
java.lang.Object
org.apache.cayenne.exp.property.BaseProperty<E>
org.apache.cayenne.exp.property.DateProperty<E>
- All Implemented Interfaces:
- ComparableProperty<E>,- Property<E>
Property that represents date/time attribute.
 
 ObjectSelect.query(Artist.class)
      .where(Artist.DATE_OF_BIRTH.year().lte(1900))
      .or(Artist.DATE_OF_BIRTH.month().between(6, 8))
 - Since:
- 4.2
- See Also:
- 
Field SummaryFields inherited from class org.apache.cayenne.exp.property.BasePropertyexpressionSupplier, path, type
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDateProperty(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 propertyIt is a caller responsibility to check that underlying attribute has day componentIt is a caller responsibility to check that underlying attribute has day componentThis operator allows to access properties of the enclosing query from the subquery.hour()It is a caller responsibility to check that underlying attribute has time componentmax()min()minute()It is a caller responsibility to check that underlying attribute has time componentmonth()It is a caller responsibility to check that underlying attribute has month componentsecond()It is a caller responsibility to check that underlying attribute has time componentyear()It is a caller responsibility to check that underlying attribute has year componentMethods 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, wait
- 
Constructor Details- 
DatePropertyConstructs 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
 
 
- 
- 
Method Details- 
yearIt is a caller responsibility to check that underlying attribute has year component- Returns:
- new property that represents year component of this date property
- See Also:
 
- 
monthIt is a caller responsibility to check that underlying attribute has month component- Returns:
- new property that represents month component of this date property
- See Also:
 
- 
dayOfMonthIt is a caller responsibility to check that underlying attribute has day component- Returns:
- new property that represents day of month component of this date property
- See Also:
 
- 
dayOfYearIt is a caller responsibility to check that underlying attribute has day component- Returns:
- new property that represents day of year component of this date property
- See Also:
 
- 
hourIt is a caller responsibility to check that underlying attribute has time component- Returns:
- new property that represents hour component of this time property
- See Also:
 
- 
minuteIt is a caller responsibility to check that underlying attribute has time component- Returns:
- new property that represents minute component of this time property
- See Also:
 
- 
secondIt is a caller responsibility to check that underlying attribute has time component- Returns:
- new property that represents second component of this time property
- See Also:
 
- 
aliasCreates alias with different name for this property- Overrides:
- aliasin class- BaseProperty<E>
 
- 
max- Specified by:
- maxin interface- ComparableProperty<E>
- See Also:
 
- 
min- Specified by:
- minin interface- ComparableProperty<E>
- See Also:
 
- 
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>
- Returns:
- property that will be translated relative to parent query
 
 
-