Examples of assertSupport()


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

        // exception, then just return without locking
        DBDictionary dict = _store.getDBDictionary();
        JDBCFetchConfiguration fetch = _store.getFetchConfiguration();
        if (dict.simulateLocking)
            return;
        dict.assertSupport(dict.supportsSelectForUpdate, "SupportsSelectForUpdate");

        Object id = sm.getObjectId();
        ClassMapping mapping = (ClassMapping) sm.getMetaData();

        List<SQLBuffer> sqls = getLockRows(dict, id, mapping, fetch, _store.getSQLFactory());
View Full Code Here

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

                buf.appendValue("%" + o.toString(), col);
            }
        } else {
            // if we can't use LIKE, we have to take the substring of the
            // first value and compare it to the second
            dict.assertSupport(pre != null, "StringLengthFunction");
            dict.substring(buf,
                new FilterValueImpl(sel, ctx, bstate.state1, _val1),
                new StringLengthDifferenceFilterValue(sel, ctx, bstate, pre,
                    post), null);
            buf.append(" = ");
View Full Code Here

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()

    protected abstract ForeignKey getJoinForeignKey();

    public void appendSize(SQLBuffer sql, Select sel, Joins joins) {
        DBDictionary dict = field.getMappingRepository().getDBDictionary();
        dict.assertSupport(dict.supportsSubselect, "SupportsSubselect");

        ClassMapping[] ind = getIndependentElementMappings(false);
        if (ind != null && ind.length > 1)
            throw RelationStrategies.unjoinable(field);
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
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.