HHH-17061 Remove PersistentClass#getJoinClosureIterator

This commit is contained in:
Sanne Grinovero 2023-08-09 12:21:49 +02:00 committed by Sanne Grinovero
parent c4b0a71722
commit 58c3460f1f
3 changed files with 2 additions and 16 deletions

View File

@ -727,11 +727,6 @@ public abstract class PersistentClass implements IdentifiableTypeClass, Attribut
return joins.iterator(); return joins.iterator();
} }
@Deprecated(since = "6.0")
public Iterator<Join> getJoinClosureIterator() {
return joins.iterator();
}
public void addJoin(Join join) { public void addJoin(Join join) {
if ( !joins.contains(join) ) { if ( !joins.contains(join) ) {
joins.add( join ); joins.add( join );

View File

@ -246,15 +246,6 @@ public class Subclass extends PersistentClass {
return new JoinedList<>( getSuperclass().getJoinClosure(), super.getJoinClosure() ); return new JoinedList<>( getSuperclass().getJoinClosure(), super.getJoinClosure() );
} }
@Deprecated(since = "6.0") @SuppressWarnings("deprecation")
public Iterator<Join> getJoinClosureIterator() {
return new JoinedIterator<>(
getSuperclass().getJoinClosureIterator(),
super.getJoinClosureIterator()
);
}
@Override @Override
public boolean isClassOrSuperclassJoin(Join join) { public boolean isClassOrSuperclassJoin(Join join) {
return super.isClassOrSuperclassJoin( join ) return super.isClassOrSuperclassJoin( join )

View File

@ -38,7 +38,7 @@ import static org.junit.Assert.fail;
public class JoinTest extends BaseNonConfigCoreFunctionalTestCase { public class JoinTest extends BaseNonConfigCoreFunctionalTestCase {
@Test @Test
public void testDefaultValue() { public void testDefaultValue() {
Join join = metadata().getEntityBinding( Life.class.getName() ).getJoinClosureIterator().next(); Join join = metadata().getEntityBinding( Life.class.getName() ).getJoinClosure().get( 0 );
assertEquals( "ExtendedLife", join.getTable().getName() ); assertEquals( "ExtendedLife", join.getTable().getName() );
org.hibernate.mapping.Column owner = new org.hibernate.mapping.Column(); org.hibernate.mapping.Column owner = new org.hibernate.mapping.Column();
owner.setName( "LIFE_ID" ); owner.setName( "LIFE_ID" );
@ -63,7 +63,7 @@ public class JoinTest extends BaseNonConfigCoreFunctionalTestCase {
@Test @Test
public void testCompositePK() { public void testCompositePK() {
Join join = metadata().getEntityBinding( Dog.class.getName() ).getJoinClosureIterator().next(); Join join = metadata().getEntityBinding( Dog.class.getName() ).getJoinClosure().get( 0 );
assertEquals( "DogThoroughbred", join.getTable().getName() ); assertEquals( "DogThoroughbred", join.getTable().getName() );
org.hibernate.mapping.Column owner = new org.hibernate.mapping.Column(); org.hibernate.mapping.Column owner = new org.hibernate.mapping.Column();
owner.setName( "OWNER_NAME" ); owner.setName( "OWNER_NAME" );