Package org.apache.jackrabbit.oak.api

Examples of org.apache.jackrabbit.oak.api.CoreValue


    }

    public int compareRows(CoreValue[] orderValues, CoreValue[] orderValues2) {
        int comp = 0;
        for (int i = 0, size = orderings.length; i < size; i++) {
            CoreValue a = orderValues[i];
            CoreValue b = orderValues2[i];
            if (a == null || b == null) {
                if (a == b) {
                    comp = 0;
                } else if (a == null) {
                    // TODO order by: nulls first, last, low or high?
View Full Code Here


        }
        throw new IllegalArgumentException("Column not found: " + columnName);
    }

    public CoreValue getBindVariableValue(String bindVariableName) {
        CoreValue v = bindVariableMap.get(bindVariableName);
        if (v == null) {
            throw new IllegalArgumentException("Bind variable value not set: " + bindVariableName);
        }
        return v;
    }
View Full Code Here

     * @param reader The JSON reader.
     * @param valueFactory The factory used to create the value.
     * @return The value such as defined by the token obtained from the reader.
     */
    public static CoreValue fromJsopReader(JsopReader reader, CoreValueFactory valueFactory) {
        CoreValue value;
        if (reader.matches(JsopReader.NUMBER)) {
            String number = reader.getToken();
            value = valueFactory.createValue(Long.valueOf(number));
        } else if (reader.matches(JsopReader.TRUE)) {
            value = valueFactory.createValue(true);
View Full Code Here

    }

    //-------------------------------------------------------< ValueFactory >---
    @Override
    public Value createValue(String value) {
        CoreValue cv = factory.createValue(value, PropertyType.STRING);
        return new ValueImpl(cv, namePathMapper);
    }
View Full Code Here

        return new ValueImpl(cv, namePathMapper);
    }

    @Override
    public Value createValue(long value) {
        CoreValue cv = factory.createValue(value);
        return new ValueImpl(cv, namePathMapper);
    }
View Full Code Here

        return new ValueImpl(cv, namePathMapper);
    }

    @Override
    public Value createValue(double value) {
        CoreValue cv = factory.createValue(value);
        return new ValueImpl(cv, namePathMapper);
    }
View Full Code Here

        return new ValueImpl(cv, namePathMapper);
    }

    @Override
    public Value createValue(boolean value) {
        CoreValue cv = factory.createValue(value);
        return new ValueImpl(cv, namePathMapper);
    }
View Full Code Here

    }

    @Override
    public Value createValue(Calendar value) {
        String dateStr = ISO8601.format(value);
        CoreValue cv = factory.createValue(dateStr, PropertyType.DATE);
        return new ValueImpl(cv, namePathMapper);
    }
View Full Code Here

    }

    @Override
    public Value createValue(InputStream value) {
        try {
            CoreValue cv = factory.createValue(value);
            return new ValueImpl(cv, namePathMapper);
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        } finally {
            // JCR-2903
View Full Code Here

        if (value == null) {
            throw new ValueFormatException();
        }

        try {
            CoreValue cv;

            switch (type) {
                case PropertyType.NAME:
                    String oakName = namePathMapper.getOakName(value);
                    if (oakName == null) {
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.api.CoreValue

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.