Annotation Interface SQLAction
Strings supplied to install
or remove
within
a single SQLAction
annotation become code snippets emitted into the
deployment descriptor's INSTALL
or REMOVE
section,
respectively, in the order supplied.
Snippets from different SQLAction
annotations,
and snippets generated by annotations on functions, types, and such, will be
assembled in an order that can be influenced by provides
and requires
labels. No snippet X will be emitted as an
INSTALL
action ahead of any snippets that provide what X requires.
The sense of that dependency is reversed when ordering REMOVE
snippets.
Conditional execution
An SQLAction
may supply an install
snippet that tests some
condition at the time of deployment and adjusts the
pljava.implementors
setting to include or not include a specific
<implementor name>
, controlling whether actions later in
the deployment descriptor that are annotated with that
<implementor name>
will be executed. The SQLAction
that
controls whether an <implementor name>
will be recognized should use
provides
with exactly that name, which is implicitly
'required' by statements that use that name as
implementor
. For details on this usage, which involves
a different ordering rule, see "conditional execution" in
the package documentation
.
- Author:
- Thomas Hallgren - pre-Java6 version, Chapman Flack (Purdue Mathematics) - updated to Java6, added SQLAction
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe<implementor name>
to be used around SQL code generated here.String[]
SQL commands to be included in a BEGIN INSTALL group (each string considered a separate command to which a semicolon will be added).String[]
One or more arbitrary labels that will be considered 'provided' by the object carrying this annotation.String[]
SQL commands to be included in a BEGIN REMOVE group (each string considered a separate command to which a semicolon will be added).String[]
One or more arbitrary labels that will be considered 'required' by the object carrying this annotation.
-
Element Details
-
install
String[] installSQL commands to be included in a BEGIN INSTALL group (each string considered a separate command to which a semicolon will be added).- Default:
{}
-
remove
String[] removeSQL commands to be included in a BEGIN REMOVE group (each string considered a separate command to which a semicolon will be added).- Default:
{}
-
provides
String[] providesOne or more arbitrary labels that will be considered 'provided' by the object carrying this annotation. The deployment descriptor will be generated in such an order that other objects that 'require' labels 'provided' by this come later in the output for install actions, and earlier for remove actions.For use of this element on an
SQLAction
that tests a condition to control conditional execution, see "conditional execution" inthe class description
.- Default:
{}
-
requires
String[] requiresOne or more arbitrary labels that will be considered 'required' by the object carrying this annotation. The deployment descriptor will be generated in such an order that other objects that 'provide' labels 'required' by this come earlier in the output for install actions, and later for remove actions.- Default:
{}
-
implementor
String implementorThe<implementor name>
to be used around SQL code generated here. Defaults toPostgreSQL
. Set explicitly to""
to emit code not wrapped in an<implementor block>
.- Default:
""
-