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