Beispiel #1
0
 @SuppressWarnings("unchecked")
 public T findByExampleSingle(T exampleInstance, String... excludeProperty) {
   Criteria crit = getSession().createCriteria(getPersistentClass());
   Example example = Example.create(exampleInstance);
   for (String exclude : excludeProperty) {
     example.excludeProperty(exclude);
   }
   crit.add(example);
   crit.setCacheable(queriesCached);
   return (T) crit.uniqueResult();
 }