Package net.java.ao

Examples of net.java.ao.Query


  }

  @Override
  public List<Level> all(Category category)
  {
    Query query = Query.select().where("CATEGORY = ?", category).order("LEVEL_NUMBER ASC");
    return Arrays.asList(ao.find(getClazz(), query));
  }
View Full Code Here


  }

  @Override
  public Level findNextLevel(Category category, int value)
  {
    Query query = Query.select().where("CATEGORY = ? AND MIN_THRESHOLD > ?", category, value)
                                .order("LEVEL_NUMBER ASC");
    Level[] levels = ao.find(getClazz(), query);

    return levels.length > 0 ? levels[0] : null;
  }
View Full Code Here

    achievement.save();
  }

  public List<Achievement> getUserNewAchievements(UserWrapper userWrapper)
  {
    Query query = Query.select()
                       .alias(UserAchievement.class, "ua")
                       .alias(Achievement.class, "a")
                       .join(UserAchievement.class,"ua.ACHIEVEMENT_ID = a.ID")
                       .where("USER_WRAPPER_ID = ? AND NOTIFIED = ?", userWrapper.getID(), false);
View Full Code Here

  @Override
  public List<VersionStatistic> findStatisticsForVersionAndRef(String projectKey, String version, StatisticRefEnum statisticRefEnum)
  {
    StatisticRef statRef = statisticRefDaoService.get(statisticRefEnum);
    Query query = Query.select().where("PROJECT_KEY = ? AND VERSION = ? AND STATISTIC_REF_ID = ?", projectKey, version, statRef.getID()).order("VALUE DESC");
    return Arrays.asList(ao.find(getClazz(), query));
  }
View Full Code Here

  @Override
  public List<ProjectStatistic> findStatisticsForProjectAndRef(String projectKey, StatisticRefEnum statisticRefEnum)
  {
    StatisticRef statRef = statisticRefDaoService.get(statisticRefEnum);
    Query query = Query.select().where("PROJECT_KEY = ? AND STATISTIC_REF_ID = ?", projectKey, statRef.getID()).order("VALUE DESC");
    return Arrays.asList(ao.find(getClazz(), query));
  }
View Full Code Here

  @Override
  public List<ComponentStatistic> findStatisticsForComponentAndRef(String projectKey, String component, StatisticRefEnum statisticRefEnum)
  {
    StatisticRef statRef = statisticRefDaoService.get(statisticRefEnum);
    Query query = Query.select().where("PROJECT_KEY = ? AND COMPONENT = ? AND STATISTIC_REF_ID = ?", projectKey, component, statRef.getID()).order("VALUE DESC");
    return Arrays.asList(ao.find(getClazz(), query));
  }
View Full Code Here

TOP

Related Classes of net.java.ao.Query

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.