Package org.apache.cayenne.query

Examples of org.apache.cayenne.query.QueryCacheStrategy


    protected void initController() {
        cacheStrategy.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent event) {
                QueryCacheStrategy strategy = (QueryCacheStrategy) cacheStrategy
                        .getModel()
                        .getSelectedItem();
                setQueryProperty("cacheStrategy", strategy);
                setCacheGroupsEnabled(strategy != null
                        && strategy != QueryCacheStrategy.NO_CACHE);
View Full Code Here


       
        // TODO (andrey, 15/12/09)
        //do not use metadata, as it triggers CDO class loading (CAY-1334)
        //to avoid this evil hack, we need some common interface for SelectQuery, EJBQL
        // & SQLTemplate, but 3.0 API is frozen now
        QueryCacheStrategy selectedStrategy = (QueryCacheStrategy)
            PropertyUtils.getProperty(query, "cacheStrategy");

        cacheModel.setSelectedItem(selectedStrategy != null
                ? selectedStrategy
                : QueryCacheStrategy.getDefaultStrategy());
View Full Code Here

    protected void initController() {
        cacheStrategy.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent event) {
                QueryCacheStrategy strategy = (QueryCacheStrategy) cacheStrategy
                        .getModel()
                        .getSelectedItem();
                setQueryProperty("cacheStrategy", strategy);
                setCacheGroupsEnabled(strategy != null
                        && strategy != QueryCacheStrategy.NO_CACHE);
View Full Code Here

        // TODO (andrey, 15/12/09)
        // do not use metadata, as it triggers CDO class loading (CAY-1334)
        // to avoid this evil hack, we need some common interface for SelectQuery, EJBQL
        // & SQLTemplate, but 3.0 API is frozen now
        QueryCacheStrategy selectedStrategy = (QueryCacheStrategy) PropertyUtils
                .getProperty(query, "cacheStrategy");

        cacheModel.setSelectedItem(selectedStrategy != null
                ? selectedStrategy
                : QueryCacheStrategy.getDefaultStrategy());
View Full Code Here

        // unneeded EJBQL parsing...
        EJBQLQuery ejbqlQuery = (EJBQLQuery) query;

        DefaultComboBoxModel cacheModel = new DefaultComboBoxModel(CACHE_POLICIES);

        QueryCacheStrategy selectedStrategy = ejbqlQuery.getCacheStrategy();

        cacheModel.setSelectedItem(selectedStrategy != null
                ? selectedStrategy
                : QueryCacheStrategy.getDefaultStrategy());
        cacheStrategy.setModel(cacheModel);
View Full Code Here

TOP

Related Classes of org.apache.cayenne.query.QueryCacheStrategy

Copyright © 2018 www.massapicom. 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.