protected DaoResult delete ( Connection conn , T bo ) { if ( bo == null ) { return new DaoResult ( DaoOperationStatus . NOT_FOUND ) ; } int numRows = execute ( conn , calcSqlDeleteOne ( bo ) , rowMapper . valuesForColumns ( bo , rowMapper . getPrimaryKeyColumns ( ) ) ) ; DaoResult result = numRows > 0 ? new DaoResult ( DaoOperationStatus . SUCCESSFUL , bo ) : new DaoResult ( DaoOperationStatus . NOT_FOUND ) ; if ( numRows > 0 ) { invalidateCache ( bo , CacheInvalidationReason . DELETE ) ; } return result ; }
Delete an existing BO from storage .