use of org.bimserver.database.actions.GetDataObjectsByTypeDatabaseAction in project BIMserver by opensourceBIM.
the class LowLevelServiceImpl method getDataObjectsByType.
@Override
public List<SDataObject> getDataObjectsByType(Long roid, String packageName, String className, Boolean flat) throws ServerException, UserException {
requireAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
BimDatabaseAction<List<DataObject>> action = new GetDataObjectsByTypeDatabaseAction(getBimServer(), session, getInternalAccessMethod(), roid, packageName, className, getAuthorization(), flat);
try {
return getBimServer().getSConverter().convertToSListDataObject(session.executeAndCommitAction(action));
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations