use of org.bimserver.database.actions.CountDatabaseAction in project BIMserver by opensourceBIM.
the class LowLevelServiceImpl method count.
public Integer count(Long roid, String className) throws UserException, ServerException {
requireAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
CountDatabaseAction action = new CountDatabaseAction(getBimServer(), session, getInternalAccessMethod(), roid, className, getAuthorization());
return session.executeAndCommitAction(action);
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations