Package org.apache.openjpa.kernel

Examples of org.apache.openjpa.kernel.OpenJPAStateManager.fetchField()


                sm = tmpBroker.getStateManager(candidate);
            }
            if (action.op != Action.GET && action.op != Action.GET_OUTER)
                continue;
            try {
                candidate = sm.fetchField(
                        ((FieldMapping)action.data).getIndex(), true);
            } catch (ClassCastException cce) {
                throw new RuntimeException(action.data + " not a field path");
            } finally {
                // transactional does not clear the state, which is
View Full Code Here


            }

            try {
                // get the specified field value and switch candidate
                Traversal traversal = (Traversal) action;
                candidate = sm.fetchField(traversal.field.getIndex(), true);
            } finally {
                // transactional does not clear the state, which is
                // important since tmpCandidate might be also managed by
                // another broker if it's a proxied non-pc instance
                if (tmpBroker != null)
View Full Code Here

        OpenJPAStateManager sm2 = (OpenJPAStateManager) pc2.pcGetStateManager();
        if (sm1 == null || sm2 == null)
            return 0;

        Object v1 = sm1.fetchField(_rel.getIndex(), false);
        Object v2 = sm2.fetchField(_rel.getIndex(), false);
        if (v1 == v2)
            return 0;
        if (v1 == null)
            return (_asc) ? -1 : 1;
        if (v2 == null)
View Full Code Here

                sm = tmpBroker.getStateManager(candidate);
            }
            if (action.op != Action.GET && action.op != Action.GET_OUTER)
                continue;
            try {
                candidate = sm.fetchField(
                        ((FieldMapping)action.data).getIndex(), true);
            } catch (ClassCastException cce) {
                throw new RuntimeException(action.data + " not a field path");
            } finally {
                // transactional does not clear the state, which is
View Full Code Here

                sm = tmpBroker.getStateManager(cstate.value);
            }

            try {
                // get the specified field value and switch candidate
                cstate.value = sm.fetchField(((FieldMetaData) action).
                    getIndex(), true);
            } finally {
                // setTransactional does not clear the state, which is
                // important since tmpVal might be also managed by
                // another broker if it's a proxied non-pc instance
View Full Code Here

    }

    public Object deriveKey(JDBCStore store, Object value) {
        OpenJPAStateManager sm = RelationStrategies.getStateManager(value,
            store.getContext());
        return (sm == null) ? null : sm.fetchField(field.getKey().
            getValueMappedByMetaData().getIndex(), false);
    }

    public Object deriveValue(JDBCStore store, Object key) {
        return null;
View Full Code Here

    }

    public Object deriveKey(JDBCStore store, Object value) {
        OpenJPAStateManager sm = RelationStrategies.getStateManager(value,
            store.getContext());
        return (sm == null) ? null : sm.fetchField(field.getKey().
            getValueMappedByMetaData().getIndex(), false);
    }

    public Object deriveValue(JDBCStore store, Object key) {
        return null;
View Full Code Here

                sm = tmpBroker.getStateManager(candidate);
            }
            if (action.op != Action.GET && action.op != Action.GET_OUTER)
                continue;
            try {
                candidate = sm.fetchField(
                        ((FieldMapping)action.data).getIndex(), true);
            } catch (ClassCastException cce) {
                throw new RuntimeException(action.data + " not a field path");
            } finally {
                // transactional does not clear the state, which is
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.