本文整理了Java中org.hibernate.mapping.Column.getCanonicalName()
方法的一些代码示例,展示了Column.getCanonicalName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Column.getCanonicalName()
方法的具体详情如下:
包路径:org.hibernate.mapping.Column
类名称:Column
方法名:getCanonicalName
暂无
代码示例来源:origin: hibernate/hibernate-orm
/**
* Return the column which is identified by column provided as argument.
*
* @param column column with atleast a name.
* @return the underlying column or null if not inside this table. Note: the instance *can* be different than the input parameter, but the name will be the same.
*/
public Column getColumn(Column column) {
if ( column == null ) {
return null;
}
Column myColumn = (Column) columns.get( column.getCanonicalName() );
return column.equals( myColumn ) ?
myColumn :
null;
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
public void addColumn(Column column) {
final Iterator<Column> columnIterator = getTable().getColumnIterator();
while ( columnIterator.hasNext() ) {
final Column next = columnIterator.next();
if ( next.getCanonicalName().equals( column.getCanonicalName() ) ) {
next.setNullable( false );
log.debugf(
"Forcing column [%s] to be non-null as it is part of the primary key for table [%s]",
column.getCanonicalName(),
getTableNameForLogging( column )
);
}
}
super.addColumn( column );
}
代码示例来源:origin: hibernate/hibernate-orm
public void addColumn(Column column) {
Column old = getColumn( column );
if ( old == null ) {
if ( primaryKey != null ) {
for ( Column c : primaryKey.getColumns() ) {
if ( c.getCanonicalName().equals( column.getCanonicalName() ) ) {
column.setNullable( false );
log.debugf(
"Forcing column [%s] to be non-null as it is part of the primary key for table [%s]",
column.getCanonicalName(),
getNameIdentifier().getCanonicalName()
);
}
}
}
this.columns.put( column.getCanonicalName(), column );
column.uniqueInteger = this.columns.size();
}
else {
column.uniqueInteger = old.uniqueInteger;
}
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
@Override
public boolean containsColumn(Column column) {
return columns.containsKey( column.getCanonicalName() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
public void addColumn(Column column) {
Column old = (Column) getColumn( column );
if ( old == null ) {
columns.put( column.getCanonicalName(), column );
column.uniqueInteger = columns.size();
}
else {
column.uniqueInteger = old.uniqueInteger;
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
public void addColumn(Column column) {
Column old = (Column) getColumn( column );
if ( old == null ) {
columns.put( column.getCanonicalName(), column );
column.uniqueInteger = columns.size();
}
else {
column.uniqueInteger = old.uniqueInteger;
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
/**
* Return the column which is identified by column provided as argument.
*
* @param column column with atleast a name.
* @return the underlying column or null if not inside this table. Note: the instance *can* be different than the input parameter, but the name will be the same.
*/
public Column getColumn(Column column) {
if ( column == null ) {
return null;
}
Column myColumn = (Column) columns.get( column.getCanonicalName() );
return column.equals( myColumn ) ?
myColumn :
null;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
/**
* Return the column which is identified by column provided as argument.
*
* @param column column with atleast a name.
* @return the underlying column or null if not inside this table. Note: the instance *can* be different than the input parameter, but the name will be the same.
*/
public Column getColumn(Column column) {
if ( column == null ) {
return null;
}
Column myColumn = (Column) columns.get( column.getCanonicalName() );
return column.equals( myColumn ) ?
myColumn :
null;
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
/**
* Return the column which is identified by column provided as argument.
*
* @param column column with atleast a name.
*
* @return the underlying column or null if not inside this table. Note: the instance *can* be different than the input parameter, but the name will be the same.
*/
@Override
public Column getColumn(Column column) {
if ( column == null ) {
return null;
}
Column myColumn = columns.get( column.getCanonicalName() );
return column.equals( myColumn ) ?
myColumn :
null;
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
@Override
public void addColumn(Column column) {
final Collection<Column> columns = getMappedTable().getMappedColumns();
columns.stream().filter( c -> c.getCanonicalName().equals( column.getCanonicalName() ) )
.forEach( c -> {
c.setNullable( false );
log.debugf(
"Forcing column [%s] to be non-null as it is part of the primary key for table [%s]",
column.getCanonicalName(),
getTableNameForLogging( column )
);
} );
super.addColumn( column );
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
if ( !pkColumn.isFormula() ) {
Column c = (Column) pkColumn;
if ( c.getCanonicalName().equals( column.getCanonicalName() ) ) {
column.setNullable( false );
log.debugf(
"Forcing column [%s] to be non-null as it is part of the primary key for table [%s]",
column.getCanonicalName(),
getNameIdentifier().getCanonicalName()
);
this.columns.put( column.getCanonicalName(), column );
column.setUniqueInteger( this.columns.size() );
内容来源于网络,如有侵权,请联系作者删除!