Package com.mysema.query.jpa.impl

Examples of com.mysema.query.jpa.impl.JPAQuery.from()


 
  @Override
  public ArtifactVersion getByArtifactAndVersion(Artifact artifact, String version) {
    JPAQuery query = new JPAQuery(getEntityManager());
   
    query.from(qArtifactVersion)
      .where(qArtifactVersion.artifact.eq(artifact),
          qArtifactVersion.version.eq(version));
   
    return query.singleResult(qArtifactVersion);
  }
View Full Code Here


 
  @Override
  public List<ArtifactVersion> listRecentReleases(int limit) {
    JPAQuery query = new JPAQuery(getEntityManager());
   
    query.from(qArtifactVersion)
      .where(qArtifactVersion.artifact.deprecationStatus.eq(ArtifactDeprecationStatus.NORMAL))
      .orderBy(qArtifactVersion.lastUpdateDate.desc())
      .limit(limit);
   
    return query.list(qArtifactVersion);
View Full Code Here

 
  @Override
  public ArtifactNotificationRule getByFollowedArtifactAndRegex(FollowedArtifact followedArtifact, String regex) {
    JPAQuery query = new JPAQuery(getEntityManager());
   
    query.from(qArtifactNotificationRule)
      .where(qArtifactNotificationRule.followedArtifact.eq(followedArtifact))
      .where(qArtifactNotificationRule.regex.eq(regex));
   
    return query.uniqueResult(qArtifactNotificationRule);
  }
View Full Code Here

 
  @Override
  public List<ArtifactVersionNotification> listByArtifact(Artifact artifact) {
    JPAQuery query = new JPAQuery(getEntityManager());
   
    query.from(qArtifactVersionNotification)
      .where(qArtifactVersionNotification.artifactVersion.artifact.eq(artifact))
      .orderBy(qArtifactVersionNotification.creationDate.desc());
   
    return query.list(qArtifactVersionNotification);
  }
View Full Code Here

 
  @Override
  public List<User> listFollowers(Artifact artifact) {
    JPAQuery query = new JPAQuery(getEntityManager());
   
    query.from(qUser)
      .where(qUser.followedArtifacts.any().artifact.eq(artifact));
   
    return query.list(qUser);
  }
}
View Full Code Here

        emp = employeeRepository.save(emp);

        QEmployee $ = QEmployee.employee;
        JPAQuery query = new JPAQuery(em);

        Employee loaded = query.from($)
                               .where($.empNo.eq("21011"))
                               .uniqueResult($);

        assertThat(loaded).isNotNull();
        assertThat(loaded.getEmpNo()).isEqualTo(emp.getEmpNo());
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.