/** * {@inheritDoc} * * @see org.modeshape.graph.property.ValueFactory#create(org.modeshape.graph.property.DateTime) */ public Long create( DateTime value ) throws ValueFormatException { if (value == null) return null; return value.getMilliseconds(); }
/** * {@inheritDoc} * * @see org.modeshape.graph.property.ValueFactory#create(org.modeshape.graph.property.DateTime) */ public Double create( DateTime value ) throws ValueFormatException { if (value == null) return null; return create(value.getMilliseconds()); }
/** * {@inheritDoc} * * @see org.modeshape.graph.property.ValueFactory#create(org.modeshape.graph.property.DateTime) */ public BigDecimal create( DateTime value ) throws ValueFormatException { if (value == null) return null; return create(value.getMilliseconds()); }
/** * {@inheritDoc} * * @see org.modeshape.graph.property.DateTimeFactory#create(org.modeshape.graph.property.DateTime, long) */ public DateTime create( DateTime original, long offsetInMillis ) { assert original != null; if (offsetInMillis == 0l) return original; long newMillis = original.getMilliseconds() + offsetInMillis; return new JodaDateTime(newMillis, original.getTimeZoneId()); }
this.expirationTime = expirationTime != null ? expirationTime.getMilliseconds() : Long.MAX_VALUE;