Package org.opentides.bean

Examples of org.opentides.bean.Searchable


    return countByExample(example,false);
  }
 
  public final long countByExample(T example, boolean exactMatch) {
    if (example instanceof Searchable) {
      Searchable criteria = (Searchable) example;
      String whereClause = CrudUtil.buildJpaQueryString(criteria, exactMatch);
      String filterClause = this.buildSecurityFilterClause(example);
      String append = appendClauseToExample(example, exactMatch);
      whereClause = doSQLAppend(whereClause, append);
      whereClause = doSQLAppend(whereClause, filterClause);
View Full Code Here


  }
 
  @SuppressWarnings("unchecked")
  public final List<T> findByExample(T example, boolean exactMatch, int start, int total) {
    if (example instanceof Searchable) {
      Searchable criteria = (Searchable) example;
      String whereClause = CrudUtil.buildJpaQueryString(criteria, exactMatch);
      String orderClause = " " + appendOrderToExample(example);
      String filterClause = this.buildSecurityFilterClause(example);
      String append = appendClauseToExample(example, exactMatch);
      whereClause = doSQLAppend(whereClause, append);
View Full Code Here

    return (Long) getEntityManager().createQuery("select count(*) from AuditLog obj ").getSingleResult();
  }
   
  public final long countByExample(AuditLog example) {
    if (example instanceof Searchable) {
      Searchable criteria = (Searchable) example;
      String whereClause = CrudUtil.buildJpaQueryString(criteria, false);
      String append = appendClauseToExample(example);
      whereClause = doSQLAppend(whereClause, append);
      if (_log.isDebugEnabled()) _log.debug("Count QBE >> "+whereClause);
      return (Long) getEntityManager().createQuery("select count(*) from AuditLog obj "
View Full Code Here

  }
 
  @SuppressWarnings("unchecked")
  public final List<AuditLog> findByExample(AuditLog example, int start, int total) {
    if (example instanceof Searchable) {
      Searchable criteria = (Searchable) example;
      String whereClause = CrudUtil.buildJpaQueryString(criteria, false);
      String orderClause = " " + appendOrderToExample(example);
      String append = appendClauseToExample(example);
      whereClause = doSQLAppend(whereClause, append);
      if (_log.isDebugEnabled()) _log.debug("QBE >> "+whereClause+orderClause);
View Full Code Here

TOP

Related Classes of org.opentides.bean.Searchable

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.