Search in sources :

Example 1 with DeleteQueryEngineDatabaseAction

use of org.bimserver.database.actions.DeleteQueryEngineDatabaseAction in project BIMserver by opensourceBIM.

the class PluginServiceImpl method deleteQueryEngine.

@Override
public void deleteQueryEngine(Long iid) throws ServerException, UserException {
    requireRealUserAuthentication();
    DatabaseSession session = getBimServer().getDatabase().createSession();
    try {
        BimDatabaseAction<Void> action = new DeleteQueryEngineDatabaseAction(session, getInternalAccessMethod(), iid);
        session.executeAndCommitAction(action);
    } catch (Exception e) {
        handleException(e);
    } finally {
        session.close();
    }
}
Also used : DatabaseSession(org.bimserver.database.DatabaseSession) DeleteQueryEngineDatabaseAction(org.bimserver.database.actions.DeleteQueryEngineDatabaseAction) IOException(java.io.IOException) ServerException(org.bimserver.shared.exceptions.ServerException) BimserverDatabaseException(org.bimserver.BimserverDatabaseException) UserException(org.bimserver.shared.exceptions.UserException)

Aggregations

IOException (java.io.IOException)1 BimserverDatabaseException (org.bimserver.BimserverDatabaseException)1 DatabaseSession (org.bimserver.database.DatabaseSession)1 DeleteQueryEngineDatabaseAction (org.bimserver.database.actions.DeleteQueryEngineDatabaseAction)1 ServerException (org.bimserver.shared.exceptions.ServerException)1 UserException (org.bimserver.shared.exceptions.UserException)1