cdbimport is an Ant task that that uses Cayenne to generate a DataMap based on an existing database schema. This allows you to generate your DataMap prior to building your project, which may be necessary if you are also using the cgen task.
|DataMap XML file to use as a schema descriptor.
|Indicates whether existing DB and object entities should be overwritten. This is an all-or-nothing setting. If you need finer granularity, please use the Cayenne Modeler. Default is true.
|Database schema to use for importing.
|Pattern to match tables against for import. Default is to match all tables.
|Indicates whether stored procedures should be imported. Default is false.
|Pattern to match stored procedures against for import. Default is to match all stored procedures. This value is only meaningful if importProcedures is true.
|Indicates whether primary keys should be mapped as attributes of the object entity. Default is false.
|The naming strategy used for mapping database names to object entity names. Default is org.apache.cayenne.map.naming.SmartNamingStrategy.
|Java class name implementing org.apache.cayenne.dba.DbAdapter. While this attribute is optional (a generic JdbcAdapter is used if not set), it is highly recommended to specify correct target adapter.
|No (but strongly recommended)
|A class of JDBC driver to use for the target database.
|JDBC connection URL of a target database.
|Database user name.
|Database user password.
Here is an example of using cdbimport to create DB schema objects on a local HSQLDB.