Module hivetranse.core.exceptions
Back to master index

[public] Schema hivetranse.core.exceptions.SqlExceptionMappingSchema
Element <codes>
Specify (in content) a list (comma or space delimited) of SQL error codes to be mapped to an exception as provided by the "class" attribute. The mapped exception class must have a constructor that takes 2 arguments (message and SQLException).
Attribute class (required) Translator: class
Conversion Rules
<create-object class="net.sourceforge.hivetranse.exception.SqlCodesMappingContribution" />
<read-attribute attribute="class" property="clazz" />
<read-content property="codes" />
<invoke-parent method="addElement" />
Element <states>
Specify (in content) a list (comma or space delimited) of SQL States (as per SQL99 standard) to be mapped to an exception as provided by the "class" attribute. The mapped exception class must have a constructor that takes 2 arguments (message and SQLException). The list can also contain just the SQL State "class" (first 2 characters). When mapping an SQLException, the following occurs: - first the ErrCode is matched (against the "codes" list) - if no match exists, then the SQLState is matched (against the "states" list) - if no match exists, then the SQLState class is matched (against the "states" list) - if no match exists, then a UnknownDataAccessException is created.
Attribute class (required) Translator: class
Conversion Rules
<create-object class="net.sourceforge.hivetranse.exception.SqlCodesMappingContribution" />
<read-attribute attribute="class" property="clazz" />
<read-content property="states" />
<invoke-parent method="addElement" />
References
Configurations
hivetranse.core.exceptions.Derby
hivetranse.core.exceptions.HSQLDB
hivetranse.core.exceptions.MySQL
hivetranse.core.exceptions.PostgreSQL

Module hivetranse.core.exceptions
Back to master index