java.lang.Object
com.aquima.interactions.foundation.connectivity.impl.SqlQuery
All Implemented Interfaces:
IQuery

public class SqlQuery extends Object implements IQuery
Java implementation of the IQuery interface.
Since:
6.3
Author:
O. Kerpershoek
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    SqlQuery(Connection connection, String queryStr)
     
    protected
    SqlQuery(Connection connection, String queryStr, String pk)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method should be used to close the query once it is no longer used.
    This method will execute the query and return an object that can be used to iterate over the results of the query.
    int
    This method will execute the query and return the number of rows that were affected by the query.
    long
    This method returns the ID of the last inserted record (if available).
    void
    setBoolean(boolean booleanValue)
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    setBytes(byte[] content)
    Sets an object on the query after the position of the last setter call to null; Making this function order dependent.
    void
    setDate(Date dateValue)
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    setDouble(double doubleValue)
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    setFloat(float floatValue)
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    setInteger(int integerValue)
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    setLong(long longValue)
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    Sets an object on the query after the position of the last setter call to null; Making this function order dependent.
    void
    setParameters(List<Object> parameters)
    Set multiple parameters.
    void
    setString(String stringValue)
    Sets an object on the query after the position of the last setter call; Making this function order dependent.
    void
    Sets an object on the query after the position of the last setter call; Making this function order dependent.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • close

      public void close()
      Description copied from interface: IQuery
      This method should be used to close the query once it is no longer used. The close method should be invoked to release external resources claimed by the query.
      Specified by:
      close in interface IQuery
    • execute

      public IQueryResult execute()
      Description copied from interface: IQuery
      This method will execute the query and return an object that can be used to iterate over the results of the query. For update queries (insert, delete, etc...) use the executeUpdate method.
      Specified by:
      execute in interface IQuery
      Returns:
      Object that can be used to iterate over the result of the query.
    • executeUpdate

      public int executeUpdate()
      Description copied from interface: IQuery
      This method will execute the query and return the number of rows that were affected by the query.
      Specified by:
      executeUpdate in interface IQuery
      Returns:
      The number of rows that were updated.
    • getIdentity

      public long getIdentity()
      Description copied from interface: IQuery
      This method returns the ID of the last inserted record (if available).
      Specified by:
      getIdentity in interface IQuery
      Returns:
      the ID of the last inserted record.
    • setBoolean

      public void setBoolean(boolean booleanValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setBoolean in interface IQuery
      Parameters:
      booleanValue - The value that should be set at the specified index.
    • setDate

      public void setDate(Date dateValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setDate in interface IQuery
      Parameters:
      dateValue - The value that should be set at the specified index.
    • setDateValue

      public void setDateValue(DateValue dateValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setDateValue in interface IQuery
      Parameters:
      dateValue - The value that should be set at the specified index.
    • setDateTimeValue

      public void setDateTimeValue(DateTimeValue dateValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setDateTimeValue in interface IQuery
      Parameters:
      dateValue - The value that should be set at the specified index.
    • setDouble

      public void setDouble(double doubleValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setDouble in interface IQuery
      Parameters:
      doubleValue - The value that should be set at the specified index.
    • setFloat

      public void setFloat(float floatValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setFloat in interface IQuery
      Parameters:
      floatValue - The value that should be set at the specified index.
    • setInteger

      public void setInteger(int integerValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setInteger in interface IQuery
      Parameters:
      integerValue - The value that should be set at the specified index.
    • setLong

      public void setLong(long longValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setLong in interface IQuery
      Parameters:
      longValue - The value that should be set at the specified index.
    • setString

      public void setString(String stringValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setString in interface IQuery
      Parameters:
      stringValue - The value that should be set at the specified index.
    • setStringValue

      public void setStringValue(StringValue stringValue)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call; Making this function order dependent.
      Specified by:
      setStringValue in interface IQuery
      Parameters:
      stringValue - The value that should be set at the specified index.
    • setNull

      public void setNull(DataType type)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call to null; Making this function order dependent.
      Specified by:
      setNull in interface IQuery
      Parameters:
      type - The type of the column that should be set to null.
    • setParameters

      public void setParameters(List<Object> parameters)
      Description copied from interface: IQuery
      Set multiple parameters. The parameters list passed to this method does not have to be an uniform list of parameters. Parameters may be mixed. Note: The parameters passed to this method is an List due to the .NET conversion.
      Specified by:
      setParameters in interface IQuery
      Parameters:
      parameters - a non-null list of parameters containing ( String, Long, Integer ... ) objects.
    • setBytes

      public void setBytes(byte[] content)
      Description copied from interface: IQuery
      Sets an object on the query after the position of the last setter call to null; Making this function order dependent.
      Specified by:
      setBytes in interface IQuery
      Parameters:
      content - The value that should be set at the specified index.