use of org.bimserver.database.query.conditions.HasReferenceToInCondition in project BIMserver by opensourceBIM.
the class GetAllCheckoutsOfProjectDatabaseAction method execute.
@Override
public List<Checkout> execute() throws UserException, BimserverLockConflictException, BimserverDatabaseException {
Project project = getProjectByPoid(poid);
Set<Project> projects = new HashSet<Project>();
if (checkSubProjects) {
getSubProjects(project, projects);
} else {
projects.add(project);
}
Condition condition = new HasReferenceToInCondition(StorePackage.eINSTANCE.getCheckout_Project(), projects);
Map<Long, Checkout> query = getDatabaseSession().query(condition, Checkout.class, OldQuery.getDefault());
return CollectionUtils.mapToList(query);
}
Aggregations