Package org.reldb.wrapd.sqldb
Class UpdateTypeGenerator
java.lang.Object
org.reldb.wrapd.sqldb.SQLTypeGenerator
org.reldb.wrapd.sqldb.UpdateTypeGenerator
public class UpdateTypeGenerator extends SQLTypeGenerator
Generates Java code to represent an update query, which is a class that implements
Update
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.reldb.wrapd.sqldb.SQLTypeGenerator
SQLTypeGenerator.Method
-
Constructor Summary
Constructors Constructor Description UpdateTypeGenerator(java.lang.String dir, java.lang.String packageSpec, java.lang.String queryName, java.lang.String sqlText, java.lang.Object... args)
Create a generator of compiled update invokers. -
Method Summary
Modifier and Type Method Description protected java.lang.String
getDefinitionSourceCode()
Obtain the Java text for this definition.Methods inherited from class org.reldb.wrapd.sqldb.SQLTypeGenerator
addMethod, destroy, generate, getDeclaredQueryParameterNameListString, getMethods, getPackageSpec, getParameterDefinitionListString, getParameterList, getQueryName, getSQLText, hasArgs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
UpdateTypeGenerator
public UpdateTypeGenerator(java.lang.String dir, java.lang.String packageSpec, java.lang.String queryName, java.lang.String sqlText, java.lang.Object... args)Create a generator of compiled update invokers.- Parameters:
dir
- Directory into which generated class(es) will be put.packageSpec
- Package to which generated class(es) belong, in dotted notation.queryName
- Name of generated query class.sqlText
- SQL query text. Parameters may be specified as ? or {name}. If {name} is used, it will appear as a corresponding Java method name. If ? is used, it will be named pn, where n is a unique number in the given definition. Use getSQLText() after generate() to obtain final SQL query text with all {name} converted to ? for subsequent evaluation.args
- Sample arguments.
-
-
Method Details
-
getDefinitionSourceCode
protected java.lang.String getDefinitionSourceCode()Description copied from class:SQLTypeGenerator
Obtain the Java text for this definition.- Specified by:
getDefinitionSourceCode
in classSQLTypeGenerator
- Returns:
- Query text.
-