|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.tool.hbm2x.doc.DocHelper
public final class DocHelper
This helper class is used expose hibernate mapping information to the templates.
| Field Summary | |
|---|---|
static String |
DEFAULT_NO_PACKAGE
Name to use if there are no packages specified for any class |
static String |
DEFAULT_NO_SCHEMA_NAME
Name to use if the schema is not specified. |
| Constructor Summary | |
|---|---|
DocHelper(org.hibernate.cfg.Configuration cfg,
Cfg2JavaTool cfg2JavaTool)
Constructor. |
|
| Method Summary | |
|---|---|
org.hibernate.cfg.Configuration |
getCfg()
Returns the Hibernate Configuration. |
List |
getClasses()
Return a sorted List of all POJOClass |
List |
getClasses(String packageName)
return a sorted List of POJOClass corresponding to packageName passed |
Map |
getClassesByPackage()
return a Map which has List of POJOClass as value keyed by package name as String. |
POJOClass |
getComponentPOJO(org.hibernate.mapping.Property property)
Method used in class.vm template to get the ComponentPOJO class corresponding to Property if its of Type Component. |
List |
getInheritanceHierarchy(POJOClass pc)
|
List |
getOrderedProperties(POJOClass pojoClass)
|
List |
getOrderedSimpleProperties(POJOClass pojoClass)
|
List |
getPackages()
Return a sorted List of packages |
List |
getProperties(org.hibernate.mapping.Table table,
org.hibernate.mapping.Column column)
Returns the properties that map to a column. |
String |
getPropertyType(org.hibernate.mapping.Property p)
|
String |
getQualifiedColumnName(org.hibernate.mapping.Table table,
org.hibernate.mapping.Column column)
Returns the qualified name of a column. |
String |
getQualifiedSchemaName(org.hibernate.mapping.Table table)
Returns the qualified schema name for a table. |
String |
getQualifiedTableName(org.hibernate.mapping.Table table)
Returns the qualified name of a table. |
List |
getSchemas()
Returns a list with all the schemas. |
List |
getSimpleProperties(POJOClass pojoClass)
|
String |
getSQLTypeName(org.hibernate.mapping.Column column)
Get the SQL type name for a column. |
List |
getTables()
Return all the tables. |
List |
getTables(String schema)
Return the list of tables for a particular schema. |
Map |
getTablesBySchema()
Return a Map with the tables keyed by Schema. |
List |
getValues(org.hibernate.mapping.Table table,
org.hibernate.mapping.Column column)
Returns the values that use the specified column. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_NO_SCHEMA_NAME
public static final String DEFAULT_NO_PACKAGE
| Constructor Detail |
|---|
public DocHelper(org.hibernate.cfg.Configuration cfg,
Cfg2JavaTool cfg2JavaTool)
cfg - Hibernate configuration.| Method Detail |
|---|
public org.hibernate.cfg.Configuration getCfg()
public Map getTablesBySchema()
public Map getClassesByPackage()
public List getSchemas()
public List getPackages()
public List getTables(String schema)
schema - the name of the schema.
public List getClasses(String packageName)
packageName - packageName other than DEFAULT_NO_PACKAGE
public List getTables()
public List getClasses()
public String getQualifiedSchemaName(org.hibernate.mapping.Table table)
table - the table.
public String getQualifiedTableName(org.hibernate.mapping.Table table)
table - the table.
public String getPropertyType(org.hibernate.mapping.Property p)
public String getQualifiedColumnName(org.hibernate.mapping.Table table,
org.hibernate.mapping.Column column)
table - the table.column - the column
public String getSQLTypeName(org.hibernate.mapping.Column column)
column - the column.
public List getValues(org.hibernate.mapping.Table table,
org.hibernate.mapping.Column column)
table - the table.column - the column.
public List getProperties(org.hibernate.mapping.Table table,
org.hibernate.mapping.Column column)
table - the table.column - the column.
public POJOClass getComponentPOJO(org.hibernate.mapping.Property property)
property - Get ComponentPOJO corresponding to this Property
public List getInheritanceHierarchy(POJOClass pc)
public List getOrderedProperties(POJOClass pojoClass)
public List getSimpleProperties(POJOClass pojoClass)
public List getOrderedSimpleProperties(POJOClass pojoClass)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||