Package pl.net.bluesoft.rnd.processtool.dao

Examples of pl.net.bluesoft.rnd.processtool.dao.UserDataDAO.findByCriteria()


            @Override
            public List<UserData> processWithContext(ProcessToolContext ctx) {
                UserDataDAO dao = ctx.getUserDataDAO();
                DetachedCriteria criteria = dao.getDetachedCriteria().add(Restrictions.in("login", logins))
                        .addOrder(Order.asc("login"));
                return dao.findByCriteria(criteria);
            }
        });
    }

    @Override
View Full Code Here


            @Override
            public List<UserData> processWithContext(ProcessToolContext ctx) {
                UserDataDAO dao = ctx.getUserDataDAO();
                DetachedCriteria criteria = dao.getDetachedCriteria().add(Restrictions.in("email", emails))
                        .addOrder(Order.asc("login"));
                return dao.findByCriteria(criteria);
            }
        });
    }

    @Override
View Full Code Here

            @Override
            public List<UserData> processWithContext(ProcessToolContext ctx) {
                UserDataDAO dao = ctx.getUserDataDAO();
                DetachedCriteria criteria = dao.getDetachedCriteria().add(Restrictions.in("id", ids))
                        .addOrder(Order.asc("login"));
                return dao.findByCriteria(criteria);
            }
        });
    }

    @Override
View Full Code Here

                        .add(Restrictions.eq("key", key));
                if(values.length == 1)
                  criteria.add(Restrictions.eq("value", values[0]));
                else
                  criteria.add(Restrictions.in("value", values));
                return dao.findByCriteria(criteria);
            }
        });
    }

    @Override
View Full Code Here

                DetachedCriteria criteria = dao.getDetachedCriteria()
                        .setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY)
                        .addOrder(Order.asc("login"))
                        .createCriteria("attributes")
                        .add(Restrictions.in("key", key));
                return dao.findByCriteria(criteria);
            }
        });
    }

    @Override
View Full Code Here

        return withContext(new ReturningProcessToolContextCallback<List<UserData>>() {
            @Override
            public List<UserData> processWithContext(ProcessToolContext ctx) {
                UserDataDAO dao = ctx.getUserDataDAO();
                DetachedCriteria criteria = configureAttributesJoinCriteria(dao.getDetachedCriteria(), attributeValues);
                return dao.findByCriteria(criteria);
            }
        });
    }

    protected DetachedCriteria configureAttributesJoinCriteria(DetachedCriteria root, Map<String, String> attributeValues) {
View Full Code Here

                UserDataDAO dao = ctx.getUserDataDAO();
                DetachedCriteria detachedCriteria = dao.getDetachedCriteria();
                for (Criterion c : criteria) {
                    detachedCriteria.add(c);
                }
                return dao.findByCriteria(detachedCriteria);
            }
        });
    }

    @Override
View Full Code Here

            @Override
            public List<UserData> processWithContext(ProcessToolContext ctx) {
                UserDataDAO dao = ctx.getUserDataDAO();
                DetachedCriteria detachedCriteria = dao.getDetachedCriteria();
                configurer.configure(detachedCriteria);
                return dao.findByCriteria(detachedCriteria);
            }
        });
    }

    @Override
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.