public final class MetadataTools extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MetadataTools.ColumnNameIterator
An iterator over column names.
|
Modifier and Type | Method and Description |
---|---|
static void |
addColumn(org.dom4j.Element anyMapping,
Column column)
Adds
column element with the following attributes (unless empty): name ,
length , scale , precision , sql-type , read
and write . |
static org.dom4j.Element |
addColumn(org.dom4j.Element parent,
String name,
Integer length,
Integer scale,
Integer precision,
String sqlType,
String customRead,
String customWrite)
Adds new
column element. |
static org.dom4j.Element |
addColumn(org.dom4j.Element parent,
String name,
Integer length,
Integer scale,
Integer precision,
String sqlType,
String customRead,
String customWrite,
boolean quoted) |
static void |
addColumns(org.dom4j.Element anyMapping,
Iterator selectables) |
static void |
addColumnsOrFormulas(org.dom4j.Element element,
Iterator columnIterator)
Adds all
column or formula elements. |
static void |
addFormula(org.dom4j.Element element,
Formula formula)
Adds
formula element. |
static org.dom4j.Element |
addModifiedFlagProperty(org.dom4j.Element parent,
String propertyName,
String suffix,
String modifiedFlagName) |
static org.dom4j.Element |
addNativelyGeneratedId(org.dom4j.Element parent,
String name,
String type,
boolean useRevisionEntityWithNativeId) |
static org.dom4j.Element |
addOrModifyColumn(org.dom4j.Element parent,
String name)
Column name shall be wrapped with '`' signs if quotation required.
|
static org.dom4j.Element |
addProperty(org.dom4j.Element parent,
String name,
String type,
boolean insertable,
boolean key) |
static org.dom4j.Element |
addProperty(org.dom4j.Element parent,
String name,
String type,
boolean insertable,
boolean updateable,
boolean key) |
static org.dom4j.Element |
createEntity(org.dom4j.Document document,
AuditTableData auditTableData,
String discriminatorValue,
Boolean isAbstract) |
static org.dom4j.Element |
createJoin(org.dom4j.Element parent,
String tableName,
String schema,
String catalog) |
static org.dom4j.Element |
createSubclassEntity(org.dom4j.Document document,
String subclassType,
AuditTableData auditTableData,
String extendsEntityName,
String discriminatorValue,
Boolean isAbstract) |
static MetadataTools.ColumnNameIterator |
getColumnNameIterator(Iterator<Selectable> selectableIterator) |
static MetadataTools.ColumnNameIterator |
getColumnNameIterator(JoinColumn[] joinColumns) |
static String |
getModifiedFlagPropertyName(String propertyName,
String suffix) |
static void |
prefixNamesInPropertyElement(org.dom4j.Element element,
String prefix,
MetadataTools.ColumnNameIterator columnNameIterator,
boolean changeToKey,
boolean insertable) |
public static org.dom4j.Element addNativelyGeneratedId(org.dom4j.Element parent, String name, String type, boolean useRevisionEntityWithNativeId)
public static org.dom4j.Element addProperty(org.dom4j.Element parent, String name, String type, boolean insertable, boolean updateable, boolean key)
public static org.dom4j.Element addProperty(org.dom4j.Element parent, String name, String type, boolean insertable, boolean key)
public static org.dom4j.Element addModifiedFlagProperty(org.dom4j.Element parent, String propertyName, String suffix, String modifiedFlagName)
public static String getModifiedFlagPropertyName(String propertyName, String suffix)
public static org.dom4j.Element addOrModifyColumn(org.dom4j.Element parent, String name)
public static org.dom4j.Element addColumn(org.dom4j.Element parent, String name, Integer length, Integer scale, Integer precision, String sqlType, String customRead, String customWrite)
column
element. Method assumes that the value of name
attribute is already
wrapped with '`' signs if quotation required. It shall be invoked when column name is taken directly from configuration
file and not from PersistentClass
descriptor.public static org.dom4j.Element addColumn(org.dom4j.Element parent, String name, Integer length, Integer scale, Integer precision, String sqlType, String customRead, String customWrite, boolean quoted)
public static org.dom4j.Element createEntity(org.dom4j.Document document, AuditTableData auditTableData, String discriminatorValue, Boolean isAbstract)
public static org.dom4j.Element createSubclassEntity(org.dom4j.Document document, String subclassType, AuditTableData auditTableData, String extendsEntityName, String discriminatorValue, Boolean isAbstract)
public static org.dom4j.Element createJoin(org.dom4j.Element parent, String tableName, String schema, String catalog)
public static void addColumns(org.dom4j.Element anyMapping, Iterator selectables)
public static void addColumn(org.dom4j.Element anyMapping, Column column)
column
element with the following attributes (unless empty): name
,
length
, scale
, precision
, sql-type
, read
and write
.anyMapping
- Parent element.column
- Column descriptor.public static void prefixNamesInPropertyElement(org.dom4j.Element element, String prefix, MetadataTools.ColumnNameIterator columnNameIterator, boolean changeToKey, boolean insertable)
public static void addFormula(org.dom4j.Element element, Formula formula)
formula
element.element
- Parent element.formula
- Formula descriptor.public static void addColumnsOrFormulas(org.dom4j.Element element, Iterator columnIterator)
column
or formula
elements.public static MetadataTools.ColumnNameIterator getColumnNameIterator(Iterator<Selectable> selectableIterator)
public static MetadataTools.ColumnNameIterator getColumnNameIterator(JoinColumn[] joinColumns)
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.