private List < JPAObject > checkUpdates ( List < JPAObject > updates ) throws EDBException { List < JPAObject > failedObjects = new ArrayList < JPAObject > ( ) ; for ( JPAObject update : updates ) { try { Integer modelVersion = investigateVersionAndCheckForConflict ( update ) ; modelVersion ++ ; update . removeEntry ( EDBConstants . MODEL_VERSION ) ; update . addEntry ( new JPAEntry ( EDBConstants . MODEL_VERSION , modelVersion + "" , Integer . class . getName ( ) , update ) ) ; } catch ( EDBException e ) { failedObjects . add ( update ) ; } } return failedObjects ; }
Checks every update for a potential conflict . Returns a list of objects where a conflict has been found .