Class JpaUtils.PartitionedCriteriaDelete<T,I>

java.lang.Object
com.atlassian.bamboo.jpa.JpaUtils.PartitionedCriteriaDelete<T,I>
Enclosing class:
JpaUtils

public abstract static class JpaUtils.PartitionedCriteriaDelete<T,I> extends Object
Creates a CriteriaDelete wrapper that initialises commonly used JPA variables. It will automatically partition the supplied collection and execute apply(List) if need be. You can customise the queries through apply(List) and run them with

executeUpdates(Collection)

  • Field Details

    • cb

      protected final javax.persistence.criteria.CriteriaBuilder cb
    • delete

      protected final javax.persistence.criteria.CriteriaDelete<T> delete
    • entity

      protected final javax.persistence.criteria.Root<T> entity
  • Constructor Details

    • PartitionedCriteriaDelete

      protected PartitionedCriteriaDelete(DbmsBean dbmsBean, org.hibernate.SessionFactory sessionFactory, Class<T> entity)
  • Method Details

    • apply

      public abstract void apply(List<I> partition)
    • executeUpdates

      public void executeUpdates(Collection<I> values)