Package com.psddev.dari.db

Examples of com.psddev.dari.db.ForwardingDatabase


            if (user != null) {
                request.setAttribute(AUTHENTICATED_ATTRIBUTE, Boolean.TRUE);

                logIn(request, response, user);

                ForwardingDatabase db = new ForwardingDatabase() {
                    @Override
                    protected <T> Query<T> filterQuery(Query<T> query) {
                        return query.clone().master().resolveInvisible();
                    }
                };

                db.setDelegate(Database.Static.getDefault());
                Database.Static.setIgnoreReadConnection(true);
                Database.Static.overrideDefault(db);
                request.setAttribute(DATABASE_OVERRIDDEN_ATTRIBUTE, Boolean.TRUE);

            } else if (!JspUtils.getEmbeddedServletPath(context, request.getServletPath()).equals(LOG_IN_PATH)) {
View Full Code Here

TOP

Related Classes of com.psddev.dari.db.ForwardingDatabase

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.