Package org.modeshape.jcr.value.basic

Examples of org.modeshape.jcr.value.basic.JodaDateTime


        Property decimalProp = node1.getProperty("decimal_prop");
        assertEquals(BigDecimal.valueOf(12.3), decimalProp.getDecimal());
        assertEquals(javax.jcr.PropertyType.DECIMAL, decimalProp.getType());

        Property dateProp = node1.getProperty("date_prop");
        assertEquals(new JodaDateTime("1994-11-05T13:15:30Z").toCalendar(), dateProp.getDate());
        assertEquals(javax.jcr.PropertyType.DATE, dateProp.getType());

        Property doubleProp = node1.getProperty("double_prop");
        assertEquals(12.3, doubleProp.getDouble(), 0);
        assertEquals(javax.jcr.PropertyType.DOUBLE, doubleProp.getType());
View Full Code Here


    protected final static class DateCanonicalizer implements Canonicalizer {
        @Override
        public Object canonicalizeValue( Object value ) {
            if (value instanceof DateTime) return value;
            if (value instanceof Calendar) {
                return new JodaDateTime((Calendar)value);
            }
            if (value instanceof Date) {
                return new JodaDateTime((Date)value);
            }
            return value;
        }
View Full Code Here

        private String journalId;

        private TestChangeSet( List<Change> changes,
                               String journalId ) {
            this.changes = changes;
            this.timestamp = new JodaDateTime();
            this.journalId = journalId;
        }
View Full Code Here

            return Collections.emptyMap();
        }

        @Override
        public DateTime getTimestamp() {
            return new JodaDateTime(time);
        }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.value.basic.JodaDateTime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.