HHH-6133 Formatting and applying missing licence header

This commit is contained in:
Hardy Ferentschik 2011-05-12 11:07:10 +02:00
parent 0e20d34cd8
commit 095e858f77
38 changed files with 372 additions and 93 deletions

View File

@ -23,6 +23,7 @@
*/
package org.hibernate.metamodel.source.annotations.xml.filter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@ -40,13 +41,10 @@ abstract class AbstractAnnotationFilter implements IndexedAnnotationFilter {
protected static final DotName[] EMPTY_DOTNAME_ARRAY = new DotName[0];
private Set<DotName> candidates;
private boolean match(DotName annName) {
if ( candidates == null ) {
candidates = new HashSet<DotName>();
for ( DotName name : targetAnnotation() ) {
candidates.add( name );
}
candidates.addAll( Arrays.asList( targetAnnotation() ) );
}
return candidates.contains( annName );
}

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.filter;
import java.util.List;
@ -32,5 +55,4 @@ protected DotName[] targetAnnotation() {
ENTITY_LISTENERS
};
}
}

View File

@ -89,9 +89,6 @@ protected DotName[] targetAnnotation() {
MAP_KEY_CLASS,
MAP_KEY_COLUMN,
MAP_KEY_ENUMERATED
};
}
}

View File

@ -52,6 +52,7 @@ abstract class AbstractEntityObjectMocker extends AnnotationMocker {
AbstractEntityObjectMocker(IndexBuilder indexBuilder, EntityMappingsMocker.Default defaults) {
super( indexBuilder, defaults );
}
private boolean isPreProcessCalled = false;
final void preProcess() {
@ -177,6 +178,4 @@ protected DotName getTargetName() {
protected AnnotationTarget getTarget() {
return classInfo;
}
}

View File

@ -51,6 +51,8 @@
import org.hibernate.metamodel.source.annotations.JPADotNames;
/**
* Base class for the mock jandex annotations created from orm.xml.
*
* @author Strong Liu
*/
abstract class AbstractMocker implements JPADotNames {
@ -60,7 +62,6 @@ abstract class AbstractMocker implements JPADotNames {
this.indexBuilder = indexBuilder;
}
abstract protected EntityMappingsMocker.Default getDefaults();
/**
@ -119,7 +120,6 @@ protected AnnotationInstance create(DotName name, AnnotationTarget target, Annot
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//@Column
protected AnnotationInstance parserColumn(XMLColumn column, AnnotationTarget target) {
@ -558,7 +558,6 @@ protected AnnotationInstance parserJoinColumn(XMLJoinColumn column, AnnotationTa
return create( JOIN_COLUMN, target, annotationValueList );
}
protected AnnotationInstance parserLob(XMLLob lob, AnnotationTarget target) {
if ( lob == null ) {
return null;

View File

@ -27,10 +27,8 @@
* @author Strong Liu
*/
abstract class AnnotationMocker extends AbstractMocker {
private EntityMappingsMocker.Default defaults;
AnnotationMocker(IndexBuilder indexBuilder, EntityMappingsMocker.Default defaults) {
super( indexBuilder );
this.defaults = defaults;

View File

@ -106,6 +106,4 @@ List<XMLOneToOne> getOneToOne() {
XMLEmbeddedId getEmbeddedId() {
return attributes.getEmbeddedId();
}
}

View File

@ -66,9 +66,9 @@ protected void processExtra() {
protected XMLAccessType getAccessType() {
return basic.getAccess();
}
@Override
protected void setAccessType(XMLAccessType accessType) {
basic.setAccess( accessType );
}
}

View File

@ -71,8 +71,6 @@ protected void processExtra() {
parserMapKeyClass( elementCollection.getMapKeyClass(), getTarget() );
parserMapKeyEnumerated( elementCollection.getMapKeyEnumerated(), getTarget() );
parserMapKeyTemporal( elementCollection.getMapKeyTemporal(), getTarget() );
}
@Override
@ -84,6 +82,7 @@ protected String getFieldName() {
protected XMLAccessType getAccessType() {
return elementCollection.getAccess();
}
@Override
protected void setAccessType(XMLAccessType accessType) {
elementCollection.setAccess( accessType );

View File

@ -107,6 +107,4 @@ List<XMLOneToOne> getOneToOne() {
XMLEmbeddedId getEmbeddedId() {
return null;
}
}

View File

@ -41,6 +41,7 @@
/**
* Mock <embeddable> to {@link javax.persistence.Embeddable @Embeddable}
*
* @author Strong Liu
*/
class EmbeddableMocker extends AbstractEntityObjectMocker {
@ -78,7 +79,6 @@ protected void applyDefaults() {
embeddable.setMetadataComplete( getDefaults().getMetadataComplete() );
}
LOG.debugf( "Adding XML overriding information for %s", className );
}
@Override

View File

@ -53,6 +53,7 @@ protected void processExtra() {
protected XMLAccessType getAccessType() {
return embeddedId.getAccess();
}
@Override
protected void setAccessType(XMLAccessType accessType) {
embeddedId.setAccess( accessType );

View File

@ -251,9 +251,5 @@ void override(Default globalDefault) {
}
}
}
}
}

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import java.util.ArrayList;
@ -30,8 +53,6 @@
import org.hibernate.metamodel.source.annotation.xml.XMLPreUpdate;
import org.hibernate.metamodel.source.annotation.xml.XMLSecondaryTable;
import org.hibernate.metamodel.source.annotation.xml.XMLTable;
import org.hibernate.metamodel.source.annotations.util.JandexHelper;
/**
* Mock <entity> to {@link javax.persistence.Entity @Entity}
@ -313,6 +334,4 @@ protected AnnotationValue[] nestedSecondaryTableList(String name, List<XMLSecond
return MockHelper.EMPTY_ANNOTATION_VALUE_ARRAY;
}
}

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import java.util.ArrayList;
@ -118,7 +141,6 @@ public void filterIndexedAnnotations() {
for ( AnnotationInstance annotationInstance : indexedAnnotationInstanceList ) {
pushIfNotExist( annotationInstance );
}
}
private void pushIfNotExist(AnnotationInstance annotationInstance) {
@ -142,7 +164,6 @@ private void pushIfNotExist(AnnotationInstance annotationInstance) {
if ( isNotExist ) {
push( annName, annotationInstance );
}
}
void collectGlobalMappings(XMLEntityMappings entityMappings, EntityMappingsMocker.Default defaults) {
@ -225,6 +246,4 @@ private static XMLTableGenerator overrideGenerator(XMLTableGenerator generator,
}
return generator;
}
}

View File

@ -46,6 +46,7 @@
/**
* note: Global Configurations {@link org.hibernate.metamodel.source.annotations.xml.filter.IndexedAnnotationFilter.GLOBAL_ANNOTATIONS}
* in the new build Index has no target
*
* @author Strong Liu
*/
class GlobalConfigurationMocker extends AbstractMocker {
@ -165,7 +166,9 @@ private void nestedEntityResultList(String name, List<XMLEntityResult> entityRes
"", annotationInstance
);
}
MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) );
MockHelper.addToCollectionIfNotNull(
annotationValueList, AnnotationValue.createArrayValue( name, values )
);
}
}
@ -183,7 +186,9 @@ private void nestedColumnResultList(String name, List<XMLColumnResult> columnRes
"", annotationInstance
);
}
MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) );
MockHelper.addToCollectionIfNotNull(
annotationValueList, AnnotationValue.createArrayValue( name, values )
);
}
}
@ -205,7 +210,9 @@ private void nestedFieldResultList(String name, List<XMLFieldResult> fieldResult
"", annotationInstance
);
}
MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) );
MockHelper.addToCollectionIfNotNull(
annotationValueList, AnnotationValue.createArrayValue( name, values )
);
}
}
@ -290,7 +297,9 @@ private void nestedQueryHintList(String name, List<XMLQueryHint> constraints, Li
"", annotationInstance
);
}
MockHelper.addToCollectionIfNotNull( annotationValueList, AnnotationValue.createArrayValue( name, values ) );
MockHelper.addToCollectionIfNotNull(
annotationValueList, AnnotationValue.createArrayValue( name, values )
);
}
}

