/** * Check whether the given tables/query-spaces are to be executed against given the currently queued actions. * * @param tables The table/query-spaces to check. * * @return {@code true} if we contain pending actions against any of the given tables; {@code false} otherwise. */ public boolean areTablesToBeUpdated(@SuppressWarnings("rawtypes") Set tables) { if ( tables.isEmpty() ) { return false; } for ( ListProvider listProvider : EXECUTABLE_LISTS_MAP.values() ) { ExecutableList<?> l = listProvider.get( this ); if ( areTablesToBeUpdated( l, tables ) ) { return true; } } if(unresolvedInsertions == null) { return false; } return areTablesToBeUpdated( unresolvedInsertions, tables ); }
private boolean flushIsReallyNeeded(AutoFlushEvent event, final EventSource source) { return source.getHibernateFlushMode() == FlushMode.ALWAYS || source.getActionQueue().areTablesToBeUpdated( event.getQuerySpaces() ); }
/** * Check whether the given tables/query-spaces are to be executed against given the currently queued actions. * * @param tables The table/query-spaces to check. * * @return {@code true} if we contain pending actions against any of the given tables; {@code false} otherwise. */ public boolean areTablesToBeUpdated(@SuppressWarnings("rawtypes") Set tables) { if ( tables.isEmpty() ) { return false; } for ( ListProvider listProvider : EXECUTABLE_LISTS_MAP.values() ) { ExecutableList<?> l = listProvider.get( this ); if ( areTablesToBeUpdated( l, tables ) ) { return true; } } if(unresolvedInsertions == null) { return false; } return areTablesToBeUpdated( unresolvedInsertions, tables ); }
private boolean flushIsReallyNeeded(AutoFlushEvent event, final EventSource source) { return source.getActionQueue() .areTablesToBeUpdated( event.getQuerySpaces() ) || source.getFlushMode()==FlushMode.ALWAYS; }
private boolean flushIsReallyNeeded(AutoFlushEvent event, final EventSource source) { return source.getActionQueue() .areTablesToBeUpdated( event.getQuerySpaces() ) || source.getFlushMode()==FlushMode.ALWAYS; }
private boolean flushIsReallyNeeded(AutoFlushEvent event, final EventSource source) { return source.getHibernateFlushMode() == FlushMode.ALWAYS || source.getActionQueue().areTablesToBeUpdated( event.getQuerySpaces() ); }