private void registerSecondPass(SecondPass secondPass, MetadataBuildingContext context) { context.getMetadataCollector().addSecondPass( secondPass ); }
public static void bindSqlResultSetMapping( SqlResultSetMapping ann, MetadataBuildingContext context, boolean isDefault) { //no need to handle inSecondPass context.getMetadataCollector().addSecondPass( new ResultsetMappingSecondPass( ann, context, isDefault ) ); }
public static void bindSqlResultSetMappings( SqlResultSetMappings ann, MetadataBuildingContext context, boolean isDefault) { if ( ann == null ) { return; } for (SqlResultSetMapping rs : ann.value()) { //no need to handle inSecondPass context.getMetadataCollector().addSecondPass( new ResultsetMappingSecondPass( rs, context, true ) ); } }
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 ) ); } }
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 ); } }
public void linkWithValue() { if ( columns[0].isNameDeferred() && !buildingContext.getMetadataCollector().isInSecondPass() && referencedEntityName != null ) { buildingContext.getMetadataCollector().addSecondPass( new PkDrivenByDefaultMapsIdSecondPass( referencedEntityName, (Ejb3JoinColumn[]) columns, simpleValue ) ); } else { for ( Ejb3Column column : columns ) { column.linkWithValue( simpleValue ); } } }
private static void bindFetchProfile(FetchProfile fetchProfileAnnotation, MetadataBuildingContext context) { for ( FetchProfile.FetchOverride fetch : fetchProfileAnnotation.fetchOverrides() ) { org.hibernate.annotations.FetchMode mode = fetch.mode(); if ( !mode.equals( org.hibernate.annotations.FetchMode.JOIN ) ) { throw new MappingException( "Only FetchMode.JOIN is currently supported" ); } context.getMetadataCollector().addSecondPass( new VerifyFetchProfileReferenceSecondPass( fetchProfileAnnotation.name(), fetch, context ) ); } }
context.getMetadataCollector().addSecondPass( secondPass, BinderHelper.isEmptyAnnotationValue( mappedBy )
buildingContext ); buildingContext.getMetadataCollector().addSecondPass( secondPass );
public SimpleValue make() { validate(); LOG.debugf( "building SimpleValue for %s", propertyName ); if ( table == null ) { table = columns[0].getTable(); } simpleValue = new SimpleValue( buildingContext, table ); if ( isVersion ) { simpleValue.makeVersion(); } if ( isNationalized ) { simpleValue.makeNationalized(); } if ( isLob ) { simpleValue.makeLob(); } linkWithValue(); boolean isInSecondPass = buildingContext.getMetadataCollector().isInSecondPass(); if ( !isInSecondPass ) { //Defer this to the second pass buildingContext.getMetadataCollector().addSecondPass( new SetSimpleValueTypeSecondPass( this ) ); } else { //We are already in second pass fillSimpleValue(); } return simpleValue; }
getBuildingContext() ); buildingContext.getMetadataCollector().addSecondPass( secondPass );
sourceDocument.getMetadataCollector().addSecondPass( columnBinder ); sourceDocument.getMetadataCollector().addSecondPass( fkSecondPass );
context.getMetadataCollector().addSecondPass( new SecondPass() { @Override
buildingContext.getMetadataCollector().addSecondPass( sp, !isMappedBy ); buildingContext.getMetadataCollector().addSecondPass( sp, !isMappedBy );
buildingContext ); buildingContext.getMetadataCollector().addSecondPass( sp );
buildingContext ); buildingContext.getMetadataCollector().addSecondPass( secondPass );
context.getMetadataCollector().addSecondPass( new JoinedSubclassFkSecondPass( jsc, inheritanceJoinedColumns, key, context ) ); context.getMetadataCollector().addSecondPass( new CreateKeySecondPass( jsc ) ); context.getMetadataCollector().addSecondPass( new CreateKeySecondPass( rootClass ) ); context.getMetadataCollector().addSecondPass( new SecondaryTableSecondPass( entityBinder,
context.getMetadataCollector().addSecondPass( secondPass );
foreignGenerator ); context.getMetadataCollector().addSecondPass( secondPass );