Top Inners Constructors Methods
org.hibernate.boot.model.source.internal.hbm

public Class RelationalValueSourceHelper

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .List, .Locale, .Set, org.hibernate.boot.MappingException, org.hibernate.boot.jaxb.hbm.spi.JaxbHbmColumnType, org.hibernate.boot.model.TruthValue, org.hibernate.boot.model.source.spi.ColumnSource, .DerivedValueSource, .RelationalValueSource, .SizeSource, org.hibernate.internal.util.StringHelper, org.hibernate.internal.util.collections.CollectionHelper

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
public static interface

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ColumnSource

Returns:

The single ColumnSource.
buildColumnSource
(MappingDocument
the mapping document
mappingDocument
,
String
The logical name of the table containing the relational values
containingTableName
,
RelationalValueSourceHelper.ColumnsAndFormulasSource
the adapter describing the value sources.
columnsAndFormulasSource
)

Given a ColumnsAndFormulasSource, build a single RelationalValueSource which is required to be a column.

public static List<ColumnSource>

Returns:

The corresponding list.
buildColumnSources
(MappingDocument
the mapping document
mappingDocument
,
String
The logical name of the table containing the relational values
containingTableName
,
RelationalValueSourceHelper.ColumnsAndFormulasSource
the adapter describing the value sources.
columnsAndFormulasSource
)

Given a ColumnsAndFormulasSource, build the corresponding list of ColumnSource.

public static RelationalValueSource

Returns:

The single RelationalValueSource.
buildValueSource
(MappingDocument
the mapping document
mappingDocument
,
String
The logical name of the table containing the relational values
containingTableName
,
RelationalValueSourceHelper.ColumnsAndFormulasSource
the adapter describing the value sources.
columnsAndFormulasSource
)

Given a ColumnsAndFormulasSource, build a single RelationalValueSource.

public static List<RelationalValueSource>

Returns:

The corresponding list.
buildValueSources
(MappingDocument
the mapping document
mappingDocument
,
String
The logical name of the table containing the relational values
containingTableName
,
RelationalValueSourceHelper.ColumnsAndFormulasSource
the adapter describing the value sources.
columnsAndFormulasSource
)

Given a ColumnsAndFormulasSource, build the corresponding list of RelationalValueSource

private static TruthValue
private static void
private static void
private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RelationalValueSourceHelperback to summary
public RelationalValueSourceHelper()

Method Detail

buildColumnSourceback to summary
public static ColumnSource buildColumnSource(MappingDocument mappingDocument, String containingTableName, RelationalValueSourceHelper.ColumnsAndFormulasSource columnsAndFormulasSource)

Given a ColumnsAndFormulasSource, build a single RelationalValueSource which is required to be a column. More than one RelationalValueSource will result in an exception. A formula, rather than a column, will result in an exception.

Parameters
mappingDocument:MappingDocument

the mapping document

containingTableName:String

The logical name of the table containing the relational values

columnsAndFormulasSource:RelationalValueSourceHelper.ColumnsAndFormulasSource

the adapter describing the value sources.

Returns:ColumnSource

The single ColumnSource.

buildColumnSourcesback to summary
public static List<ColumnSource> buildColumnSources(MappingDocument mappingDocument, String containingTableName, RelationalValueSourceHelper.ColumnsAndFormulasSource columnsAndFormulasSource)

Given a ColumnsAndFormulasSource, build the corresponding list of ColumnSource. Any formula, rather than a column, will result in an exception.

Parameters
mappingDocument:MappingDocument

the mapping document

containingTableName:String

The logical name of the table containing the relational values

columnsAndFormulasSource:RelationalValueSourceHelper.ColumnsAndFormulasSource

the adapter describing the value sources.

Returns:List<ColumnSource>

The corresponding list.

buildValueSourceback to summary
public static RelationalValueSource buildValueSource(MappingDocument mappingDocument, String containingTableName, RelationalValueSourceHelper.ColumnsAndFormulasSource columnsAndFormulasSource)

Given a ColumnsAndFormulasSource, build a single RelationalValueSource. More than one RelationalValueSource will result in an exception.

Parameters
mappingDocument:MappingDocument

the mapping document

containingTableName:String

The logical name of the table containing the relational values

columnsAndFormulasSource:RelationalValueSourceHelper.ColumnsAndFormulasSource

the adapter describing the value sources.

Returns:RelationalValueSource

The single RelationalValueSource.

buildValueSourcesback to summary
public static List<RelationalValueSource> buildValueSources(MappingDocument mappingDocument, String containingTableName, RelationalValueSourceHelper.ColumnsAndFormulasSource columnsAndFormulasSource)

Given a ColumnsAndFormulasSource, build the corresponding list of RelationalValueSource

Parameters
mappingDocument:MappingDocument

the mapping document

containingTableName:String

The logical name of the table containing the relational values

columnsAndFormulasSource:RelationalValueSourceHelper.ColumnsAndFormulasSource

the adapter describing the value sources.

Returns:List<RelationalValueSource>

The corresponding list.

