@ Override public void update ( IEntityGroup group ) throws GroupsException { Connection conn = null ; boolean exists = existsInDatabase ( group ) ; try { conn = RDBMServices . getConnection ( ) ; setAutoCommit ( conn , false ) ; try { if ( exists ) { primUpdate ( group , conn ) ; } else { primAdd ( group , conn ) ; } primUpdateMembers ( ( EntityGroupImpl ) group , conn ) ; commit ( conn ) ; } catch ( Exception ex ) { rollback ( conn ) ; throw new GroupsException ( "Problem updating " + this + ex ) ; } } catch ( SQLException sqlex ) { throw new GroupsException ( sqlex ) ; } finally { if ( conn != null ) { try { setAutoCommit ( conn , true ) ; } catch ( SQLException sqle ) { throw new GroupsException ( sqle ) ; } finally { RDBMServices . releaseConnection ( conn ) ; } } } }
Commit this entity AND ITS MEMBERSHIPS to the underlying store .