Package org.olat.core.commons.persistence

Examples of org.olat.core.commons.persistence.DBQuery.list()


      + " and ident.status = '"  + Identity.STATUS_ACTIV + "'"
      + " and le.persistentTypeName ='" + IdentityImpl.class.getName() + "'"
      + " and le.action ='" + SEND_DELETE_EMAIL_ACTION + "' and le.lcTimestamp >= :deleteEmailDate ";
    DBQuery dbq = DBFactory.getInstance().createQuery(queryStr);
    dbq.setDate("deleteEmailDate", deleteEmailLimit.getTime());
    return dbq.list();
  }

  /**
   * Return list of identities which are ready-to-delete in user-deletion-process.
   * (delete-announcement.email send, duration of waiting for response is expired).
View Full Code Here


      + " and ident.status = '"  + Identity.STATUS_ACTIV + "'"
      + " and le.persistentTypeName ='" + IdentityImpl.class.getName() + "'"
      + " and le.action ='" + SEND_DELETE_EMAIL_ACTION + "' and le.lcTimestamp < :deleteEmailDate ";
    DBQuery dbq = DBFactory.getInstance().createQuery(queryStr);
    dbq.setDate("deleteEmailDate", deleteEmailLimit.getTime());
    return dbq.list();
  }
 
  /**
   *
   * @return true when user can be deleted (non deletion-process is still running)
View Full Code Here

    dbq.setLong("identId", identityP.getKey().longValue());
    if (bgContext != null) dbq.setEntity("context", bgContext);
    if (type != null) dbq.setString("type", type);

    List res = dbq.list();
    return res;
  }

  /**
   * @see org.olat.group.BusinessGroupManager#findBusinessGroupsAttendedBy(java.lang.String,
View Full Code Here

    DBQuery dbq = db.createQuery(query);
    dbq.setLong("identId", identityP.getKey().longValue());
    if (bgContext != null) dbq.setEntity("context", bgContext);
    if (type != null) dbq.setString("type", type);

    List res = dbq.list();
    return res;
  }

  /**
   *
 
View Full Code Here

   *
   * @see org.olat.group.BusinessGroupManager#getAllBusinessGroups()
   */
  public List getAllBusinessGroups() {
    DBQuery dbq = DBFactory.getInstance().createQuery("select bgi from " + "  org.olat.group.BusinessGroupImpl as bgi ");
    return dbq.list();
  }
 
  /**
   * @see org.olat.group.BusinessGroupManager#findBusinessGroupsAttendedBy(java.lang.String,
   *      org.olat.core.id.Identity, org.olat.group.context.BGContext)
View Full Code Here

    } else {
      String q = "select bg from org.olat.group.BusinessGroupImpl bg where bg.groupContext = :context";
      query = db.createQuery(q);
      query.setEntity("context", bgContext);
    }
    return (List<BusinessGroup>) query.list();
  }

  /**
   * @see org.olat.group.context.BGContextManager#countGroupsOfBGContext(org.olat.group.context.BGContext)
   */
 
View Full Code Here

    DBQuery dbq = db.createQuery(query);
    dbq.setLong("identId", identityP.getKey().longValue());
    if (bgContext != null) dbq.setEntity("context", bgContext);
    if (type != null) dbq.setString("type", type);

    List res = dbq.list();
    return res;
  }

  /**
   * @see org.olat.group.BusinessGroupManager#updateBusinessGroup(org.olat.group.BusinessGroup)
View Full Code Here

  public int countGroupsOfBGContext(BGContext bgContext) {
    DB db = DBFactory.getInstance();
    String q = "select count(bg) from org.olat.group.BusinessGroupImpl bg where bg.groupContext = :context";
    DBQuery query = db.createQuery(q);
    query.setEntity("context", bgContext);
    return ((Long) query.list().get(0)).intValue();
  }

  /**
   * @see org.olat.group.context.BGContextManager#countGroupsOfType(java.lang.String)
   */
 
View Full Code Here

  public int countGroupsOfType(String groupType) {
    DB db = DBFactory.getInstance();
    String q = "select count(bg) from org.olat.group.BusinessGroupImpl bg where bg.type = :type";
    DBQuery query = db.createQuery(q);
    query.setString("type", groupType);
    return ((Long) query.list().get(0)).intValue();
  }

  /**
   * @see org.olat.group.context.BGContextManager#findGroupOfBGContext(java.lang.String,
   *      org.olat.group.context.BGContext)
View Full Code Here

    if (groupContext != null) {
      query.setEntity("context", groupContext);
    }
    query.setString("name", groupName);
    query.setCacheable(true);
    List result = query.list();
    if (result.size() == 0) return false;
    return ( ((Long) result.get(0)).intValue() > 0);
  }

  /**
 
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.