The <ibatorContext> element is used to specify the environment for generating a set of objects. Child elements are used to specify the database to connect to, the type of objects to generate, and the tables to introspect. Multiple <ibatorContext> elements can be listed inside an <ibatorConfiguration> element to allow generating objects from different databases, or with different generation parameters, in the same run of Ibator.
Attribute | Description |
---|---|
id | A unique identifier for this context. This value will be used in some error messages. |
Attribute | Description | ||||||
---|---|---|---|---|---|---|---|
defaultModelType |
This property is used to set the default for generated model types.
The model type defines how Ibator will generate domain classes. With some
model types Ibator will generate a single domain class for each table,
with others Ibator may generate different classes depending on the structure
of the table. The property supports these values:
|
||||||
targetRuntime |
This property is used to specify the runtime target for generated code.
The property supports these special values:
If you want to create a different code generator in entirety,
then use this value to specify the fully qualified name of a
class that extends |
||||||
introspectedColumnImpl | Use this value to specify the fully qualified name of a
class that extends org.apache.ibatis.ibator.api.IntrospectedColumn .
This is used if you want to change the behavior of the code generators
when calculating column information. See the
Extending Ibator page for more information. |
This table lists the properties that can be specified with the <property> child element:
Property Name | Property Values |
---|---|
suppressTypeWarnings | If true, then Ibator will add an annotation to any method
that uses a non-parameterized type to suppress compiler type warnings.
This is useful if you are using the Ibatis2Java2 targetRuntime, but are
compiling the generated objects with a JSE 5.0 compiler. In that situation,
the Ibator generated code would generate many compiler warnings if the
annotation is not allowed. This property is not needed and will have
no effect when using the Ibatis2Java5 targetRuntime.
The default value is false. |
beginningDelimiter | The value to use as the beginning identifier delimiter for SQL identifiers that
require delimiters. Ibator will automatically delimit SQL identifiers if the
identifier contains a space. Ibator will also delimit SQL identifiers if
specifically requested in a <table> or <columnOverride> configuration.
The default value is double quotes ("). |
endingDelimiter | The value to use as the ending identifier delimiter for SQL identifiers that
require delimiters. Ibator will automatically delimit SQL identifiers if the
identifier contains a space. Ibator will also delimit SQL identifiers if
specifically requested in a <table> or <columnOverride> configuration.
The default value is double quotes ("). |