Package org.apache.jackrabbit.value

Examples of org.apache.jackrabbit.value.DateValue


     * @param calendar the calendar
     * @return the value
     */
    @Converter
    public Value toValue(Calendar calendar) {
        return new DateValue(calendar);
    }
View Full Code Here


        InternalValue value;
        if (reqType != PropertyType.DATE) {
            // type conversion required
            Value targetVal = ValueHelper.convert(
                    new DateValue(date), reqType,
                    ValueFactoryImpl.getInstance());
            value = InternalValue.create(targetVal, session.getNamespaceResolver());
        } else {
            // no type conversion required
            value = InternalValue.create(date);
View Full Code Here

            case PropertyType.BINARY:
                return new BinaryValue(((BLOBFileValue) val).getStream());
            case PropertyType.BOOLEAN:
                return new BooleanValue(((Boolean) val));
            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
                return new LongValue((Long) val);
            case PropertyType.REFERENCE:
View Full Code Here

        return new BinaryValue(stream);
    }

    @Converter
    public static Value toValue(Calendar calendar) {
        return new DateValue(calendar);
    }
View Full Code Here

        Calendar c2 = Calendar.getInstance();
        c2.setTime(new Date());

        StringBuffer b = new StringBuffer("(");
        b.append(new DateValue(c1).getString());
        b.append(",");
        b.append(new DateValue(c2).getString());
        b.append(")");

        return new String[] {b.toString()};
    }
View Full Code Here

            case PropertyType.BINARY:
                return new BinaryValue(((BLOBFileValue) val).getStream());
            case PropertyType.BOOLEAN:
                return new BooleanValue(((Boolean) val));
            case PropertyType.DATE:
                return new DateValue((Calendar) val);
            case PropertyType.DOUBLE:
                return new DoubleValue((Double) val);
            case PropertyType.LONG:
                return new LongValue((Long) val);
            case PropertyType.REFERENCE:
View Full Code Here

        }

        InternalValue value;
        if (reqType != PropertyType.DATE) {
            // type conversion required
            value = InternalValue.create(new DateValue(date), reqType, session.getNamespaceResolver());
        } else {
            // no type conversion required
            value = InternalValue.create(date);
        }
View Full Code Here

        Calendar c2 = Calendar.getInstance();
        c2.setTime(new Date());

        StringBuffer b = new StringBuffer("(");
        b.append(new DateValue(c1).getString());
        b.append(",");
        b.append(new DateValue(c2).getString());
        b.append(")");

        return new String[] {b.toString()};
    }
View Full Code Here

        return new BinaryValue(stream);
    }

    @Converter
    public static Value toValue(Calendar calendar) {
        return new DateValue(calendar);
    }
View Full Code Here

        return new BinaryValue(stream);
    }

    @Converter
    public Value toValue(Calendar calendar) {
        return new DateValue(calendar);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.value.DateValue

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.