Hibernate Reverse Engineering
Hibernate Reverse Engineering
Hibernate Reverse Engineering
dtd"> An instance of this XML document may contain misc. overrides used when hibernate tools perform reverse engineering. TODO: document the tags in the DTD --> <!-The document root. --> <!ELEMENT hibernate-reverse-engineering ( (schema-selection)*, type-mapping?, (table-filter)*, table*)> <!ELEMENT type-mapping ( sql-type+ ) > <!-- Defines a sql-type mapping. Will match on any combination of jdbc-type, len gth, precision and/or scale - first match will win. --> <!ELEMENT sql-type (hibernate-type?) > <!ATTLIST sql-type name CDATA #IMPLIED > <!ATTLIST sql-type jdbc-type CDATA #IMPLIED > <!ATTLIST sql-type length CDATA #IMPLIED > <!ATTLIST sql-type precision CDATA #IMPLIED > <!ATTLIST sql-type scale CDATA #IMPLIED > <!ATTLIST sql-type not-null (true|false) #IMPLIED > <!ATTLIST sql-type hibernate-type CDATA #IMPLIED > <!ELEMENT hibernate-type EMPTY> <!ATTLIST hibernate-type name CDATA #REQUIRED > <!-- Used to target the selection from the database schema. Each schema-selection can be viewed as a "call" to DatabaseMetaData.getTables(). --> <!ELEMENT schema-selection EMPTY> <!-- Catalog pattern for the selection --> <!ATTLIST schema-selection match-catalog CDATA #IMPLIED > <!-- Schema for the for the selection --> <!ATTLIST schema-selection match-schema CDATA #IMPLIED > <!-- Table pattern for the selection --> <!ATTLIST schema-selection match-table CDATA #IMPLIED > <!ELEMENT table (primary-key?, column*, foreign-key*) > <!-- Catalog for the table --> <!ATTLIST table catalog CDATA #IMPLIED > <!-- Schema for the table --> <!ATTLIST table schema CDATA #IMPLIED > <!-- Name of the table --> <!ATTLIST table name CDATA #REQUIRED > <!-- The class name to use for the table --> <!ATTLIST table class CDATA #IMPLIED > <!ELEMENT column EMPTY > <!ATTLIST column name CDATA #REQUIRED >
<!ATTLIST column jdbc-type CDATA #IMPLIED > <!ATTLIST column type CDATA #IMPLIED > <!ATTLIST column property CDATA #IMPLIED > <!ATTLIST column exclude (true|false) "false" > <!-- too much flexibility to maintain; just use a foreign-key definition <!ATTLIST column foreign-catalog CDATA #IMPLIED > <!ATTLIST column foreign-schema CDATA #IMPLIED > <!ATTLIST column foreign-table CDATA #IMPLIED > <!ATTLIST column foreign-column CDATA #IMPLIED > --> <!ELEMENT <!ATTLIST <!ATTLIST <!ATTLIST <!ATTLIST key-column key-column key-column key-column key-column EMPTY > name jdbc-type type property CDATA CDATA CDATA CDATA #REQUIRED > #IMPLIED > #IMPLIED > #IMPLIED >
<!ELEMENT primary-key <!-- Property name to <!ATTLIST primary-key <!-- Class to use for <!ATTLIST primary-key <!ELEMENT <!ATTLIST <!ELEMENT <!ATTLIST
(generator?, key-column*) > use for this primary key --> property CDATA #IMPLIED > representing the id --> id-class CDATA #IMPLIED >
generator (param*)> generator class CDATA #REQUIRED> param (#PCDATA)> param name CDATA #REQUIRED>
<!-- A foreign-key has to have at least a constraint-name AND/OR foreign-table+c olumn-ref's --> <!ELEMENT foreign-key (column-ref*,many-to-one?,(set)?) > <!ATTLIST foreign-key constraint-name CDATA #IMPLIED > <!ATTLIST foreign-key foreign-catalog CDATA #IMPLIED > <!ATTLIST foreign-key foreign-schema CDATA #IMPLIED > <!ATTLIST foreign-key foreign-table CDATA #IMPLIED > <!ELEMENT column-ref EMPTY > <!ATTLIST column-ref local-column CDATA <!ATTLIST column-ref foreign-column CDATA #REQUIRED > #IMPLIED >
<!ELEMENT many-to-one EMPTY > <!ATTLIST many-to-one property CDATA #IMPLIED> <!ATTLIST many-to-one exclude (true|false) #IMPLIED> <!ELEMENT set EMPTY > <!ATTLIST set property CDATA #IMPLIED> <!ATTLIST set exclude (true|false) #IMPLIED> <!-- <!ELEMENT bag EMPTY > <!ATTLIST bag property CDATA #REQUIRED> --> <!-- a table-filter allows to explicitly exclude or include tables or complete c atalog/schemas into the reverse engineering --> <!ELEMENT table-filter EMPTY > <!ATTLIST table-filter match-catalog CDATA ".*" > <!ATTLIST table-filter match-schema CDATA ".*" > <!ATTLIST table-filter match-name CDATA #REQUIRED > <!ATTLIST table-filter exclude (true|false) "false" > <!ATTLIST table-filter package CDATA #IMPLIED >