Package com.googlecode.sonic.util

Examples of com.googlecode.sonic.util.CustomQuery


   *
   * @param id
   * @return kindで指定したEntityクラス。
   */
  protected Entity select(Long id) {
    return new CustomQuery(kindOfEntity).eq(ID, id).eq(DELETED, false)
        .asSingle();
  }
View Full Code Here


   * @throws ServiceException
   */
  @SuppressWarnings("unchecked")
  protected List<Entity> selectAll() throws ServiceException {
    try {
      CustomQuery customQuery = new CustomQuery(kindOfEntity);
      return (List<Entity>) customQuery.eq(DELETED, false)
          .desc(CREATE_DATE).asList();
    } catch (Exception e) {
      throw new ServiceException(e);
    }
  }
View Full Code Here

   *
   * @return 最大ID値+1のID
   */
  @SuppressWarnings("unchecked")
  protected long getNextId() {
    List<Entity> entity = (List<Entity>) new CustomQuery(kindOfEntity)
        .desc(ID).asList();
    if (entity.isEmpty()) {
      return 1L;
    } else {
      return (Long) entity.get(0).getProperty(ID) + 1;
View Full Code Here

TOP

Related Classes of com.googlecode.sonic.util.CustomQuery

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.