|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task org.apache.ojb.broker.ant.VerifyMappingsTask
public class VerifyMappingsTask
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.
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.Task |
---|
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
project |
Constructor Summary | |
---|---|
VerifyMappingsTask()
|
Method Summary | |
---|---|
org.apache.tools.ant.types.Path |
createClasspath()
Create the classpath for loading the driver. |
void |
execute()
|
protected int |
getErrorCount()
|
boolean |
getFailOnError()
Determines whether this task stops by throwing a BuildException when the first error is encountered. |
boolean |
getIgnoreFieldNameCase()
Determines whether the task ignores the case of the db column name case when looking for db columns. |
String |
getJdbcDriver()
Gets the value set by setJdbcDriver(String jdbcClass) |
String |
getLogon()
Gets the value set by setLogon(String logon) |
String |
getPassword()
Gets the value set by setPassword(String password) |
Class |
getPersistentFieldClass()
Returns the Class object of the class specified in the OJB.properties file for the "PersistentFieldClass" property. |
String |
getPropertiesFile()
Gets the value set by setPropertiesFile(String path) |
String |
getRepositoryFile()
Gets the path to the OJB repository file. |
String |
getUrl()
Gets the value set by setUrl(String url) |
boolean |
getUseStrictTypeChecking()
Gets the boolean equivalent of the value set by setUseStrictTypeChecking(String sTypeCheckingFlag) |
boolean |
getUseXMLValidation()
Determines whether the xml syntax is verified. |
protected int |
getWarningCount()
|
boolean |
hasConnectionInfo()
Tests to see if the jdbc connection information was specified in the tag xml. |
void |
logInfo(String msg)
Log an Info message with the Ant out stream. |
void |
logWarning(String msg)
Log a warning with the Ant out stream. |
void |
setClasspath(org.apache.tools.ant.types.Path classpath)
Set the classpath for loading the driver. |
void |
setClasspathRef(org.apache.tools.ant.types.Reference r)
Set the classpath for loading the driver using the classpath reference. |
protected void |
setErrorCount(int count)
|
void |
setFailOnError(String sFailFlag)
Sets a flag indicating that this Ant task should throw a BuildException if it encounters any verification errors. |
void |
setIgnoreFieldNameCase(String sIgnoreCaseFlag)
Sets the flag for ignoring the db column name case when looking for db columns. |
void |
setJdbcDriver(String jdbcClass)
Sets the fully qualified class name of the jdbc driver to use. |
void |
setLogon(String logon)
Sets the database logon account that the utility should use. |
void |
setPassword(String password)
Sets the password for the database logon account. |
void |
setPropertiesFile(String path)
Sets the fully qualified path and file name of the OJB properties file. |
void |
setRepositoryFile(String path)
|
void |
setUrl(String url)
Sets the url connection string for the jdbc driver. |
void |
setUseStrictTypeChecking(String sTypeCheckingFlag)
Sets the flag for stict type checking of database column types. |
void |
setUseXMLValidation(String sValidationFlag)
Turns on W3C xml validation of the OJB repository.xml file (on by default). |
protected void |
setWarningCount(int count)
|
Methods inherited from class org.apache.tools.ant.Task |
---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getProject, setProject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VerifyMappingsTask()
Method Detail |
---|
public void setRepositoryFile(String path)
public String getRepositoryFile()
public void setPropertiesFile(String path)
path
- The path and file name of the OJB properties filepublic String getPropertiesFile()
public void setJdbcDriver(String jdbcClass)
jdbcClass
- Fully qualified class name of the jdbc driverpublic String getJdbcDriver()
public void setUrl(String url)
url
- The connection string for the jdbc driverpublic String getUrl()
public void setLogon(String logon)
logon
- The database logon accountpublic String getLogon()
public void setPassword(String password)
password
- The password for the database logon accountpublic String getPassword()
public void setUseXMLValidation(String sValidationFlag)
sValidationFlag
- Whether to validate the xmlpublic boolean getUseXMLValidation()
public void setFailOnError(String sFailFlag)
sFailFlag
- Whether to stop the task upon the first errorpublic boolean getFailOnError()
public void setIgnoreFieldNameCase(String sIgnoreCaseFlag)
sIgnoreCaseFlag
- Whether the case of the db column name is ignoredpublic boolean getIgnoreFieldNameCase()
public void setUseStrictTypeChecking(String sTypeCheckingFlag)
sTypeCheckingFlag
- Whether to use strict type checkingpublic boolean getUseStrictTypeChecking()
public void setClasspath(org.apache.tools.ant.types.Path classpath)
classpath
- the classpathpublic org.apache.tools.ant.types.Path createClasspath()
public void setClasspathRef(org.apache.tools.ant.types.Reference r)
r
- reference to the classpathpublic void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
public void logWarning(String msg)
msg
- The message to logpublic void logInfo(String msg)
msg
- The message to logprotected int getErrorCount()
protected void setErrorCount(int count)
protected int getWarningCount()
protected void setWarningCount(int count)
public boolean hasConnectionInfo()
true
if the jdbc connection information was
supplied in the tag xmlpublic Class getPersistentFieldClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |