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

pack-priv Class SecondaryTableSourceImpl

extends AbstractHbmSourceNode
implements SecondaryTableSource
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.model.source.spi.SecondaryTableSource, org.hibernate.boot.model.source.spi.ForeignKeyContributingSource
Imports
java.util.List, .Locale, org.hibernate.boot.MappingException, org.hibernate.boot.jaxb.hbm.spi.JaxbHbmFetchStyleEnum, .JaxbHbmOnDeleteEnum, .JaxbHbmSecondaryTableType, org.hibernate.boot.model.CustomSql, org.hibernate.boot.model.source.spi.ColumnSource, .EntityNamingSource, .InLineViewSource, .SecondaryTableSource, .TableSource, .TableSpecificationSource, org.hibernate.engine.FetchStyle, org.hibernate.internal.util.StringHelper

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final JaxbHbmSecondaryTableType
private final TableSpecificationSource
private final List<ColumnSource>
private final String

Constructor Summary

AccessConstructor and Description
public
SecondaryTableSourceImpl(MappingDocument sourceMappingDocument, final JaxbHbmSecondaryTableType jaxbSecondaryTableMapping, EntityNamingSource entityNamingSource, Helper.InLineViewNameInferrer inLineViewNameInferrer)

Method Summary

Modifier and TypeMethod and Description
public boolean
public String
public CustomSql
getCustomSqlDelete()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlDelete.

Obtain the custom SQL to be used for deletes for this entity
public CustomSql
getCustomSqlInsert()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlInsert.

Obtain the custom SQL to be used for inserts for this entity
public CustomSql
getCustomSqlUpdate()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlUpdate.

Obtain the custom SQL to be used for updates for this entity
public String
getExplicitForeignKeyName()

Implements org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.getExplicitForeignKeyName.

Retrieve the name of the foreign key as supplied by the user, or null if the user supplied none.
public FetchStyle
public String
public List<ColumnSource>
getPrimaryKeyColumnSources()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getPrimaryKeyColumnSources.

Retrieves the columns defines as making up this secondary tables primary key.
public TableSpecificationSource
public boolean
public boolean
public boolean
Inherited from org.hibernate.boot.model.source.internal.hbm.AbstractHbmSourceNode:
mappingRootmetadataBuildingContextoriginsourceMappingDocument

Field Detail

jaxbSecondaryTableMappingback to summary
private final JaxbHbmSecondaryTableType jaxbSecondaryTableMapping
joinTableback to summary
private final TableSpecificationSource joinTable
keyColumnSourcesback to summary
private final List<ColumnSource> keyColumnSources
logicalTableNameback to summary
private final String logicalTableName

Constructor Detail

SecondaryTableSourceImplback to summary
public SecondaryTableSourceImpl(MappingDocument sourceMappingDocument, final JaxbHbmSecondaryTableType jaxbSecondaryTableMapping, EntityNamingSource entityNamingSource, Helper.InLineViewNameInferrer inLineViewNameInferrer)
Annotations
@SuppressWarnings:unchecked

Method Detail

createForeignKeyConstraintback to summary
public boolean createForeignKeyConstraint()

Implements org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.createForeignKeyConstraint.

Doc from org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.createForeignKeyConstraint.

Primarily exists to support JPA's @ForeignKey(NO_CONSTRAINT).

Returns:boolean

true if the FK constraint should be created, false if not.

Annotations
@Override
getCommentback to summary
public String getComment()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getComment.

Annotations
@Override
getCustomSqlDeleteback to summary
public CustomSql getCustomSqlDelete()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlDelete.

Doc from org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlDelete.

Obtain the custom SQL to be used for deletes for this entity

Returns:CustomSql

The custom delete SQL

Annotations
@Override
getCustomSqlInsertback to summary
public CustomSql getCustomSqlInsert()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlInsert.

Doc from org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlInsert.

Obtain the custom SQL to be used for inserts for this entity

Returns:CustomSql

The custom insert SQL

Annotations
@Override
getCustomSqlUpdateback to summary
public CustomSql getCustomSqlUpdate()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlUpdate.

Doc from org.hibernate.boot.model.source.spi.SecondaryTableSource.getCustomSqlUpdate.

Obtain the custom SQL to be used for updates for this entity

Returns:CustomSql

The custom update SQL

Annotations
@Override
getExplicitForeignKeyNameback to summary
public String getExplicitForeignKeyName()

Implements org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.getExplicitForeignKeyName.

Doc from org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.getExplicitForeignKeyName.

Retrieve the name of the foreign key as supplied by the user, or null if the user supplied none.

Returns:String

The user supplied foreign key name.

Annotations
@Override
getFetchStyleback to summary
public FetchStyle getFetchStyle()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getFetchStyle.

Annotations
@Override
getLogicalTableNameForContainedColumnsback to summary
public String getLogicalTableNameForContainedColumns()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getLogicalTableNameForContainedColumns.

Annotations
@Override
getPrimaryKeyColumnSourcesback to summary
public List<ColumnSource> getPrimaryKeyColumnSources()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getPrimaryKeyColumnSources.

Doc from org.hibernate.boot.model.source.spi.SecondaryTableSource.getPrimaryKeyColumnSources.

Retrieves the columns defines as making up this secondary tables primary key. Each entry should have a corresponding entry in the foreign-key columns described by the ForeignKeyContributingSource aspect of this contract.

Returns:List<ColumnSource>

The columns defining the primary key for this secondary table

Annotations
@Override
getTableSourceback to summary
public TableSpecificationSource getTableSource()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.getTableSource.

Doc from org.hibernate.boot.model.source.spi.SecondaryTableSource.getTableSource.

Obtain the table being joined to.

Returns:TableSpecificationSource

The joined table.

Annotations
@Override
isCascadeDeleteEnabledback to summary
public boolean isCascadeDeleteEnabled()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.isCascadeDeleteEnabled.

Doc from org.hibernate.boot.model.source.spi.ForeignKeyContributingSource.isCascadeDeleteEnabled.

Is "cascade delete" enabled for the foreign key? In other words, if a record in the parent (referenced) table is deleted, should the corresponding records in the child table automatically be deleted?

Returns:boolean

true, if the cascade delete is enabled; false, otherwise.

Annotations
@Override
isInverseback to summary
public boolean isInverse()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.isInverse.

Annotations
@Override
isOptionalback to summary
public boolean isOptional()

Implements org.hibernate.boot.model.source.spi.SecondaryTableSource.isOptional.

Annotations
@Override