本文整理汇总了Java中com.querydsl.jpa.JPAExpressions类的典型用法代码示例。如果您正苦于以下问题:Java JPAExpressions类的具体用法?Java JPAExpressions怎么用?Java JPAExpressions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JPAExpressions类属于com.querydsl.jpa包,在下文中一共展示了JPAExpressions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: clubHasMooseGroupsWithHuntingDays
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Override
@Transactional(readOnly = true)
public boolean clubHasMooseGroupsWithHuntingDays(final HuntingClub club) {
final QGroupHuntingDay groupHuntingDay = QGroupHuntingDay.groupHuntingDay;
final QHuntingClubGroup group = QHuntingClubGroup.huntingClubGroup;
final QGameSpecies species = QGameSpecies.gameSpecies;
final JPQLQuery<HuntingClubGroup> mooseGroups = JPAExpressions.selectFrom(group)
.join(group.species, species)
.where(group.parentOrganisation.eq(club),
species.officialCode.eq(GameSpecies.OFFICIAL_CODE_MOOSE));
return 0 < jpaQueryFactory.selectFrom(groupHuntingDay)
.where(groupHuntingDay.group.in(mooseGroups))
.fetchCount();
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:17,代码来源:GroupHuntingDayRepositoryImpl.java
示例2: findOrganisationPredicate
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
private static BooleanExpression findOrganisationPredicate(final MoosePermitStatisticsFeature.OrgType orgType,
final String orgCode,
final QHarvestPermit permit) {
final QRiistanhoitoyhdistys rhy = QRiistanhoitoyhdistys.riistanhoitoyhdistys;
switch (orgType) {
case RHY:
return permit.rhy.id.eq(JPAExpressions.select(rhy.id).from(rhy).where(rhy.officialCode.eq(orgCode)));
case RKA:
final QRiistakeskuksenAlue rka = QRiistakeskuksenAlue.riistakeskuksenAlue;
return permit.rhy.id.in(JPAExpressions.select(rhy.id)
.from(rka)
.join(rka.subOrganisations, rhy._super)
.where(rka.officialCode.eq(orgCode)));
case HTA:
final QGISHirvitalousalue hta = QGISHirvitalousalue.gISHirvitalousalue;
return permit.mooseArea.id.eq(JPAExpressions.select(hta.id).from(hta).where(hta.number.eq(orgCode)));
default:
// Fall-through to throwing exception.
}
throw new IllegalStateException("Unknown orgType: " + orgType);
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:24,代码来源:MoosePermitStatisticsService.java
示例3: listPermitsHavingMooseHarvestReport
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
private List<Long> listPermitsHavingMooseHarvestReport(List<MooseHuntingSummary> summaries) {
final QMooseHuntingSummary summary = QMooseHuntingSummary.mooseHuntingSummary;
final QHarvestPermit permit = QHarvestPermit.harvestPermit;
final QHarvestPermitSpeciesAmount speciesAmount = QHarvestPermitSpeciesAmount.harvestPermitSpeciesAmount;
final QGameSpecies species = QGameSpecies.gameSpecies;
final QMooseHarvestReport mooseHarvestReport = QMooseHarvestReport.mooseHarvestReport;
final BooleanExpression speciesAmountMatches = speciesAmount.in(JPAExpressions.select(speciesAmount)
.from(summary)
.join(summary.harvestPermit, permit)
.join(permit.speciesAmounts, speciesAmount)
.join(speciesAmount.gameSpecies, species)
.where(summary.in(summaries),
species.officialCode.eq(GameSpecies.OFFICIAL_CODE_MOOSE)));
return queryFactory.select(permit.id)
.from(mooseHarvestReport)
.join(mooseHarvestReport.speciesAmount, speciesAmount)
.join(speciesAmount.harvestPermit, permit)
.where(speciesAmountMatches)
.fetch();
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:23,代码来源:MooseHuntingSummaryDTOTransformer.java
示例4: groupClubsWithMembersOtherThanContactPerson
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Override
public Map<Long, Set<Long>> groupClubsWithMembersOtherThanContactPerson() {
final QOccupation occupation = QOccupation.occupation;
final QOrganisation club = new QOrganisation("club");
final QOrganisation rhy = new QOrganisation("rhy");
final QOrganisation rka = new QOrganisation("rka");
final BooleanExpression isClubMember = occupation.occupationType.eq(OccupationType.SEURAN_JASEN);
final BooleanExpression isContactPerson = occupation.occupationType.eq(OccupationType.SEURAN_YHDYSHENKILO);
final JPQLQuery<Person> clubContactPersons = JPAExpressions.selectFrom(occupation)
.where(occupation.validAndNotDeleted().and(isContactPerson))
.select(occupation.person);
return queryFactory.from(occupation)
.join(occupation.organisation, club)
.join(club.parentOrganisation, rhy)
.join(rhy.parentOrganisation, rka)
.where(rka.id.eq(rkaId)
.and(occupation.validAndNotDeleted())
.and(isClubMember)
.and(occupation.person.notIn(clubContactPersons)))
.select(rhy.id, club.id)
.groupBy(rhy.id, club.id)
.transform(groupBy(rhy.id).as(set(club.id)));
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:27,代码来源:HuntingClubStatisticsRhyQueries.java
示例5: groupClubsWithMembersOtherThanContactPerson
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Override
public Map<Long, Set<Long>> groupClubsWithMembersOtherThanContactPerson() {
final QOccupation occupation = QOccupation.occupation;
final QOrganisation club = new QOrganisation("club");
final QOrganisation rhy = new QOrganisation("rhy");
final QOrganisation rka = new QOrganisation("rka");
final BooleanExpression isClubMember = occupation.occupationType.eq(OccupationType.SEURAN_JASEN);
final BooleanExpression isContactPerson = occupation.occupationType.eq(OccupationType.SEURAN_YHDYSHENKILO);
final JPQLQuery<Person> clubContactPersons = JPAExpressions.selectFrom(occupation)
.where(occupation.validAndNotDeleted().and(isContactPerson))
.select(occupation.person);
return queryFactory.from(occupation)
.join(occupation.organisation, club)
.join(club.parentOrganisation, rhy)
.join(rhy.parentOrganisation, rka)
.where(occupation.validAndNotDeleted()
.and(isClubMember)
.and(occupation.person.notIn(clubContactPersons)))
.select(rka.id, club.id)
.groupBy(rka.id, club.id)
.transform(groupBy(rka.id).as(set(club.id)));
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:26,代码来源:HuntingClubStatisticsRkaQueries.java
示例6: findActiveByParentOrganisation
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Override
@Transactional(readOnly = true)
public List<Occupation> findActiveByParentOrganisation(final Organisation parentOrganisation) {
Objects.requireNonNull(parentOrganisation, "organisation is null");
final QOccupation occupation = QOccupation.occupation;
final QOrganisation organisation = QOrganisation.organisation;
final JPQLQuery<Organisation> childOrganisations = JPAExpressions
.selectFrom(organisation).where(organisation.parentOrganisation.eq(parentOrganisation));
return jpqlQueryFactory.selectFrom(occupation)
.join(occupation.person).fetchJoin()
.join(occupation.organisation).fetchJoin()
.where(occupation.validAndNotDeleted(), occupation.organisation.in(childOrganisations))
.fetch();
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:18,代码来源:OccupationRepositoryImpl.java
示例7: findAvailableAllocationEntities
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Override
public List<AllocationEntity> findAvailableAllocationEntities(LocalDate dateFrom, LocalDate dateTo) {
QAllocationEntity allocationEntity = QAllocationEntity.allocationEntity;
QAccomodation accomodation = QAccomodation.accomodation;
JPAQueryFactory queryFactory = new JPAQueryFactory(entityManager);
BooleanBuilder builder = new BooleanBuilder(), doesPeriodsOverlap = new BooleanBuilder();
doesPeriodsOverlap.and(accomodation.dateFrom.after(dateTo).not())
.and(accomodation.dateTo.before(dateFrom).not());
builder.and(allocationEntity.availability.isTrue());
builder.and(JPAExpressions.selectFrom(accomodation)
.where(accomodation.in(allocationEntity.accomodations), doesPeriodsOverlap).notExists());
return queryFactory
.selectFrom(allocationEntity)
.where(builder)
.fetch();
}
开发者ID:marcin-pwr,项目名称:hotel,代码行数:20,代码来源:AllocationEntityRepositoryImpl.java
示例8: getNumberOfFreePlaces
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Override
public Integer getNumberOfFreePlaces() {
QAllocationEntity allocationEntity = QAllocationEntity.allocationEntity;
QAccomodation accomodation = QAccomodation.accomodation;
JPAQueryFactory queryFactory = new JPAQueryFactory(entityManager);
BooleanBuilder builder = new BooleanBuilder(),
isAccomodationInCurrentDate = new BooleanBuilder();
LocalDate currentDate = new LocalDate();
isAccomodationInCurrentDate.and(accomodation.dateFrom.after(currentDate).not())
.and(accomodation.dateTo.before(currentDate).not());
builder.and(allocationEntity.availability.isTrue());
builder.and(JPAExpressions.selectFrom(accomodation)
.where(accomodation.in(allocationEntity.accomodations), isAccomodationInCurrentDate).notExists());
return queryFactory
.from(allocationEntity)
.select(allocationEntity.capacity.sum())
.where(builder)
.fetchOne();
}
开发者ID:marcin-pwr,项目名称:hotel,代码行数:23,代码来源:AllocationEntityRepositoryImpl.java
示例9: subscriberExists
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
private static Predicate subscriberExists(final QAnnouncement announcement,
final QAnnouncementSubscriber subscriber,
final Predicate predicate) {
return JPAExpressions.selectFrom(subscriber)
.where(subscriber.announcement.eq(announcement), predicate)
.exists();
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:8,代码来源:ListAnnouncementFilter.java
示例10: countUsers
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
private void countUsers(AdminMetricsDTO dto) {
final QSystemUser systemUser = QSystemUser.systemUser;
final QPerson person = QPerson.person;
final QOccupation occupation = QOccupation.occupation;
final BooleanExpression roleUserHavingPassword = systemUser.role.eq(SystemUser.Role.ROLE_USER)
.and(systemUser.password.isNotNull());
final BooleanExpression occupationValidAndNotForClub = occupation.validAndNotDeleted()
.and(occupation.occupationType.notIn(OccupationType.clubValues()));
// Rekisteröityneet henkilöt (ei välttämättä roolia)
dto.setCountNormalUser(queryFactory.select(systemUser.person)
.from(systemUser)
.where(roleUserHavingPassword.and(systemUser.person.isNotNull()))
.distinct()
.fetchCount());
// Kaikki henkilöt
dto.setCountPerson(queryFactory.from(person).fetchCount());
// Rekisteröityneet henkilöt joilla tehtävä jossakin rk-organisaatiossa
final BooleanExpression occupationExistsBySystemUser = JPAExpressions.selectFrom(occupation)
.where(occupation.person.eq(systemUser.person).and(occupationValidAndNotForClub))
.exists();
dto.setCountNormalUserWithOccupationAndPassword(queryFactory.select(systemUser.person)
.from(systemUser)
.where(occupationExistsBySystemUser.and(roleUserHavingPassword))
.distinct()
.fetchCount());
// Kaikki henkilöt joilla tehtävä jossakin rk-organisaatiossa
final BooleanExpression occupationExistsByPerson = JPAExpressions.selectFrom(occupation)
.where(occupation.person.eq(person).and(occupationValidAndNotForClub))
.exists();
dto.setCountAllPeopleWithOccupation(queryFactory.from(person)
.where(occupationExistsByPerson)
.distinct()
.fetchCount());
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:41,代码来源:AdminMetricsFeature.java
示例11: copyAreas
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Transactional
public void copyAreas(final int fromYear, final int toYear) {
final QHuntingClubArea huntingClubArea = QHuntingClubArea.huntingClubArea;
final QHuntingClubArea nextYearArea = new QHuntingClubArea("nextYearArea");
final JPQLQuery<HuntingClub> clubsHavingAreaNextYear = JPAExpressions.selectFrom(nextYearArea)
.select(nextYearArea.club).distinct()
.where(nextYearArea.huntingYear.eq(toYear)
.and(nextYearArea.active.eq(true)));
final List<Long> areaIdsToCopy = queryFactory
.from(huntingClubArea)
.select(huntingClubArea.id)
.where(huntingClubArea.huntingYear.eq(fromYear)
.and(huntingClubArea.active.eq(true))
.and(huntingClubArea.club.notIn(clubsHavingAreaNextYear))
)
.fetch();
LOG.info(String.format("Going to copy from year %s to year %s areas: %s", fromYear, toYear, areaIdsToCopy));
areaIdsToCopy.stream()
.map(id -> new HuntingClubAreaCopyDTO(id, toYear, true))
.forEach(dto -> {
LOG.info("Copying area id:" + dto.getId());
feature.copyWithoutTransform(dto);
LOG.info("Copying area id:" + dto.getId() + " complete.");
});
LOG.info("Copying done.");
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:30,代码来源:CopyAreasFromHuntingYearToAnotherFeature.java
示例12: getPermitZones
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
Map<Long, Map<String, Object>> getPermitZones(final HarvestPermit permit,
final int huntingYear,
final GameSpecies species) {
final QHarvestPermit harvestPermit = QHarvestPermit.harvestPermit;
final QHuntingClub huntingClub = QHuntingClub.huntingClub;
final QHuntingClubGroup huntingClubGroup = QHuntingClubGroup.huntingClubGroup;
final QHuntingClubArea huntingClubArea = QHuntingClubArea.huntingClubArea;
final QGISZone zone = QGISZone.gISZone;
final JPQLQuery<HuntingClub> permitPartnerClubs = JPAExpressions.selectFrom(harvestPermit)
.join(harvestPermit.permitPartners, huntingClub)
.where(harvestPermit.eq(permit))
.select(huntingClub);
return queryFactory
.from(huntingClubGroup)
.join(huntingClubGroup.parentOrganisation, huntingClub._super)
.join(huntingClubGroup.huntingArea, huntingClubArea)
.join(huntingClubArea.zone, zone)
.where(huntingClubGroup.harvestPermit.eq(permit),
huntingClub.in(permitPartnerClubs),
huntingClubGroup.species.eq(species),
huntingClubGroup.huntingYear.eq(huntingYear),
huntingClubArea.huntingYear.eq(huntingYear),
huntingClubArea.active.isTrue())
.select(zone.id,
huntingClub.id,
huntingClub.nameFinnish,
huntingClub.nameSwedish,
zone.computedAreaSize)
.distinct()
.fetch()
.stream()
.collect(toMap(tuple -> tuple.get(zone.id), tuple -> ImmutableMap.of(
GeoJSONConstants.PROPERTY_CLUB_NAME, LocalisedString.of(
tuple.get(huntingClub.nameFinnish), tuple.get(huntingClub.nameSwedish)).asMap(),
GeoJSONConstants.PROPERTY_HUNTING_CLUB_ID, tuple.get(huntingClub.id),
GeoJSONConstants.PROPERTY_AREA_SIZE, tuple.get(zone.computedAreaSize))));
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:40,代码来源:SharedPermitMapFeature.java
示例13: getHarvestForPermit
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
private List<Harvest> getHarvestForPermit(final HarvestPermit permit,
final int huntingYear,
final GameSpecies species) {
final QHarvestPermit harvestPermit = QHarvestPermit.harvestPermit;
final QHuntingClub huntingClub = QHuntingClub.huntingClub;
final QHuntingClubGroup huntingClubGroup = QHuntingClubGroup.huntingClubGroup;
final QGroupHuntingDay groupHuntingDay = QGroupHuntingDay.groupHuntingDay;
final QHarvest harvest = QHarvest.harvest;
final JPQLQuery<HuntingClub> permitPartnerClubs = JPAExpressions.selectFrom(harvestPermit)
.join(harvestPermit.permitPartners, huntingClub)
.where(harvestPermit.eq(permit))
.select(huntingClub);
// NOTE: Result should not contain duplicate Harvest,
// because Harvest can only be linked to single hunting group day
return queryFactory
.from(huntingClubGroup)
.join(huntingClubGroup.parentOrganisation, huntingClub._super)
.join(huntingClubGroup.huntingDays, groupHuntingDay)
.join(groupHuntingDay.harvests, harvest)
.where(huntingClubGroup.harvestPermit.eq(permit),
huntingClub.in(permitPartnerClubs),
huntingClubGroup.huntingYear.eq(huntingYear),
huntingClubGroup.species.eq(species))
.orderBy(harvest.pointOfTime.desc(), harvest.id.desc())
.select(huntingClub, harvest)
.fetch()
.stream()
.map(tuple -> {
final HuntingClub resultClub = Objects.requireNonNull(tuple.get(0, HuntingClub.class));
final Harvest resultHarvest = Objects.requireNonNull(tuple.get(1, Harvest.class));
resultHarvest.setHuntingClub(resultClub);
return resultHarvest;
})
.collect(toList());
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:39,代码来源:SharedPermitMapFeature.java
示例14: clubHasGroupsWithActiveMembers
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
private boolean clubHasGroupsWithActiveMembers(final HuntingClub club) {
final QOccupation occupation = QOccupation.occupation;
final QHuntingClubGroup group = QHuntingClubGroup.huntingClubGroup;
return 0 < occupationRepository.count(occupation.organisation.in(
JPAExpressions.selectFrom(group).where(group.parentOrganisation.eq(club)))
.and(occupation.validAndNotDeleted()));
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:8,代码来源:ContactPersonCanExitClubService.java
示例15: deactivateAccountsForDeceased
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Override
@Transactional
public void deactivateAccountsForDeceased() {
final QSystemUser systemUser = QSystemUser.systemUser;
final QPerson person = QPerson.person;
jpqlQueryFactory.update(systemUser)
.where(systemUser.active.isTrue()
.and(systemUser.role.eq(SystemUser.Role.ROLE_USER))
.and(systemUser.person.isNotNull())
.and(systemUser.person.in(JPAExpressions.selectFrom(person)
.where(person.deletionCode.eq(Person.DeletionCode.D)))))
.set(systemUser.active, false)
.execute();
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:16,代码来源:UserRepositoryImpl.java
示例16: matchesSpeciesAndHuntingYear
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@QueryDelegate(HarvestPermitSpeciesAmount.class)
public static BooleanExpression matchesSpeciesAndHuntingYear(QHarvestPermitSpeciesAmount spa,
Path<HarvestPermit> permit,
int gameSpeciesCode,
int year) {
final QGameSpecies gameSpecies = new QGameSpecies("gameSpecies_matchesSpeciesAndHuntingYear");
return JPAExpressions.selectFrom(spa)
.join(spa.gameSpecies, gameSpecies)
.where(spa.harvestPermit.eq(permit)
.and(gameSpecies.officialCode.eq(gameSpeciesCode))
.and(validOnHuntingYear(spa, year))
).exists();
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:14,代码来源:HarvestPermitSpeciesAmount.java
示例17: listMine
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Transactional(readOnly = true)
public List<HarvestReportDTOBase> listMine(Long personId) {
Person person = activeUserService.getActiveUser().getPerson();
if (person == null) {
if (personId != null && activeUserService.isModeratorOrAdmin()) {
person = personRepository.getOne(personId);
} else {
// should never get here
return Collections.emptyList();
}
}
final QHarvestReport harvestReport = QHarvestReport.harvestReport;
final QHarvest harvest = QHarvest.harvest;
final QHarvestPermit harvestPermit = QHarvestPermit.harvestPermit;
final BooleanExpression harvestExistsAsShooter = JPAExpressions.selectFrom(harvest)
.leftJoin(harvest.harvestPermit, harvestPermit)
.where(harvest.harvestReport.id.eq(harvestReport.id)
.and(harvest.actualShooter.eq(person))
.and(harvestPermit.isNull().or(harvestPermit.harvestsAsList.eq(false)))
)
.exists();
final List<HarvestReport> res = new JPAQuery<>(entityManager).from(harvestReport)
.where(harvestReport.author.eq(person)
.or(harvestExistsAsShooter)
.and(harvestReport.state.ne(HarvestReport.State.DELETED)))
.select(harvestReport)
.fetch();
return F.mapNonNullsToList(res, this::toDTO);
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:31,代码来源:HarvestReportCrudFeature.java
示例18: endOccupationsForDeceased
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
@Override
@Transactional
public void endOccupationsForDeceased() {
final QOccupation occupation = QOccupation.occupation;
final QPerson person = QPerson.person;
jpqlQueryFactory.update(occupation)
.where(occupation.validAndNotDeleted()
.and(occupation.person.in(JPAExpressions.selectFrom(person)
.where(person.deletionCode.eq(Person.DeletionCode.D)))))
.set(occupation.endDate, DateUtil.today().minusDays(1))
.execute();
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:14,代码来源:OccupationRepositoryImpl.java
示例19: queryPersonWithExistingOrPastOccupation
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
private static JPQLQuery<Person> queryPersonWithExistingOrPastOccupation(
final @Nonnull OccupationType occupationType,
final @Nonnull Riistanhoitoyhdistys rhy) {
final QOccupation qRhyOccupation = QOccupation.occupation;
return JPAExpressions
.select(qRhyOccupation.person)
.from(qRhyOccupation)
.where(qRhyOccupation.organisation.eq(rhy)
.and(qRhyOccupation.occupationType.eq(occupationType))
.and(qRhyOccupation.beginDate.isNull().or(qRhyOccupation.beginDate.loe(today())))
.and(qRhyOccupation.notDeleted()));
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:14,代码来源:JHTTrainingRepositoryImpl.java
示例20: findCategoriesWithApplicationInstances
import com.querydsl.jpa.JPAExpressions; //导入依赖的package包/类
public List<Category> findCategoriesWithApplicationInstances() {
final QCategory category = QCategory.category;
final QApplicationInstance applicationInstance = QApplicationInstance.applicationInstance;
final JPQLQuery<Category> list = JPAExpressions.selectFrom(applicationInstance)
.select(applicationInstance.category);
return new JPAQuery<Category>(getEntityManager()).from(category)
.where(category.in(list))
.orderBy(category.name.asc())
.fetch();
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:13,代码来源:CategoryDao.java
注:本文中的com.querydsl.jpa.JPAExpressions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论