Class DistributedQueryImpl

java.lang.Object
org.apache.openjpa.kernel.QueryImpl
org.apache.openjpa.slice.DistributedQueryImpl
All Implemented Interfaces:
Serializable, Query, QueryContext, QueryFlushModes, QueryOperations

public class DistributedQueryImpl extends QueryImpl
Extension with slice locking policy.
Author:
Pinaki Poddar
See Also:
  • Constructor Details

  • Method Details

    • execute

      public Object execute(Map params)
      Overrides to set the query targets via policy, if user has not already set the targets via hint explicitly on this query.
      Specified by:
      execute in interface Query
      Overrides:
      execute in class QueryImpl
    • deleteAll

      public long deleteAll(Object[] params)
      Overrides to run a bulk delete on the targets of the policy as well.
      Specified by:
      deleteAll in interface Query
      Overrides:
      deleteAll in class QueryImpl
      Parameters:
      params - the positional parameters for the query
      Returns:
      the number of instances that were deleted
    • deleteAll

      public long deleteAll(Map params)
      Description copied from interface: Query
      Deletes all of the instances that are satisfied by the query.
      Specified by:
      deleteAll in interface Query
      Overrides:
      deleteAll in class QueryImpl
      Parameters:
      params - the named parameter map
      Returns:
      the number of instances that were deleted
    • updateAll

      public long updateAll(Object[] params)
      Overrides to run a bulk update on the targets of the policy as well.
      Specified by:
      updateAll in interface Query
      Overrides:
      updateAll in class QueryImpl
      Parameters:
      params - the positional parameter array
      Returns:
      the number of instances that were update
    • updateAll

      public long updateAll(Map params)
      Description copied from interface: Query
      Performs an update of the instances that are satisfied by the query.
      Specified by:
      updateAll in interface Query
      Overrides:
      updateAll in class QueryImpl
      Parameters:
      params - the named parameter map
      Returns:
      the number of instances that were update
    • lock

      public void lock()
      Always uses lock irrespective of super's multi-threaded settings.
      Specified by:
      lock in interface QueryContext
      Overrides:
      lock in class QueryImpl
    • unlock

      public void unlock()
      Description copied from interface: QueryContext
      Unlock the query's internal lock.
      Specified by:
      unlock in interface QueryContext
      Overrides:
      unlock in class QueryImpl