Class DataModifyQuery

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class DataModifyQuery
    extends ModifyQuery

    Purpose: Concrete class used for executing non selecting SQL strings.

    Responsibilities:

    • Execute a non selecting raw SQL string.
    See Also:
    Serialized Form
    Author:
    Yvon Lavoie
    Since:
    TOPLink/Java 1.0
    • Field Detail

      • hasModifyRow

        protected boolean hasModifyRow
        Used to distinguish query that have a different modify row than translation row.
    • Constructor Detail

      • DataModifyQuery

        public DataModifyQuery()
      • DataModifyQuery

        public DataModifyQuery​(java.lang.String sqlString)
        Warning: Allowing an unverified SQL string to be passed into this method makes your application vulnerable to SQL injection attacks.
      • DataModifyQuery

        public DataModifyQuery​(Call call)
    • Method Detail

      • hasModifyRow

        public boolean hasModifyRow()
        Return if a modify row has been set. Allows distinguishing query that have a different modify row than translation row.
      • setHasModifyRow

        public void setHasModifyRow​(boolean hasModifyRow)
        Set if a modify row has been set. Allows distinguishing query that have a different modify row than translation row.
      • executeDatabaseQuery

        public java.lang.Object executeDatabaseQuery()
                                              throws DatabaseException
        INTERNAL: Perform the work to execute the SQL call. Return the row count of the number of rows effected by the SQL call.
        Specified by:
        executeDatabaseQuery in class DatabaseQuery
        Returns:
        - the result of executing the query.
        Throws:
        DatabaseException - - an error has occurred on the database.
      • isDataModifyQuery

        public boolean isDataModifyQuery()
        PUBLIC: Return if this is a data modify query.
        Overrides:
        isDataModifyQuery in class DatabaseQuery
      • prepare

        protected void prepare()
        INTERNAL: Prepare the receiver for execution in a session.
        Overrides:
        prepare in class DatabaseQuery
      • prepareForExecution

        public void prepareForExecution()
                                 throws QueryException
        INTERNAL: Prepare the receiver for execution in a session. In particular, set the descriptor of the receiver to the ClassDescriptor for the appropriate class for the receiver's object.
        Overrides:
        prepareForExecution in class DatabaseQuery
        Throws:
        QueryException