use of org.bimserver.database.actions.UpdateQueryEngineDatabaseAction in project BIMserver by opensourceBIM.
the class PluginServiceImpl method updateQueryEngine.
@Override
public void updateQueryEngine(SQueryEnginePluginConfiguration queryEngine) throws ServerException, UserException {
requireRealUserAuthentication();
DatabaseSession session = getBimServer().getDatabase().createSession();
try {
QueryEnginePluginConfiguration convert = session.get(queryEngine.getOid(), OldQuery.getDefault());
getBimServer().getSConverter().convertFromSObject(queryEngine, convert, session);
session.executeAndCommitAction(new UpdateQueryEngineDatabaseAction(session, getInternalAccessMethod(), convert));
} catch (Exception e) {
handleException(e);
} finally {
session.close();
}
}
Aggregations