diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/MockedNames.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/PseudoJpaDotNames.java similarity index 98% rename from hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/MockedNames.java rename to hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/PseudoJpaDotNames.java index f7f017b068..9eb0b49b42 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/MockedNames.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/PseudoJpaDotNames.java @@ -28,7 +28,7 @@ import org.jboss.jandex.DotName; /** * @author Strong Liu */ -public interface MockedNames { +public interface PseudoJpaDotNames { public static final DotName DEFAULT_ACCESS = DotName.createSimple( "default.access" ); public static final DotName DEFAULT_DELIMITED_IDENTIFIERS = DotName.createSimple( "default.delimited.identifiers" ); public static final DotName DEFAULT_ENTITY_LISTENERS = DotName.createSimple( "default.entity.listeners" ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/mocker/PersistenceMetadataMocker.java b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/mocker/PersistenceMetadataMocker.java index 195d39e9d6..1abf3ef827 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/mocker/PersistenceMetadataMocker.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/xml/mocker/PersistenceMetadataMocker.java @@ -10,7 +10,7 @@ import org.jboss.jandex.ClassInfo; import org.jboss.jandex.DotName; import org.hibernate.metamodel.source.annotation.xml.XMLPersistenceUnitDefaults; -import org.hibernate.metamodel.source.annotations.xml.MockedNames; +import org.hibernate.metamodel.source.annotations.xml.PseudoJpaDotNames; /** * @author Strong Liu @@ -21,16 +21,16 @@ class PersistenceMetadataMocker extends AbstractMocker { private static Map nameDotNameMap = new HashMap(); static { - nameDotNameMap.put( ACCESS, MockedNames.DEFAULT_ACCESS ); - nameDotNameMap.put( ENTITY_LISTENERS, MockedNames.DEFAULT_ENTITY_LISTENERS ); - nameDotNameMap.put( POST_LOAD, MockedNames.DEFAULT_POST_LOAD ); - nameDotNameMap.put( POST_REMOVE, MockedNames.DEFAULT_POST_REMOVE ); - nameDotNameMap.put( POST_UPDATE, MockedNames.DEFAULT_POST_UPDATE ); - nameDotNameMap.put( POST_PERSIST, MockedNames.DEFAULT_POST_PERSIST ); - nameDotNameMap.put( PRE_REMOVE, MockedNames.DEFAULT_PRE_REMOVE ); - nameDotNameMap.put( PRE_UPDATE, MockedNames.DEFAULT_PRE_UPDATE ); - nameDotNameMap.put( PRE_PERSIST, MockedNames.DEFAULT_PRE_PERSIST ); - nameDotNameMap.put( MockedNames.DEFAULT_DELIMITED_IDENTIFIERS, MockedNames.DEFAULT_DELIMITED_IDENTIFIERS ); + nameDotNameMap.put( ACCESS, PseudoJpaDotNames.DEFAULT_ACCESS ); + nameDotNameMap.put( ENTITY_LISTENERS, PseudoJpaDotNames.DEFAULT_ENTITY_LISTENERS ); + nameDotNameMap.put( POST_LOAD, PseudoJpaDotNames.DEFAULT_POST_LOAD ); + nameDotNameMap.put( POST_REMOVE, PseudoJpaDotNames.DEFAULT_POST_REMOVE ); + nameDotNameMap.put( POST_UPDATE, PseudoJpaDotNames.DEFAULT_POST_UPDATE ); + nameDotNameMap.put( POST_PERSIST, PseudoJpaDotNames.DEFAULT_POST_PERSIST ); + nameDotNameMap.put( PRE_REMOVE, PseudoJpaDotNames.DEFAULT_PRE_REMOVE ); + nameDotNameMap.put( PRE_UPDATE, PseudoJpaDotNames.DEFAULT_PRE_UPDATE ); + nameDotNameMap.put( PRE_PERSIST, PseudoJpaDotNames.DEFAULT_PRE_PERSIST ); + nameDotNameMap.put( PseudoJpaDotNames.DEFAULT_DELIMITED_IDENTIFIERS, PseudoJpaDotNames.DEFAULT_DELIMITED_IDENTIFIERS ); } PersistenceMetadataMocker(IndexBuilder indexBuilder, XMLPersistenceUnitDefaults persistenceUnitDefaults) { @@ -51,7 +51,7 @@ class PersistenceMetadataMocker extends AbstractMocker { final void process() { parserAccessType( persistenceUnitDefaults.getAccess(), null ); if ( persistenceUnitDefaults.getDelimitedIdentifiers() != null ) { - create( MockedNames.DEFAULT_DELIMITED_IDENTIFIERS, null ); + create( PseudoJpaDotNames.DEFAULT_DELIMITED_IDENTIFIERS, null ); } if ( persistenceUnitDefaults.getEntityListeners() != null ) { new DefaultListenerMocker( indexBuilder, null ).parser( persistenceUnitDefaults.getEntityListeners() ); diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/xml/mocker/PersistenceMetadataMockerTest.java b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/xml/mocker/PersistenceMetadataMockerTest.java index 929d4d4c6c..26b966f801 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/xml/mocker/PersistenceMetadataMockerTest.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/xml/mocker/PersistenceMetadataMockerTest.java @@ -30,7 +30,7 @@ import org.jboss.jandex.Index; import org.junit.Test; import static org.junit.Assert.*; -import org.hibernate.metamodel.source.annotations.xml.MockedNames; +import org.hibernate.metamodel.source.annotations.xml.PseudoJpaDotNames; /** * @author Strong Liu @@ -39,8 +39,8 @@ public class PersistenceMetadataMockerTest extends AbstractMockerTest { @Test public void testPersistenceMetadata() { Index index = getMockedIndex( "persistence-metadata.xml" ); - assertHasAnnotation( index, null, MockedNames.DEFAULT_ACCESS, 1 ); - assertAnnotationValue(index,null,MockedNames.DEFAULT_ACCESS,new AnnotationValueChecker(){ + assertHasAnnotation( index, null, PseudoJpaDotNames.DEFAULT_ACCESS, 1 ); + assertAnnotationValue(index,null, PseudoJpaDotNames.DEFAULT_ACCESS,new AnnotationValueChecker(){ @Override public void check(AnnotationInstance annotationInstance) { assertEquals( AccessType.FIELD.toString(), annotationInstance.value().asEnum());