public void createForeignKey() { getKey().createForeignKeyOfEntity( persistentClass.getEntityName() ); }
protected void checkColumnDuplication() { HashSet cols = new HashSet(); if ( getIdentifierMapper() == null ) { //an identifier mapper => getKey will be included in the getNonDuplicatedPropertyIterator() //and checked later, so it needs to be excluded checkColumnDuplication( cols, getKey().getColumnIterator() ); } checkColumnDuplication( cols, getDiscriminatorColumnIterator() ); checkPropertyColumnDuplication( cols, getNonDuplicatedPropertyIterator() ); Iterator iter = getJoinIterator(); while ( iter.hasNext() ) { cols.clear(); Join join = (Join) iter.next(); checkColumnDuplication( cols, join.getKey().getColumnIterator() ); checkPropertyColumnDuplication( cols, join.getPropertyIterator() ); } }
private void setFKNameIfDefined(Join join) { // just awful.. org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join ); if ( matchingTable != null && !BinderHelper.isEmptyAnnotationValue( matchingTable.foreignKey().name() ) ) { ( (SimpleValue) join.getKey() ).setForeignKeyName( matchingTable.foreignKey().name() ); } else { javax.persistence.SecondaryTable jpaSecondaryTable = findMatchingSecondaryTable( join ); if ( jpaSecondaryTable != null ) { if ( jpaSecondaryTable.foreignKey().value() == ConstraintMode.NO_CONSTRAINT ) { ( (SimpleValue) join.getKey() ).setForeignKeyName( "none" ); } else { ( (SimpleValue) join.getKey() ).setForeignKeyName( StringHelper.nullIfEmpty( jpaSecondaryTable.foreignKey().name() ) ); ( (SimpleValue) join.getKey() ).setForeignKeyDefinition( StringHelper.nullIfEmpty( jpaSecondaryTable.foreignKey().foreignKeyDefinition() ) ); } } } }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey( table ); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
MetadataTools.addColumns( joinKey, join.getKey().getColumnIterator() ); MetadataTools.addColumn( joinKey, verEntCfg.getRevisionFieldName(), null, null, null, null, null, null );
Join join = (Join) joinsIt.next(); if ( join.containsProperty( property ) ) { key = join.getKey(); break;
.getJpaCompliance() .isJpaCacheComplianceEnabled(); cascadeDeleteEnabled[j] = join.getKey().isCascadeDeleteEnabled() && factory.getDialect().supportsCascadeDelete(); : join.getCustomSQLDeleteCheckStyle(); Iterator iter = join.getKey().getColumnIterator(); keyColumnNames[j] = new String[join.getKey().getColumnSpan()]; int i = 0; while ( iter.hasNext() ) { subclassTables.add( joinTableName ); Iterator iter = join.getKey().getColumnIterator(); String[] keyCols = new String[join.getKey().getColumnSpan()]; int i = 0; while ( iter.hasNext() ) {
tableNames.add( tableName ); KeyValue key = join.getKey(); int joinIdColumnSpan = key.getColumnSpan();
manyToOne.setUnwrapProxy( value.isUnwrapProxy() ); prop.setValue( manyToOne ); Iterator otherSideJoinKeyColumns = otherSideJoin.getKey().getColumnIterator(); while ( otherSideJoinKeyColumns.hasNext() ) { Column column = (Column) otherSideJoinKeyColumns.next();
private void setFKNameIfDefined(Join join) { org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join ); if ( matchingTable != null && !BinderHelper.isDefault( matchingTable.foreignKey().name() ) ) { ( (SimpleValue) join.getKey() ).setForeignKeyName( matchingTable.foreignKey().name() ); } }
Join join = (Join) joinsIt.next(); if ( join.containsProperty( property ) ) { key = join.getKey(); break;
manyToOne.setUnwrapProxy( value.isUnwrapProxy() ); prop.setValue( manyToOne ); Iterator otherSideJoinKeyColumns = otherSideJoin.getKey().getColumnIterator(); while ( otherSideJoinKeyColumns.hasNext() ) { Column column = (Column) otherSideJoinKeyColumns.next();
protected void checkColumnDuplication() { HashSet cols = new HashSet(); checkColumnDuplication( cols, getKey().getColumnIterator() ); checkColumnDuplication( cols, getDiscriminatorColumnIterator() ); checkPropertyColumnDuplication( cols, getNonDuplicatedPropertyIterator() ); Iterator iter = getJoinIterator(); while ( iter.hasNext() ) { cols.clear(); Join join = (Join) iter.next(); checkColumnDuplication( cols, join.getKey().getColumnIterator() ); checkPropertyColumnDuplication( cols, join.getPropertyIterator() ); } }
public void createPrimaryKey() { //Primary key constraint MappedPrimaryKey pk = new PrimaryKey( table ); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getMappedColumns() ); }
private void setFKNameIfDefined(Join join) { org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join ); if ( matchingTable != null && !BinderHelper.isEmptyAnnotationValue( matchingTable.foreignKey().name() ) ) { ( (SimpleValue) join.getKey() ).setForeignKeyName( matchingTable.foreignKey().name() ); } }
private void setFKNameIfDefined(Join join) { org.hibernate.annotations.Table matchingTable = findMatchingComplimentTableAnnotation( join ); if ( matchingTable != null && !BinderHelper.isEmptyAnnotationValue( matchingTable.foreignKey().name() ) ) { ( (SimpleValue) join.getKey() ).setForeignKeyName( matchingTable.foreignKey().name() ); } }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }
public void createPrimaryKey() { //Primary key constraint PrimaryKey pk = new PrimaryKey(); pk.setTable(table); pk.setName( PK_ALIAS.toAliasString( table.getName() ) ); table.setPrimaryKey(pk); pk.addColumns( getKey().getColumnIterator() ); }