use of org.bimserver.interfaces.objects.SDataObject in project BIMserver by opensourceBIM.
the class LowLevelServiceImpl method getDataObjectByGuid.
@Override
public SDataObject getDataObjectByGuid(Long roid, String guid) throws ServerException, UserException {
requireAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<DataObject> action = new GetDataObjectByGuidDatabaseAction(getBimServer(), session, getInternalAccessMethod(), roid, guid, getAuthorization());
SDataObject dataObject = getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(action));
return dataObject;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
use of org.bimserver.interfaces.objects.SDataObject in project BIMserver by opensourceBIM.
the class LowLevelServiceImpl method getDataObjectByOid.
@Override
public SDataObject getDataObjectByOid(Long roid, Long oid) throws ServerException, UserException {
requireAuthenticationAndRunningServer();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
BimDatabaseAction<DataObject> action = new GetDataObjectByOidDatabaseAction(getBimServer(), session, getInternalAccessMethod(), roid, oid, getAuthorization());
SDataObject dataObject = getBimServer().getSConverter().convertToSObject(session.executeAndCommitAction(action));
return dataObject;
} catch (Exception e) {
return handleException(e);
} finally {
session.close();
}
}
Aggregations