public class VerifyMappingsTask extends Task (Code)
An Ant task that will read the OJB repository xml file and confirm the
following:
a)Mapped classes exist. b)Mapped class fields exist c)Mapped database tables
exist. d)Mapped database columns exist. e)Mapped database columns jdbc type
matches the "jdbc-type" attribute.
Obviously you should have built your classes, written your OJB
repository.xml file and built your database schema before running this task.
author: Daren Drummond version: $Id: $
Method Summary
public Path
createClasspath() Create the classpath for loading the driver.
Determines whether this task stops by throwing a BuildException when the first
error is encountered.
A flag indicating that the Ant task will throw aBuildException if it encounters any validation errors
Determines whether the task ignores the case of the db column name case
when looking for db columns.
Flag indicating if the field name case will beignored when searching for table column names
Returns the Class object of the class specified in the OJB.properties
file for the "PersistentFieldClass" property.
Class The Class object of the "PersistentFieldClass" classspecified in the OJB.properties file.
Gets the boolean equivalent of the value set by
setUseStrictTypeChecking(String sTypeCheckingFlag)
Flag indicating if strict type checking will beused when searching for database table columns
Log an Info message with the Ant out stream. Info messages can be
suppressed from the command line by starting ant with the -quiet option.
Parameters: msg - The message to log
public void setFailOnError(String sFailFlag)(Code)
Sets a flag indicating that this Ant task should throw a BuildException
if it encounters any verification errors. In most cases, this will have
the effect of stopping the build process.
Parameters: sFailFlag - Whether to stop the task upon the first error
setIgnoreFieldNameCase
public void setIgnoreFieldNameCase(String sIgnoreCaseFlag)(Code)
Sets the flag for ignoring the db column name case when looking for db
columns.
Parameters: sIgnoreCaseFlag - Whether the case of the db column name is ignored
Sets the url connection string for the jdbc driver.
Parameters: url - The connection string for the jdbc driver
setUseStrictTypeChecking
public void setUseStrictTypeChecking(String sTypeCheckingFlag)(Code)
Sets the flag for stict type checking of database column types. If this
value is set to "true" then the task will log a warning if the table
column jdbc type doesn't match the type specified in the OJB repository
field descriptor.
Parameters: sTypeCheckingFlag - Whether to use strict type checking
setUseXMLValidation
public void setUseXMLValidation(String sValidationFlag)(Code)
Turns on W3C xml validation of the OJB repository.xml file (on by default).
Parameters: sValidationFlag - Whether to validate the xml