/** * {@inheritDoc} * * @see org.modeshape.graph.property.ValueTypeSystem.Factory#create(java.lang.String) */ @Override public DateTime create( String value ) throws ValueFormatException { DateTime result = valueFactory.create(value); // Convert the timestamp to UTC, since that's how everything should be queried ... return result.toUtcTimeZone(); } };
/** * Define the right-hand side of a comparison. * * @param literal the literal value; * @return the constraint builder; never null */ public ConstraintBuilder literal( DateTime literal ) { return comparisonBuilder.is(operator, literal.toUtcTimeZone()); }
/** * Define the right-hand side of a comparison. * * @param literal the literal value that is to be cast * @return the constraint builder; never null */ public CastAs<ConstraintBuilder> cast( DateTime literal ) { return new CastAsRightHandSide(this, literal.toUtcTimeZone()); }
/** * Define the upper boundary value of a range. * * @param literal the literal value that is to be cast * @return the constraint builder; never null */ public CastAs<ConstraintBuilder> cast( DateTime literal ) { return new CastAsUpperBoundary(this, literal.toUtcTimeZone()); }