- All Implemented Interfaces:
CreateQuery<Array>,Query
A query implementation for creating a SQL array.
This class extends AbstractCreateQuery to provide functionality for creating SQL
arrays in a database. It handles the creation of JDBC Array objects by specifying the SQL
type name and array elements.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object[]The array elements.protected StringThe SQL type name of the array.Fields inherited from class org.seasar.doma.jdbc.query.AbstractQuery
callerClassName, callerMethodName, config, message, method, queryTimeout -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(Connection connection) Creates a SQL array.Object[]Returns the array elements.Returns the SQL type name of the array.voidprepare()Prepares this query for execution.voidsetElements(Object[] elements) Sets the array elements.voidsetTypeName(String typeName) Sets the SQL type name of the array.Methods inherited from class org.seasar.doma.jdbc.query.AbstractCreateQuery
complete, getQueryTimeout, getSqlMethods inherited from class org.seasar.doma.jdbc.query.AbstractQuery
comment, getClassName, getConfig, getMethod, getMethodName, setCallerClassName, setCallerMethodName, setConfig, setMessage, setMethod, setQueryTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.seasar.doma.jdbc.query.Query
comment, getClassName, getConfig, getMethod, getMethodName
-
Field Details
-
typeName
The SQL type name of the array. -
elements
The array elements.
-
-
Constructor Details
-
ArrayCreateQuery
public ArrayCreateQuery()
-
-
Method Details
-
prepare
public void prepare()Prepares this query for execution. This method must be called beforecreate(Connection).- Specified by:
preparein interfaceQuery- Overrides:
preparein classAbstractQuery
-
getTypeName
Returns the SQL type name of the array.- Returns:
- the SQL type name
-
setTypeName
Sets the SQL type name of the array.- Parameters:
typeName- the SQL type name
-
getElements
Returns the array elements.- Returns:
- the array elements
-
setElements
Sets the array elements.- Parameters:
elements- the array elements
-
create
Creates a SQL array.- Parameters:
connection- the JDBC connection- Returns:
- the created SQL array
- Throws:
SQLException- if a database access error occurs
-