To get instances from the factory methods of java.sql.Connection
, annotate DAO methods with one of following annotations;
- @ArrayFactory
- @BlobFactory
- @ClobFactory
- @NClobFactory
- @SQLXMLFactory
A return type must be java.sql.Array
and the number of parameters must be one. The parameter type must be an array type and the parameter must not be null.
Specify a database type name to the @ArrayFactory
's typeName
element:
@ArrayFactory(typeName = "integer")
Array createIntegerArray(Integer[] elements);
A return type must be java.sql.Blob
and the number of parameters must be zero:
@BlobFactory
Blob createBlob();
A return type must be java.sql.Clob
and the number of parameters must be zero:
@ClobFactory
Clob createClob();
A return type must be java.sql.NClob
and the number of parameters must be zero:
@NClobFactory
NClob createNClob();
A return type must be java.sql.SQLXML
and the number of parameters must be zero:
@SQLXMLFactory
SQLXML createSQLXML();