View File

@ -25,17 +25,12 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.AnnotationTarget;
import org.jboss.jandex.AnnotationValue;
import org.jboss.jandex.ClassInfo;
import org.jboss.jandex.DotName;
import org.jboss.jandex.MethodInfo;
import org.hibernate.AnnotationException;
import org.hibernate.HibernateException;
import org.hibernate.metamodel.source.annotation.xml.XMLAccessType;
import org.hibernate.metamodel.source.annotation.xml.XMLGeneratedValue;
import org.hibernate.metamodel.source.annotation.xml.XMLId;
@ -86,6 +81,4 @@ protected XMLAccessType getAccessType() {
protected void setAccessType(XMLAccessType accessType) {
id.setAccess( accessType );
}
}

View File

@ -157,6 +157,7 @@ public Map<DotName, List<AnnotationInstance>> getClassInfoAnnotationsMap(DotName
public ClassInfo getClassInfo(DotName name) {
return classes.get( name );
}
public ClassInfo getIndexedClassInfo(DotName name) {
return index.getClassByName( name );
}
@ -303,6 +304,4 @@ private void mergeAnnotationMap(Map<DotName, List<AnnotationInstance>> source, M
}
}
}
}

View File

@ -76,6 +76,7 @@ protected void processExtra() {
protected XMLAccessType getAccessType() {
return manyToMany.getAccess();
}
@Override
protected void setAccessType(XMLAccessType accessType) {
manyToMany.setAccess( accessType );

View File

@ -72,9 +72,9 @@ protected void processExtra() {
protected XMLAccessType getAccessType() {
return manyToOne.getAccess();
}
@Override
protected void setAccessType(XMLAccessType accessType) {
manyToOne.setAccess( accessType );
}
}

View File

@ -41,6 +41,7 @@
/**
* Mock <mapped-superclass> to {@link javax.persistence.MappedSuperclass @MappedSuperClass}
*
* @author Strong Liu
*/
class MappedSuperclassMocker extends AbstractEntityObjectMocker {
@ -54,6 +55,7 @@ class MappedSuperclassMocker extends AbstractEntityObjectMocker {
super( indexBuilder, defaults );
this.mappedSuperclass = mappedSuperclass;
}
@Override
protected void applyDefaults() {
String className = MockHelper.buildSafeClassName( mappedSuperclass.getClazz(), getDefaults().getPackageName() );
@ -142,6 +144,4 @@ protected XMLPostRemove getPostRemove() {
protected XMLPostLoad getPostLoad() {
return mappedSuperclass.getPostLoad();
}
}

View File

@ -78,6 +78,7 @@ protected void processExtra() {
protected XMLAccessType getAccessType() {
return oneToMany.getAccess();
}
@Override
protected void setAccessType(XMLAccessType accessType) {
oneToMany.setAccess( accessType );

View File

@ -76,6 +76,7 @@ protected void processExtra() {
protected XMLAccessType getAccessType() {
return oneToOne.getAccess();
}
@Override
protected void setAccessType(XMLAccessType accessType) {
oneToOne.setAccess( accessType );

View File

@ -53,6 +53,7 @@ protected String getFieldName() {
protected XMLAccessType getAccessType() {
return XMLAccessType.FIELD;
}
@Override
protected void setAccessType(XMLAccessType accessType) {
//ignore

View File

@ -55,10 +55,9 @@ protected void processExtra() {
protected XMLAccessType getAccessType() {
return version.getAccess();
}
@Override
protected void setAccessType(XMLAccessType accessType) {
version.setAccess( accessType );
}
}

View File

@ -50,5 +50,4 @@ AnnotationValue getJoinTableAnnotationValue() {
void setJoinTableAnnotationValue(AnnotationValue joinTableAnnotationValue) {
this.joinTableAnnotationValue = joinTableAnnotationValue;
}
}

View File

@ -0,0 +1,28 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011 by Red Hat Inc and/or its affiliates or by
* third-party contributors as indicated by either @author tags or express
* copyright attribution statements applied by the authors. All
* third-party contributions are distributed under license by Red Hat Inc.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
/**
* Mocker classes to create mock JPA annotations from orm.xml
*/

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import java.io.IOException;

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import java.util.ArrayList;

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import org.jboss.jandex.AnnotationInstance;

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import java.util.ArrayList;

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import org.jboss.jandex.ClassInfo;

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
/**

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
/**

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import java.util.List;
@ -31,7 +54,6 @@ protected Class[] getAnnotatedClasses() {
};
}
@Test
public void testPersistenceUnitMetadataMetadataComplete() {
XMLEntity author = new XMLEntity();
@ -60,6 +82,7 @@ public void testEntityMetadataComplete() {
DotName bookName = DotName.createSimple( Book.class.getName() );
assertHasAnnotation( index, bookName, JPADotNames.ENTITY );
}
@Test
public void testOverrideToMappedSuperClass() {
Index index = getMockedIndex( "override-to-mappedsuperclass.xml" );
@ -226,6 +249,4 @@ public void testSchemaInEntityMapping() {
assertEquals( 0, annotationInstanceList.size() );
}
}

View File

@ -1,3 +1,26 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Inc..
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate.metamodel.source.annotations.xml.mocker;
import javax.persistence.Embeddable;