Examples of excludeProperty()


Examples of org.hibernate.criterion.Example.excludeProperty()

    if (null != mode) {
      example.enableLike(mode);
    }
    if (null != excludePropertes) {
      for (int i = 0; i < excludePropertes.length; i++) {
        example.excludeProperty(excludePropertes[i]);
      }
    }
    return example;
  }
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

        // Sanitize input
        if (orderByProperty != null) {
            orderByProperty = orderByProperty.replaceAll("[^a-zA-Z0-9]", "");
        }

        for (String s : ignoreProperty) example.excludeProperty(s);

        Session session = (Session)entityManager.getDelegate();

        Criteria crit = session.createCriteria(User.class).add(example);
        if (orderByProperty != null)
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

  @SuppressWarnings("unchecked")
  public List<T> findByExample(T exampleInstance, String... excludeProperty) {
    Criteria crit = getSession().createCriteria(getClazz());
    Example example = Example.create(exampleInstance);
    for (String exclude : excludeProperty) {
      example.excludeProperty(exclude);
    }
    crit.add(example);
    return crit.list();
  }
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

    if (null != mode) {
      example.enableLike(mode);
    }
    if (null != excludePropertes) {
      for (int i = 0; i < excludePropertes.length; i++) {
        example.excludeProperty(excludePropertes[i]);
      }
    }
    return example;
  }
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

    if (null != mode) {
      example.enableLike(mode);
    }
    if (null != excludePropertes) {
      for (int i = 0; i < excludePropertes.length; i++) {
        example.excludeProperty(excludePropertes[i]);
      }
    }
    return example;
  }
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

    @SuppressWarnings("unchecked")
   public List<T> findByExample(T exampleInstance, String... excludeProperty) {
        Criteria crit = getSession().createCriteria(getPersistentClass());
        Example example =  Example.create(exampleInstance);
        for (String exclude : excludeProperty) {
            example.excludeProperty(exclude);
        }
        crit.add(example);
        return crit.list();
    }
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

    @SuppressWarnings({"unchecked"})
    public List<T> findByExample(T exampleInstance, String... excludeProperty) {
        Criteria crit = getSession().createCriteria(getPersistentClass());
        Example example = Example.create(exampleInstance);
        for (String exclude : excludeProperty) {
            example.excludeProperty(exclude);
        }
        crit.add(example);
        return crit.list();
    }
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

        }
        if (settings.isExcludeZeroes()) {
            theExample.excludeZeroes();
        }
        for (String propName : settings.getExcludedProperties()) {
            theExample.excludeProperty(propName);
        }
        return getSession().createCriteria(settings.getEntityClass()).add(theExample).list();
    }

    /*
 
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

    @Override
    public List<T> findByExample(T exampleInstance, String[] excludeProperty) {
        Criteria crit = getSession().createCriteria(getPersistentClass());
        Example example = Example.create(exampleInstance);
        for (String exclude : excludeProperty) {
            example.excludeProperty(exclude);
        }
        crit.add(example);
        return crit.list();
    }
View Full Code Here

Examples of org.hibernate.criterion.Example.excludeProperty()

            public Object doInHibernate(Session session) throws HibernateException, SQLException {
                // Using Hibernate, more difficult with EntityManager and EJB-QL
                Criteria crit = session.createCriteria(getPersistentClass());
                Example example = Example.create(exampleInstance);
                for (String exclude : excludeProperty) {
                    example.excludeProperty(exclude);
                }
                crit.add(example);
                return crit.list();
            }
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.