Class SqlQuery
java.lang.Object
com.aquima.interactions.foundation.connectivity.impl.SqlQuery
- All Implemented Interfaces:
IQuery
Java implementation of the IQuery interface.
- Since:
- 6.3
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SqlQuery
(Connection connection, String queryStr) protected
SqlQuery
(Connection connection, String queryStr, String pk) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This method should be used to close the query once it is no longer used.execute()
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
Sets an object on the query after the position of the last setter call; Making this function order dependent.void
setDateTimeValue
(DateTimeValue dateValue) Sets an object on the query after the position of the last setter call; Making this function order dependent.void
setDateValue
(DateValue dateValue) 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
Sets an object on the query after the position of the last setter call; Making this function order dependent.void
setStringValue
(StringValue stringValue) Sets an object on the query after the position of the last setter call; Making this function order dependent.
-
Constructor Details
-
SqlQuery
- Throws:
SQLException
-
SqlQuery
- Throws:
SQLException
-
-
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. -
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. -
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 interfaceIQuery
- 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 interfaceIQuery
- 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 interfaceIQuery
- Parameters:
booleanValue
- The value that should be set at the specified index.
-
setDate
Description copied from interface:IQuery
Sets an object on the query after the position of the last setter call; Making this function order dependent. -
setDateValue
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 interfaceIQuery
- Parameters:
dateValue
- The value that should be set at the specified index.
-
setDateTimeValue
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 interfaceIQuery
- 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. -
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. -
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 interfaceIQuery
- 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. -
setString
Description copied from interface:IQuery
Sets an object on the query after the position of the last setter call; Making this function order dependent. -
setStringValue
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 interfaceIQuery
- Parameters:
stringValue
- The value that should be set at the specified index.
-
setNull
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. -
setParameters
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 interfaceIQuery
- 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.
-