Examples of TargetFetchConfiguration


Examples of org.apache.openjpa.slice.jdbc.TargetFetchConfiguration

    /**
     * Overrides to target specific slices for find() calls.
     */
    @Override
    public Object processArgument(Object oid) {
        TargetFetchConfiguration fetch = getFetchConfiguration();
        if (!fetch.isExplicitTarget()) {
            FinderTargetPolicy policy = _conf.getFinderTargetPolicyInstance();
            if (policy != null) {
                if (oid instanceof OpenJPAId) {
                    String[] targets = policy.getTargets(((OpenJPAId) oid).getType(),
                            ((OpenJPAId) oid).getIdObject(),
                            _conf.getActiveSliceNames(), this);
                    fetch.setTargets(targets);
                }
            }
        }
        return super.processArgument(oid);
    }
View Full Code Here

Examples of org.apache.openjpa.slice.jdbc.TargetFetchConfiguration

     * Overrides to set the query targets via policy, if user has not already set the targets via hint
     * explicitly on this query.
     */
    @Override
    public Object execute(Map params) {
        TargetFetchConfiguration fetch = (TargetFetchConfiguration)getFetchConfiguration();
        if (!fetch.isExplicitTarget()) {
            QueryTargetPolicy policy = _conf.getQueryTargetPolicyInstance();
            if (policy != null) {
                String[] targets = policy.getTargets(getQueryString(), Collections.unmodifiableMap(params),
                        getLanguage(), _conf.getActiveSliceNames(), this.getBroker());
                fetch.setTargets(targets);
            }
        }
        return super.execute(params);
    }
View Full Code Here

Examples of org.apache.openjpa.slice.jdbc.TargetFetchConfiguration

    /**
     * Overrides to target specific slices for find() calls.
     */
    @Override
    public Object processArgument(Object oid) {
        TargetFetchConfiguration fetch = getFetchConfiguration();
        if (!fetch.isExplicitTarget()) {
            FinderTargetPolicy policy = _conf.getFinderTargetPolicyInstance();
            if (policy != null) {
                if (oid instanceof OpenJPAId) {
                    String[] targets = policy.getTargets(((OpenJPAId) oid).getType(),
                            ((OpenJPAId) oid).getIdObject(),
                            _conf.getActiveSliceNames(), this);
                    fetch.setTargets(targets);
                }
            }
        }
        return super.processArgument(oid);
    }
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.