Class DeleteQuery<T>

  • Type Parameters:
    T - The entity class the query will delete from.

    public class DeleteQuery<T>
    extends java.lang.Object
    A repeatable query for deleting entities.
    New API note: this is more likely to change.
    • Field Detail

      • sql

        protected final java.lang.String sql
      • parameters

        protected final java.lang.String[] parameters
      • ownerThread

        protected final java.lang.Thread ownerThread
    • Method Detail

      • forCurrentThread

        public DeleteQuery<T> forCurrentThread()
      • executeDeleteWithoutDetachingEntities

        public void executeDeleteWithoutDetachingEntities()
        Deletes all matching entities without detaching them from the identity scope (aka session/cache). Note that this method may lead to stale entity objects in the session cache. Stale entities may be returned when loaded by their primary key, but not using queries.
      • setParameter

        public DeleteQuery<T> setParameter​(int index,
                                           java.lang.Object parameter)
        Sets the parameter (0 based) using the position in which it was added during building the query.
      • toStringArray

        protected static java.lang.String[] toStringArray​(java.lang.Object[] values)
      • checkThread

        protected void checkThread()