|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.directives.SqlDirective
Applies the contained text as SQL. Only update statements are supported.
>SqlDirective< SQL statement >/SqlDirective<
Component | Description | Required | Parameterizable |
---|---|---|---|
text() | The SQL statement | yes | yes, all macros |
Field Summary | |
private ParameterizedString |
sql_
|
Constructor Summary | |
SqlDirective()
Create an instance. |
Method Summary | |
void |
asDomOn(Element element)
Writes the directive as a DOM element according to the class documentation above. |
void |
execute(DirectiveServices directive_services)
Parameterizes the SQL statement to the current ParameterizedStringScope if necessary and executes it. |
void |
initializeFromDom(Element element)
Reads the DOM element into this directive according to the class documentation above. |
void |
setSql(String sql)
Sets the SQL statement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private ParameterizedString sql_
Constructor Detail |
public SqlDirective()
Method Detail |
public void setSql(String sql) throws ParseException
ForEachConcreteImplementorOf
.
ParseException
- if the SQL contains a parameterization as allowed in ParameterizedStrings, but it is syntactically incorrect or utilizes a macro incorrectlyForEachConcreteImplementorOf
public void asDomOn(Element element)
asDomOn
in interface UpdateDirective
public void initializeFromDom(Element element) throws DirectiveIOException
initializeFromDom
in interface UpdateDirective
DirectiveIOException
- if there are syntax errors in parameterization of the statementpublic void execute(DirectiveServices directive_services) throws DirectiveExecutionException
execute
in interface UpdateDirective
DirectiveExecutionException
- if there are parameterization syntax erros, if the connection cannot be acquired, or if there is a SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |