protected DaoResult createOrUpdate ( Connection conn , T bo ) { if ( bo == null ) { return null ; } DaoResult result = create ( conn , bo ) ; DaoOperationStatus status = result . getStatus ( ) ; if ( status == DaoOperationStatus . DUPLICATED_VALUE || status == DaoOperationStatus . DUPLICATED_UNIQUE ) { result = update ( conn , bo ) ; } return result ; }
Create a new BO or update an existing one .