<query/>
A query DataSource handles a query, working in concert with others to make
a database DataSource work.
You can write custom queries using XML and the query tag which this class
represents. Or, you can extend this class and override whichever method you
need to for your particular custom query (This is in effect a more convenient
way that allows a Java Developer familiar with JDBC to write their own sql statements
and create plugins that will be used in the server.tas file under the database datasource).
-
Implemented by:
-
thinkmap.datasource.database.QueryDataSource
Simple Attributes
| bindableEntityType |
| description: |
Set the entity type this query DataSource responds to. If no
entity type is set, this will bind to any entity type.
|
| type: |
String
|
| required: |
No
|
|
| default: |
Will bind to any entity type
|
| debug |
| description: |
Set the true to enable debug output.
|
| type: |
boolean
|
| required: |
No
|
|
| default: |
False
|
| maxResults |
| description: |
Set the maximum number of results to be returned by this query, or -1 for no limit.
|
| type: |
int
|
| required: |
No
|
|
| default: |
-1 (no liimit)
|
| SQL |
| description: |
Set the query string used by this query DataSource.
|
| type: |
String
|
| required: |
Yes
|
|
| type |
| description: |
Set the type of this query. Can be 'related', 'search', 'entity', 'list',
'index', 'update', 'add', 'insert', 'remove', or 'delete'.
|
| type: |
String
|
| required: |
No
|
|
Complex Attributes
| <arguments/> |
| description: |
Set the array of argument bindings that this query DataSource uses.
|
| type: |
thinkmap.datasource.relational.Binding
|
| required: |
No
|
|
|
|
| <rejectionBinding/> |
| description: |
Set a binding that will prevent this query from executing. If this
binding returns false, or the binding throws a BindingException, the
query cannot execute.
|
| type: |
thinkmap.datasource.relational.Binding
|
| required: |
No
|
|
|
|
| <results/> |
| description: |
Set the EntityResultMapping array this uses when sending back results.
|
| type: |
thinkmap.datasource.database.EntityResultMapping
|
| required: |
Yes
|
|
|
|