public void executeWithoutTrigger ( ) throws EFapsException { if ( Update . STATUSOK . getStati ( ) . isEmpty ( ) ) { final Context context = Context . getThreadContext ( ) ; ConnectionResource con = null ; try { con = context . getConnectionResource ( ) ; for ( final Entry < SQLTable , List < Value > > entry : this . table2values . entrySet ( ) ) { final SQLUpdate update = Context . getDbType ( ) . newUpdate ( entry . getKey ( ) . getSqlTable ( ) , entry . getKey ( ) . getSqlColId ( ) , getInstance ( ) . getId ( ) ) ; // iterate in reverse order and only execute the ones that are not added yet, permitting // to overwrite the value for attributes by adding them later final ReverseListIterator < Value > iterator = new ReverseListIterator <> ( entry . getValue ( ) ) ; final Set < String > added = new HashSet <> ( ) ; while ( iterator . hasNext ( ) ) { final Value value = iterator . next ( ) ; final String colKey = value . getAttribute ( ) . getSqlColNames ( ) . toString ( ) ; if ( ! added . contains ( colKey ) ) { value . getAttribute ( ) . prepareDBUpdate ( update , value . getValues ( ) ) ; added . add ( colKey ) ; } } final Set < String > updatedColumns = update . execute ( con ) ; final Iterator < Entry < Attribute , Value > > attrIter = this . trigRelevantAttr2values . entrySet ( ) . iterator ( ) ; while ( attrIter . hasNext ( ) ) { final Entry < Attribute , Value > trigRelEntry = attrIter . next ( ) ; if ( trigRelEntry . getKey ( ) . getTable ( ) . equals ( entry . getKey ( ) ) ) { boolean updated = false ; for ( final String colName : trigRelEntry . getKey ( ) . getSqlColNames ( ) ) { if ( updatedColumns . contains ( colName ) ) { updated = true ; break ; } } if ( ! updated ) { attrIter . remove ( ) ; } } } } AccessCache . registerUpdate ( getInstance ( ) ) ; Queue . registerUpdate ( getInstance ( ) ) ; } catch ( final SQLException e ) { Update . LOG . error ( "Update of '" + this . instance + "' not possible" , e ) ; throw new EFapsException ( getClass ( ) , "executeWithoutTrigger.SQLException" , e , this . instance ) ; } } else { throw new EFapsException ( getClass ( ) , "executeWithout.StatusInvalid" , Update . STATUSOK . getStati ( ) ) ; } }
The update is done without calling triggers and check of access rights .