Examples of assertSupport()


Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

     * for this relation.
     */
    private void testInverseNull(SQLBuffer sql, Select sel, Joins joins,
        boolean empty) {
        DBDictionary dict = field.getMappingRepository().getDBDictionary();
        dict.assertSupport(dict.supportsSubselect, "SupportsSubselect");

        if (field.getIndependentTypeMappings().length != 1)
            throw RelationStrategies.uninversable(field);

        if (empty)
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

    public void appendTo(Select sel, ExpContext ctx, ExpState state,
        SQLBuffer buf, int index) {

        DBDictionary dict = ctx.store.getDBDictionary();
        String func = dict.toUpperCaseFunction;
        dict.assertSupport(func != null, "ToUpperCaseFunction");
        func = dict.getCastFunction(getValue(), func);

        int idx = func.indexOf("{0}");
        buf.append(func.substring(0, idx));
        getValue().appendTo(sel, ctx, state, buf, index);
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

        _val1.calculateValue(sel, ctx, bstate.state1, null, null);
        _val2.calculateValue(sel, ctx, bstate.state2, null, null);

        DBDictionary dict = ctx.store.getDBDictionary();
        String func = dict.concatenateFunction;
        dict.assertSupport(func != null, "ConcatenateFunction");
        int part1idx = func.indexOf("{0}");
        int part2idx = func.indexOf("{1}");
        String part1 = func.substring(0, Math.min(part1idx, part2idx));
        String part2 = func.substring(Math.min(part1idx, part2idx) + 3,
            Math.max(part1idx, part2idx));
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

                boolean candidate = ProjectionExpressionVisitor.
                    hasCandidateProjections(exps.projections);
                if (agg || (candidate
                    && (exps.distinct & exps.DISTINCT_TRUE) == 0)) {
                    DBDictionary dict = ctx.store.getDBDictionary();
                    dict.assertSupport(dict.supportsSubselect,
                        "SupportsSubselect");

                    Select inner = sel;
                    sel = ctx.store.getSQLFactory().newSelect();
                    sel.setParent(parent, alias);
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

    public void appendTo(Select sel, ExpContext ctx, ExpState state,
        SQLBuffer buf, int index) {

        DBDictionary dict = ctx.store.getDBDictionary();
        String func = dict.toLowerCaseFunction;
        dict.assertSupport(func != null, "ToLowerCaseFunction");
        func = dict.getCastFunction(getValue(), func);

        int idx = func.indexOf("{0}");
        buf.append(func.substring(0, idx));
        getValue().appendTo(sel, ctx, state, buf, index);
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

        SQLBuffer sql, int index) {
        DBDictionary dict = ctx.store.getDBDictionary();
        String func;
        if (_where == null) {
            func = dict.trimBothFunction;
            dict.assertSupport(func != null, "TrimBothFunction");
        } else if (_where.booleanValue()) {
            func = dict.trimLeadingFunction;
            dict.assertSupport(func != null, "TrimLeadingFunction");
        } else {
            func = dict.trimTrailingFunction;
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

        if (_where == null) {
            func = dict.trimBothFunction;
            dict.assertSupport(func != null, "TrimBothFunction");
        } else if (_where.booleanValue()) {
            func = dict.trimLeadingFunction;
            dict.assertSupport(func != null, "TrimLeadingFunction");
        } else {
            func = dict.trimTrailingFunction;
            dict.assertSupport(func != null, "TrimTrailingFunction");
        }       
        func = dict.getCastFunction(_val, func);
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

        } else if (_where.booleanValue()) {
            func = dict.trimLeadingFunction;
            dict.assertSupport(func != null, "TrimLeadingFunction");
        } else {
            func = dict.trimTrailingFunction;
            dict.assertSupport(func != null, "TrimTrailingFunction");
        }       
        func = dict.getCastFunction(_val, func);
       
        int fromPart = func.indexOf("{0}");
        int charPart = func.indexOf("{1}");
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

            // where to specify the trim char (denoted by "{1}"),
            // we do not have the ability to trim off non-whitespace
            // characters; throw an exception when we attempt to do so
            if (!(_trimChar instanceof Const) || String.valueOf(((Const)
                _trimChar).getValue(ctx,tstate.charState)).trim().length() != 0)
                dict.assertSupport(false, "TrimNonWhitespaceCharacters");
        }
    }

    public void acceptVisit(ExpressionVisitor visitor) {
        visitor.enter(this);
View Full Code Here

Examples of org.apache.openjpa.jdbc.sql.DBDictionary.assertSupport()

    }

    public Subquery newSubquery(ClassMetaData candidate, boolean subs,
        String alias) {
        DBDictionary dict = _type.getMappingRepository().getDBDictionary();
        dict.assertSupport(dict.supportsSubselect, "SupportsSubselect");
        return new SubQ((ClassMapping) candidate, subs, alias);
    }

    public Path newPath() {
        return new PCPath(_type);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.