use of org.bimserver.database.actions.GetAllNewServicesOfProjectDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getAllNewServicesOfProject.
@Override
public List<org.bimserver.interfaces.objects.SNewService> getAllNewServicesOfProject(Long poid) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Set<NewService>> action = new GetAllNewServicesOfProjectDatabaseAction(session, getInternalAccessMethod(), poid);
List<SNewService> convertToSListRevision = getBimServer().getSConverter().convertToSListNewService(session.executeAndCommitAction(action));
Collections.sort(convertToSListRevision, new SNewServiceComparator());
return convertToSListRevision;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations