Class DeleteObjectQuery

  • All Implemented Interfaces:, java.lang.Cloneable

    public class DeleteObjectQuery
    extends ObjectLevelModifyQuery

    Purpose: Used for deleting objects.

    Responsibilities: Extract primary key from object and delete it.

    See Also:
    Serialized Form
    Yvon Lavoie
    TOPLink/Java 1.0
    • Field Detail

      • isFullRowRequired

        protected boolean isFullRowRequired
        PERF: By default only the translation row is used for deletes, the full row can be requested for custom deletes.
      • usesOptimisticLocking

        protected boolean usesOptimisticLocking
        Indicates whether the query should use optimistic locking.
    • Constructor Detail

      • DeleteObjectQuery

        public DeleteObjectQuery()
      • DeleteObjectQuery

        public DeleteObjectQuery​(java.lang.Object objectToDelete)
      • DeleteObjectQuery

        public DeleteObjectQuery​(Call call)
    • Method Detail

      • isFullRowRequired

        public boolean isFullRowRequired()
        ADVANCED: Return if the full row is required by the delete query. This can be set on custom delete queries if more than the objects primary key and version is required.
      • setIsFullRowRequired

        public void setIsFullRowRequired​(boolean isFullRowRequired)
        ADVANCED: Set if the full row is required by the delete query. This can be set on custom delete queries if more than the objects primary key and version is required.
      • checkForCustomQuery

        protected DatabaseQuery checkForCustomQuery​(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                    org.eclipse.persistence.internal.sessions.AbstractRecord translationRow)
        INTERNAL: Check to see if a custom query should be used for this query. This is done before the query is copied and prepared/executed. null means there is none.
        checkForCustomQuery in class DatabaseQuery
      • getDefaultRedirector

        protected QueryRedirector getDefaultRedirector()
        INTERNAL: Returns the specific default redirector for this query type. There are numerous default query redirectors. See ClassDescriptor for their types.
        getDefaultRedirector in class DatabaseQuery
      • isDeleteObjectQuery

        public boolean isDeleteObjectQuery()
        PUBLIC: Return if this is a delete object query.
        isDeleteObjectQuery in class DatabaseQuery
      • setObject

        public void setObject​(java.lang.Object object)
        PUBLIC: (REQUIRED) Set the object required for modification.
        setObject in class ObjectLevelModifyQuery
      • shouldUseOptimisticLocking

        protected boolean shouldUseOptimisticLocking​(java.lang.Object object)
        INTERNAL: Determines whether the query should use optimistic locking with the passed object.
      • usesOptimisticLocking

        public boolean usesOptimisticLocking()
        INTERNAL: Indicating whether the query should use optimistic locking.
      • prepare

        protected void prepare()
        INTERNAL: Prepare the receiver for execution in a session.
        prepare in class ObjectLevelModifyQuery
      • prepareCustomQuery

        protected void prepareCustomQuery​(DatabaseQuery customQuery)
        INTERNAL: Set the properties needed to be cascaded into the custom query. A custom query is set by the user, or used by default to allow caching of the prepared query. In a unit of work the custom query is used directly, so this step is bypassed.
        prepareCustomQuery in class DatabaseQuery