Package org.apache.cayenne.testdo.testmap.auto

Source Code of org.apache.cayenne.testdo.testmap.auto._Testmap

package org.apache.cayenne.testdo.testmap.auto;

import java.util.List;

import org.apache.cayenne.ObjectContext;
import org.apache.cayenne.query.NamedQuery;
import org.apache.cayenne.testdo.testmap.Artist;
import org.apache.cayenne.testdo.testmap.Gallery;
import org.apache.cayenne.testdo.testmap.Painting;

/**
* This class was generated by Cayenne.
* It is probably a good idea to avoid changing this class manually,
* since it may be overwritten next time code is regenerated.
* If you need to make any customizations, please use subclass.
*/
public class _Testmap {

    public static final String EJBQL_QUERY_TEST_QUERYNAME = "EjbqlQueryTest";

    public static final String NON_SELECTING_QUERY_QUERYNAME = "NonSelectingQuery";

    public static final String OBJECT_QUERY_QUERYNAME = "ObjectQuery";

    public static final String PARAMETERIZED_NON_SELECTING_QUERY_QUERYNAME = "ParameterizedNonSelectingQuery";

    public static final String PARAMETERIZED_QUERY_WITH_LOCAL_CACHE_QUERYNAME = "ParameterizedQueryWithLocalCache";

    public static final String PARAMETERIZED_QUERY_WITH_SHARED_CACHE_QUERYNAME = "ParameterizedQueryWithSharedCache";

    public static final String PROCEDURE_QUERY_QUERYNAME = "ProcedureQuery";

    public static final String QUERY_WITH_LOCAL_CACHE_QUERYNAME = "QueryWithLocalCache";

    public static final String QUERY_WITH_ORDERING_QUERYNAME = "QueryWithOrdering";

    public static final String QUERY_WITH_PREFETCH_QUERYNAME = "QueryWithPrefetch";

    public static final String QUERY_WITH_QUALIFIER_QUERYNAME = "QueryWithQualifier";

    public static final String QUERY_WITH_SHARED_CACHE_QUERYNAME = "QueryWithSharedCache";

    public static final String SELECT_DATE_TEST_QUERYNAME = "SelectDateTest";

    public static final String SELECT_RETURN_TYPES_MAP1_QUERYNAME = "SelectReturnTypesMap1";

    public static final String SELECT_RETURN_TYPES_MAP2_QUERYNAME = "SelectReturnTypesMap2";

    public static final String SELECT_TEST_LOWER_QUERYNAME = "SelectTestLower";

    public static final String SELECT_TEST_UPPER_QUERYNAME = "SelectTestUpper";

    public List<Painting> performObjectQuery(ObjectContext context , Artist artist) {
        String[] parameters = {
            "artist",
        };

        Object[] values = {
            artist,
        };

        return context.performQuery(new NamedQuery("ObjectQuery", parameters, values));
    }

    public List<Artist> performParameterizedQueryWithLocalCache(ObjectContext context , String name) {
        String[] parameters = {
            "name",
        };

        Object[] values = {
            name,
        };

        return context.performQuery(new NamedQuery("ParameterizedQueryWithLocalCache", parameters, values));
    }

    public List<Artist> performParameterizedQueryWithSharedCache(ObjectContext context , String name) {
        String[] parameters = {
            "name",
        };

        Object[] values = {
            name,
        };

        return context.performQuery(new NamedQuery("ParameterizedQueryWithSharedCache", parameters, values));
    }

    public List<Artist> performQueryWithLocalCache(ObjectContext context ) {
        return context.performQuery(new NamedQuery("QueryWithLocalCache"));
    }

    public List<Artist> performQueryWithOrdering(ObjectContext context ) {
        return context.performQuery(new NamedQuery("QueryWithOrdering"));
    }

    public List<Gallery> performQueryWithPrefetch(ObjectContext context ) {
        return context.performQuery(new NamedQuery("QueryWithPrefetch"));
    }

    public List<Artist> performQueryWithQualifier(ObjectContext context , String param1) {
        String[] parameters = {
            "param1",
        };

        Object[] values = {
            param1,
        };

        return context.performQuery(new NamedQuery("QueryWithQualifier", parameters, values));
    }

    public List<Artist> performQueryWithSharedCache(ObjectContext context ) {
        return context.performQuery(new NamedQuery("QueryWithSharedCache"));
    }
}
TOP

Related Classes of org.apache.cayenne.testdo.testmap.auto._Testmap

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.