Class JustFailDedupeStrategy

  • All Implemented Interfaces:

    public class JustFailDedupeStrategy
    extends Object
    implements DedupeStrategy
    Do nothing. Fail whole thing if there is any duplicates
    • Constructor Detail

      • JustFailDedupeStrategy

        public JustFailDedupeStrategy()
    • Method Detail

      • perform

        public void perform​(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
                            SortedSet<Object> ids)
                     throws UpgradeException
        Description copied from interface: DedupeStrategy
        Remove duplicates so a unique constraint can be added
        Specified by:
        perform in interface DedupeStrategy
        jdbcTemplate - A JdbcTemplate to be used
        ids - Set of Ids of duplicate rows in DB. Upon invocation of this method, only one of them can remain in the DB. All Confluence primary keys are of type Long or String so they can be used in SortedSet.
        UpgradeException - Thrown if there is any error removing duplicates, will cancel the constraint adding process