diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/unique/DB2UniqueDelegate.java b/hibernate-core/src/main/java/org/hibernate/dialect/unique/DB2UniqueDelegate.java index b866eb762b..45cdd78d39 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/unique/DB2UniqueDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/unique/DB2UniqueDelegate.java @@ -35,7 +35,7 @@ public class DB2UniqueDelegate extends DefaultUniqueDelegate { dialect, uniqueKey.getName(), uniqueKey.getTable(), - uniqueKey.columnIterator(), + uniqueKey.getColumnIterator(), uniqueKey.getColumnOrderMap(), true, metadata @@ -63,7 +63,7 @@ public class DB2UniqueDelegate extends DefaultUniqueDelegate { } private boolean hasNullable(org.hibernate.mapping.UniqueKey uniqueKey) { - final Iterator iter = uniqueKey.columnIterator(); + final Iterator iter = uniqueKey.getColumnIterator(); while ( iter.hasNext() ) { if ( iter.next().isNullable() ) { return true; diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/unique/DefaultUniqueDelegate.java b/hibernate-core/src/main/java/org/hibernate/dialect/unique/DefaultUniqueDelegate.java index eec4fbd62f..d40d8b000f 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/unique/DefaultUniqueDelegate.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/unique/DefaultUniqueDelegate.java @@ -60,7 +60,7 @@ public class DefaultUniqueDelegate implements UniqueDelegate { protected String uniqueConstraintSql(UniqueKey uniqueKey) { final StringBuilder sb = new StringBuilder(); sb.append( "unique (" ); - final Iterator columnIterator = uniqueKey.columnIterator(); + final Iterator columnIterator = uniqueKey.getColumnIterator(); while ( columnIterator.hasNext() ) { final org.hibernate.mapping.Column column = columnIterator.next(); sb.append( column.getQuotedName( dialect ) ); diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Constraint.java b/hibernate-core/src/main/java/org/hibernate/mapping/Constraint.java index f1f32981ac..6f59ea8036 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Constraint.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Constraint.java @@ -151,15 +151,11 @@ public abstract class Constraint implements RelationalModel, Exportable, Seriali public Column getColumn(int i) { return columns.get( i ); } - //todo duplicated method, remove one + public Iterator getColumnIterator() { return columns.iterator(); } - public Iterator columnIterator() { - return columns.iterator(); - } - public Table getTable() { return table; } diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Table.java b/hibernate-core/src/main/java/org/hibernate/mapping/Table.java index c1881b6b00..56ae3d7d4d 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Table.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Table.java @@ -373,7 +373,7 @@ public class Table implements RelationalModel, Serializable, Exportable { } private boolean isSameAsPrimaryKeyColumns(UniqueKey uniqueKey) { - if ( primaryKey == null || ! primaryKey.columnIterator().hasNext() ) { + if ( primaryKey == null || ! primaryKey.getColumnIterator().hasNext() ) { // happens for many-to-many tables return false; } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/any/AnyTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/any/AnyTest.java index e2d0298c12..0f73020c6c 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/any/AnyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/any/AnyTest.java @@ -234,7 +234,7 @@ public class AnyTest extends BaseCoreFunctionalTestCase { // Simply having this orm.xml file in the classpath reproduces HHH-4261. @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/any/orm.xml" }; } } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/bytecode/ProxyBreakingTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/bytecode/ProxyBreakingTest.java index 65f9a198dc..30ed90df7a 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/bytecode/ProxyBreakingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/bytecode/ProxyBreakingTest.java @@ -37,7 +37,7 @@ public class ProxyBreakingTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/bytecode/Hammer.hbm.xml" }; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/idclass/xml/IdClassXmlTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/idclass/xml/IdClassXmlTest.java index b11d21cb5c..b305f03fad 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/idclass/xml/IdClassXmlTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/idclass/xml/IdClassXmlTest.java @@ -44,7 +44,7 @@ public class IdClassXmlTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/idclass/xml/HabitatSpeciesLink.xml" }; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/loader/LoaderTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/loader/LoaderTest.java index 2e3440d05c..9d4b5e5371 100755 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/loader/LoaderTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/loader/LoaderTest.java @@ -25,7 +25,7 @@ import org.junit.Test; */ public class LoaderTest extends BaseCoreFunctionalTestCase { @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/loader/Loader.hbm.xml" }; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/OptionalOneToOnePKJCTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/OptionalOneToOnePKJCTest.java index 3db7e2402e..57fee3e6ac 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/OptionalOneToOnePKJCTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/OptionalOneToOnePKJCTest.java @@ -166,7 +166,7 @@ public class OptionalOneToOnePKJCTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/onetoone/orm.xml" }; } } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java index 3cc51ce933..61cf6676d4 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/query/QueryAndSQLTest.java @@ -649,7 +649,7 @@ public class QueryAndSQLTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/query/orm.xml" }; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/reflection/ElementCollectionConverterTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/reflection/ElementCollectionConverterTest.java index 2eeb459eae..de8d20a4a2 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/reflection/ElementCollectionConverterTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/reflection/ElementCollectionConverterTest.java @@ -24,7 +24,7 @@ public class ElementCollectionConverterTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/reflection/element-collection-converter-orm.xml" }; } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/Ejb3XmlTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/Ejb3XmlTest.java index 137cd22b7d..39244f7a89 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/Ejb3XmlTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/Ejb3XmlTest.java @@ -130,7 +130,7 @@ public class Ejb3XmlTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/xml/ejb3/orm.xml", "org/hibernate/test/annotations/xml/ejb3/orm2.xml", diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/OrmVersion1SupportedTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/OrmVersion1SupportedTest.java index 03658267dd..dc3f2b4d1f 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/OrmVersion1SupportedTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/ejb3/OrmVersion1SupportedTest.java @@ -54,7 +54,7 @@ public class OrmVersion1SupportedTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/xml/ejb3/orm2.xml" }; } } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/HbmTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/HbmTest.java index faa9280387..d3642ff7ce 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/HbmTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/HbmTest.java @@ -80,7 +80,7 @@ public class HbmTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[]{ "org/hibernate/test/annotations/xml/hbm/Government.hbm.xml", "org/hibernate/test/annotations/xml/hbm/CloudType.hbm.xml", diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/HbmWithIdentityTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/HbmWithIdentityTest.java index 8641468247..1b3b9025ef 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/HbmWithIdentityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/xml/hbm/HbmWithIdentityTest.java @@ -42,7 +42,7 @@ public class HbmWithIdentityTest extends BaseCoreFunctionalTestCase { } @Override - protected String[] getXmlFiles() { + protected String[] getOrmXmlFiles() { return new String[] { "org/hibernate/test/annotations/xml/hbm/A.hbm.xml", "org/hibernate/test/annotations/xml/hbm/B.hbm.xml", diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/AuditMetadataGenerator.java b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/AuditMetadataGenerator.java index 89d69df8ad..82ee68f5eb 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/AuditMetadataGenerator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/configuration/internal/metadata/AuditMetadataGenerator.java @@ -633,7 +633,7 @@ public final class AuditMetadataGenerator { // Adding the "key" element with all id columns... final Element keyMapping = mappingData.getFirst().addElement( "key" ); - MetadataTools.addColumns( keyMapping, pc.getTable().getPrimaryKey().columnIterator(), metadata ); + MetadataTools.addColumns( keyMapping, pc.getTable().getPrimaryKey().getColumnIterator(), metadata ); // ... and the revision number column, read from the revision info relation mapping. keyMapping.add( (Element) cloneAndSetupRevisionInfoRelationMapping().element( "column" ).clone() ); diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java b/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java index 63853abe21..915698bb08 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java @@ -204,7 +204,7 @@ public abstract class BaseCoreFunctionalTestCase extends BaseUnitTestCase { configuration.addPackage( annotatedPackage ); } } - String[] xmlFiles = getXmlFiles(); + String[] xmlFiles = getOrmXmlFiles(); if ( xmlFiles != null ) { for ( String xmlFile : xmlFiles ) { try ( InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream( xmlFile ) ) { @@ -237,8 +237,7 @@ public abstract class BaseCoreFunctionalTestCase extends BaseUnitTestCase { return NO_MAPPINGS; } - protected String[] getXmlFiles() { - // todo : rename to getOrmXmlFiles() + protected String[] getOrmXmlFiles() { return NO_MAPPINGS; }