protected Long performCommitLogic ( EDBCommit commit ) throws EDBException { if ( ! ( commit instanceof JPACommit ) ) { throw new EDBException ( "The given commit type is not supported." ) ; } if ( commit . isCommitted ( ) ) { throw new EDBException ( "EDBCommit is already commitet." ) ; } if ( revisionCheckEnabled && commit . getParentRevisionNumber ( ) != null && ! commit . getParentRevisionNumber ( ) . equals ( getCurrentRevisionNumber ( ) ) ) { throw new EDBException ( "EDBCommit do not have the correct head revision number." ) ; } runBeginCommitHooks ( commit ) ; EDBException exception = runPreCommitHooks ( commit ) ; if ( exception != null ) { return runErrorHooks ( commit , exception ) ; } Long timestamp = performCommit ( ( JPACommit ) commit ) ; runEDBPostHooks ( commit ) ; return timestamp ; }
Performs the actual commit logic for the EDB including the hooks and the revision checking .