use of org.bimserver.database.actions.GetNrPrimitivesDatabaseAction in project BIMserver by opensourceBIM.
the class ServiceImpl method getNrPrimitives.
@Override
public Long getNrPrimitives(Long roid) throws ServerException, UserException {
requireAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<Long> action = new GetNrPrimitivesDatabaseAction(getBimServer(), session, getInternalAccessMethod(), roid, getAuthorization());
return session.executeAndCommitAction(action);
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations