org.eclipse.datatools.modelbase.sql.query.util
Class SQLQuerySourceWriterProvider
java.lang.Object
org.eclipse.datatools.modelbase.sql.query.util.SQLQuerySourceWriterProvider
public class SQLQuerySourceWriterProvider
- extends java.lang.Object
Singleton SQLQuerySourceWriterProvider
holds a registry of
SQLQuerySourceWriter
extensions and creates instances of
SQLQuerySourceWriter
s, that are registered for a specific
SQLQueryObject
Package
.
As plugin in an eclipse runtime environment, the registration of
SQLQuerySourceWriter
for a package of
SQLQueryObject
extensions is done at start time of the plugin
containing the SQL Query model extension.
The registry is implemented following the lazy loading
startegy and the plugin extending the SQL Query model plugin is only loaded
the first time a SQLQueryObject
is
instanciated in the extending plugin.
- Author:
- ckadner
Method Summary |
static SQLQuerySourceWriterProvider |
getInstance()
|
void |
registerSourceWriter(java.lang.Class sourceWriterClass,
java.lang.String sqlModelObjectsPackageName)
Method to register a subclass of the SQLQuerySourceWriter
for a specific package of SQLQueryObject s, that the given
sourceWriterClass generates the SQL source for. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static SQLQuerySourceWriterProvider getInstance()
- Returns:
- the singleton
SQLQuerySourceWriterProvider
instance
registerSourceWriter
public void registerSourceWriter(java.lang.Class sourceWriterClass,
java.lang.String sqlModelObjectsPackageName)
- Method to register a subclass of the
SQLQuerySourceWriter
for a specific package of SQLQueryObject
s, that the given
sourceWriterClass
generates the SQL source for. Note:
there can only be one SQLQuerySourceWriter
for one
package of SQLQueryObject
s, however one
SQLQuerySourceWriter
can generate the SQL source for
multiple packages of SQLQueryObject
s. In general an
extension of a SQLQuerySourceWriter
goes along with an
extension to the SQLQueryObject
model. Developer note:
if the name and packaging of the SQLQuerySourceWriter
follows the naming convention described in the class documentaion
section, the SQLQuerySourceWriter
will be registered
automatically via @link java.lang.reflect.*
- Parameters:
sourceWriterClass
- the SQLQuerySourceWriter
class that generates
the SQL source for the SQLQueryObject
s in the
given sqlModelObjectsPackage
sqlModelObjectsPackageName
- fully qualified package name of SQLQueryObject
s