void addIndex(String indexName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( indexName, this, context, false ); if ( inSecondPass ) { secondPass.doSecondPass( context.getMetadataCollector().getEntityBindingMap() ); } else { context.getMetadataCollector().addSecondPass( secondPass ); } }
if ( columns != null ) { for ( int i = 0; i < columns.length; i++ ) { addConstraintToColumn( columns[i] ); addConstraintToColumns( columns ); addConstraintToColumn( buildingContext.getMetadataCollector() .getLogicalColumnName( table, column.getMappingColumn().getQuotedName() )
public static void addIndexes(Table hibTable, Index[] indexes, MetadataBuildingContext buildingContext) { for (Index index : indexes) { //no need to handle inSecondPass here since it is only called from EntityBinder buildingContext.getMetadataCollector().addSecondPass( new IndexOrUniqueKeySecondPass( hibTable, index.name(), index.columnNames(), buildingContext ) ); } }
public void doSecondPass(Map persistentClasses) throws MappingException { if ( columns != null ) { for (String columnName : columns) { addConstraintToColumn( columnName ); } } if ( column != null ) { this.table = column.getTable(); addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) ); } }
public static void addIndexes(Table hibTable, Index[] indexes, ExtendedMappings mappings) { for (Index index : indexes) { //no need to handle inSecondPass here since it is only called from EntityBinder mappings.addSecondPass( new IndexOrUniqueKeySecondPass( hibTable, index.name(), index.columnNames(), mappings ) ); } }
public void doSecondPass(Map persistentClasses) throws MappingException { if ( columns != null ) { for (String columnName : columns) { addConstraintToColumn( columnName ); } } if ( column != null ) { this.table = column.getTable(); addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) ); } }
void addUniqueKey(String uniqueKeyName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( uniqueKeyName, this, context, true ); if ( inSecondPass ) { secondPass.doSecondPass( context.getMetadataCollector().getEntityBindingMap() ); } else { context.getMetadataCollector().addSecondPass( secondPass ); } }
public static void addIndexes(Table hibTable, Index[] indexes, Mappings mappings) { for (Index index : indexes) { //no need to handle inSecondPass here since it is only called from EntityBinder mappings.addSecondPass( new IndexOrUniqueKeySecondPass( hibTable, index.name(), index.columnNames(), mappings ) ); } }
@Override public void doSecondPass(Map persistentClasses) throws MappingException { if ( columns != null ) { for ( int i = 0; i < columns.length; i++ ) { addConstraintToColumn( columns[i] ); } } if ( column != null ) { this.table = column.getTable(); final PropertyHolder propertyHolder = column.getPropertyHolder(); String entityName = ( propertyHolder.isComponent() ) ? propertyHolder.getPersistentClass().getEntityName() : propertyHolder.getEntityName(); final PersistentClass persistentClass = (PersistentClass) persistentClasses.get( entityName ); final Property property = persistentClass.getProperty( column.getPropertyName() ); if ( property.getValue() instanceof Component ) { final Component component = (Component) property.getValue(); final List<Column> columns = component.getMappedColumns().stream() .filter( Column.class::isInstance ) .map(Column.class::cast ) .collect( Collectors.toList() ); addConstraintToColumns( columns ); } else { addConstraintToColumn( column.getMappingColumn().getQuotedName() ) ; } } }
public void doSecondPass(Map persistentClasses) throws MappingException { if ( columns != null ) { for (String columnName : columns) { addConstraintToColumn( columnName ); } } if ( column != null ) { this.table = column.getTable(); addConstraintToColumn( mappings.getLogicalColumnName( column.getMappingColumn().getQuotedName(), table ) ); } }
void addIndex(String indexName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( indexName, this, mappings, false ); if ( inSecondPass ) { secondPass.doSecondPass( mappings.getClasses() ); } else { mappings.addSecondPass( secondPass ); } }
public static void addIndexes(Table hibTable, Index[] indexes, Mappings mappings) { for (Index index : indexes) { //no need to handle inSecondPass here since it is only called from EntityBinder mappings.addSecondPass( new IndexOrUniqueKeySecondPass( hibTable, index.name(), index.columnNames(), mappings ) ); } }
void addUniqueKey(String uniqueKeyName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( uniqueKeyName, this, mappings, true ); if ( inSecondPass ) { secondPass.doSecondPass( mappings.getClasses() ); } else { mappings.addSecondPass( secondPass ); } }
public static void addIndexes(MappedTable hibTable, Index[] indexes, MetadataBuildingContext buildingContext) { for (Index index : indexes) { //no need to handle inSecondPass here since it is only called from EntityBinder buildingContext.getMetadataCollector().addSecondPass( new IndexOrUniqueKeySecondPass( hibTable, index.name(), index.columnNames(), buildingContext ) ); } }
void addUniqueKey(String uniqueKeyName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( uniqueKeyName, this, mappings, true ); if ( inSecondPass ) { secondPass.doSecondPass( mappings.getClasses() ); } else { mappings.addSecondPass( secondPass ); } }
void addUniqueKey(String uniqueKeyName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( uniqueKeyName, this, mappings, true ); if ( inSecondPass ) { secondPass.doSecondPass( mappings.getClasses() ); } else { mappings.addSecondPass( secondPass ); } }
void addIndex(String indexName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( indexName, this, mappings, false ); if ( inSecondPass ) { secondPass.doSecondPass( mappings.getClasses() ); } else { mappings.addSecondPass( secondPass ); } }
void addIndex(String indexName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( indexName, this, mappings, false ); if ( inSecondPass ) { secondPass.doSecondPass( mappings.getClasses() ); } else { mappings.addSecondPass( secondPass ); } }
void addIndex(String indexName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( indexName, this, context, false ); if ( inSecondPass ) { secondPass.doSecondPass( context.getMetadataCollector().getEntityBindingMap() ); } else { context.getMetadataCollector().addSecondPass( secondPass ); } }
void addUniqueKey(String uniqueKeyName, boolean inSecondPass) { IndexOrUniqueKeySecondPass secondPass = new IndexOrUniqueKeySecondPass( uniqueKeyName, this, context, true ); if ( inSecondPass ) { secondPass.doSecondPass( context.getMetadataCollector().getEntityBindingMap() ); } else { context.getMetadataCollector().addSecondPass( secondPass ); } }