interpretNullabilityToTruthValueback to summary
private static TruthValue interpretNullabilityToTruthValue(Boolean nullable)
validateCustomWriteFragmentback to summary
private static void validateCustomWriteFragment(MappingDocument sourceDocument, RelationalValueSourceHelper.ColumnsAndFormulasSource columnsAndFormulasSource, JaxbHbmColumnType columnMapping, String customWrite)
validateUseOfColumnOrFormulaNestedElementsback to summary
private static void validateUseOfColumnOrFormulaNestedElements(MappingDocument sourceDocument, RelationalValueSourceHelper.ColumnsAndFormulasSource columnsAndFormulasSource)
validateUseOfFormulaAttributeback to summary
private static void validateUseOfFormulaAttribute(MappingDocument sourceDocument, RelationalValueSourceHelper.ColumnsAndFormulasSource columnsAndFormulasSource)
org.hibernate.boot.model.source.internal.hbm back to summary

public abstract Class RelationalValueSourceHelper.AbstractColumnsAndFormulasSource

extends Object
implements ColumnsAndFormulasSource
Class Inheritance
  • java.lang.Object
  • org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.AbstractColumnsAndFormulasSource
All Implemented Interfaces
org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource
Known Direct Subclasses
org.hibernate.boot.model.source.internal.hbm.ManyToOneAttributeColumnsAndFormulasSource, org.hibernate.boot.model.source.internal.hbm.BasicAttributeColumnsAndFormulasSource

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public List<E>
public String
public Set<String>
public SizeSource
public Set<String>
public Boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractColumnsAndFormulasSourceback to summary
public AbstractColumnsAndFormulasSource()

Method Detail

getColumnAttributeback to summary
public String getColumnAttribute()

Implements org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getColumnAttribute.

Doc from org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getColumnAttribute.

Access to any column defined via XML attribute.

Returns:String

column, if one, as defined via XML attribute.

Annotations
@Override
getColumnOrFormulaElementsback to summary
public List<E> getColumnOrFormulaElements()

Implements org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getColumnOrFormulaElements.

Doc from org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getColumnOrFormulaElements.

Access to any nested <column/> or <formula /> XML elements.

Returns:List<E>

columns or formulas defined via nested XML elements.

Annotations
@Override
getFormulaAttributeback to summary
public String getFormulaAttribute()

Implements org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getFormulaAttribute.

Doc from org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getFormulaAttribute.

Access to any formula defined via XML attribute.

Returns:String

formula, if one, as defined via XML attribute.

Annotations
@Override
getIndexConstraintNamesback to summary
public Set<String> getIndexConstraintNames()

Implements org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getIndexConstraintNames.

Annotations
@Override
getSizeSourceback to summary
public SizeSource getSizeSource()

Implements org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getSizeSource.

Annotations
@Override
getUniqueKeyConstraintNamesback to summary
public Set<String> getUniqueKeyConstraintNames()

Implements org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.getUniqueKeyConstraintNames.

Annotations
@Override
isNullableback to summary
public Boolean isNullable()

Implements org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.isNullable.

Annotations
@Override
isUniqueback to summary
public boolean isUnique()

Implements org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.ColumnsAndFormulasSource.isUnique.

Annotations
@Override
org.hibernate.boot.model.source.internal.hbm back to summary

public Interface RelationalValueSourceHelper.ColumnsAndFormulasSource

Known Direct Implementers
org.hibernate.boot.model.source.internal.hbm.RelationalValueSourceHelper.AbstractColumnsAndFormulasSource, org.hibernate.boot.model.source.internal.hbm.BasicAttributeColumnsAndFormulasSource

Internal unifying contract used in creating org.hibernate.mapping.Column and org.hibernate.mapping.Formula instances. It adapts the variances across the different mappings which contribute column/formula information. For example, consider the <property/> mapping which might have: as opposed to a <timestamp/> mapping, which can only have:

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

column, if one, as defined via XML attribute.
getColumnAttribute
()

Access to any column defined via XML attribute.

public List<E>

Returns:

columns or formulas defined via nested XML elements.
getColumnOrFormulaElements
()

Access to any nested <column/> or <formula /> XML elements.

public String

Returns:

formula, if one, as defined via XML attribute.
getFormulaAttribute
()

Access to any formula defined via XML attribute.

public Set<String>
public SizeSource
public String

Returns:

The name of the source.
getSourceName
()

The name of the source.

public XmlElementMetadata

Returns:

The source XML element type
getSourceType
()

What kind of XML element does this information come from?

public Set<String>
public Boolean
public boolean

Method Detail

getColumnAttributeback to summary
public String getColumnAttribute()

Access to any column defined via XML attribute.

Returns:String

column, if one, as defined via XML attribute.

getColumnOrFormulaElementsback to summary
public List<E> getColumnOrFormulaElements()

Access to any nested <column/> or <formula /> XML elements.

Returns:List<E>

columns or formulas defined via nested XML elements.

getFormulaAttributeback to summary
public String getFormulaAttribute()

Access to any formula defined via XML attribute.

Returns:String

formula, if one, as defined via XML attribute.

getIndexConstraintNamesback to summary
public Set<String> getIndexConstraintNames()
getSizeSourceback to summary
public SizeSource getSizeSource()
getSourceNameback to summary
public String getSourceName()

The name of the source. May be null if none was specified. Will be treated as null if the nature says it cannot be named.

Returns:String

The name of the source.

See Also
XmlElementMetadata#canBeNamed()
getSourceTypeback to summary
public XmlElementMetadata getSourceType()

What kind of XML element does this information come from?

Returns:XmlElementMetadata

The source XML element type

getUniqueKeyConstraintNamesback to summary
public Set<String> getUniqueKeyConstraintNames()
isNullableback to summary
public Boolean isNullable()
isUniqueback to summary
public boolean isUnique()