Examples of toDataStoreValue()


Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

            row.setInt(order, idx);
    }

    public Object toDataStoreValue(Object val, JDBCStore store) {
        ClassMapping cm = field.getElementMapping().getTypeMapping();
        return cm.toDataStoreValue(val, cm.getPrimaryKeyColumns(), store);
    }

    public Joins join(Joins joins, boolean forceOuter) {
        ValueMapping elem = field.getElementMapping();
        ClassMapping[] clss = elem.getIndependentTypeMappings();
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

        return Boolean.FALSE;
    }

    public Object toDataStoreValue(Object val, JDBCStore store) {
        ClassMapping type = field.getTypeMapping();
        return type.toDataStoreValue(val, type.getPrimaryKeyColumns(), store);
    }

    public void appendIsNull(SQLBuffer sql, Select sel, Joins joins) {
        appendTestNull(sql, sel, joins, true);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

            pstate.otherLength = other.length(sel, ctx, otherState);
        } else if (ImplHelper.isManageable(val)) {
            ClassMapping mapping = ctx.store.getConfiguration().
                getMappingRepositoryInstance().getMapping(val.getClass(),
                ctx.store.getContext().getClassLoader(), true);
            pstate.sqlValue = mapping.toDataStoreValue(val,
                mapping.getPrimaryKeyColumns(), ctx.store);
            pstate.otherLength = mapping.getPrimaryKeyColumns().length;
        } else
            pstate.sqlValue = val;
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

        return Boolean.FALSE;
    }

    public Object toDataStoreValue(Object val, JDBCStore store) {
        ClassMapping type = field.getTypeMapping();
        return type.toDataStoreValue(val, type.getPrimaryKeyColumns(), store);
    }

    public void appendIsNull(SQLBuffer sql, Select sel, Joins joins) {
        appendTestNull(sql, sel, joins, true);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

            row.setInt(order, idx);
    }

    public Object toDataStoreValue(Object val, JDBCStore store) {
        ClassMapping cm = field.getElementMapping().getTypeMapping();
        return cm.toDataStoreValue(val, cm.getPrimaryKeyColumns(), store);
    }

    public Joins join(Joins joins, boolean forceOuter) {
        ValueMapping elem = field.getElementMapping();
        ClassMapping[] clss = elem.getIndependentTypeMappings();
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

        MappingRepository repos = store.getConfiguration()
            .getMappingRepositoryInstance();
        ClassMapping mapping = repos.getMapping(pc.getClass(),
            broker.getClassLoader(), true);
        Column[] pks = mapping.getPrimaryKeyColumns();
        Object cols = mapping.toDataStoreValue(pc, pks, store);
        if (cols instanceof Object[]) {
            Object[] array = (Object[])cols;
            int n = array.length;
            if (n > indices.length || indices.length%n != 0)
                throw new UserException(_loc.get("uparam-pc-key",
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

        MappingRepository repos = store.getConfiguration()
            .getMappingRepositoryInstance();
        ClassMapping mapping = repos.getMapping(pc.getClass(),
            broker.getClassLoader(), true);
        Column[] pks = mapping.getPrimaryKeyColumns();
        Object cols = mapping.toDataStoreValue(pc, pks, store);
        if (cols instanceof Object[]) {
            Object[] array = (Object[])cols;
            int n = array.length;
            if (n > indices.length || indices.length%n != 0)
                throw new UserException(_loc.get("uparam-pc-key",
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

                }
            } else if (ImplHelper.isManageable(val)) {
                ClassMapping mapping = ctx.store.getConfiguration().
                getMappingRepositoryInstance().getMapping(val.getClass(),
                    ctx.store.getContext().getClassLoader(), true);
                pstate.sqlValue[i] = mapping.toDataStoreValue(val,
                    mapping.getPrimaryKeyColumns(), ctx.store);
                pstate.otherLength[i] = mapping.getPrimaryKeyColumns().length;
            } else
                pstate.sqlValue[i] = val;
        }
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

        MappingRepository repos = store.getConfiguration()
            .getMappingRepositoryInstance();
        ClassMapping mapping = repos.getMapping(pc.getClass(),
            broker.getClassLoader(), true);
        Column[] pks = mapping.getPrimaryKeyColumns();
        Object cols = mapping.toDataStoreValue(pc, pks, store);
        if (cols instanceof Object[]) {
            Object[] array = (Object[])cols;
            int n = array.length;
            if (n > indices.length || indices.length%n != 0)
                throw new UserException(_loc.get("uparam-pc-key",
View Full Code Here

Examples of org.apache.openjpa.jdbc.meta.ClassMapping.toDataStoreValue()

        Column[] cols;
        if (vm.getJoinDirection() == ValueMapping.JOIN_INVERSE)
            cols = rel.getPrimaryKeyColumns();
        else
            cols = vm.getForeignKey(rel).getPrimaryKeyColumns();
        return rel.toDataStoreValue(val, cols, store);
    }

    /**
     * Map a logical foreign key to an unmapped base class relation.
     */
 
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.