Author: epbernard
Date: 2008-03-03 23:17:10 -0500 (Mon, 03 Mar 2008)
New Revision: 14387
Modified:
annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java
Log:
ANN-690 allow chaining invoke in AnnotationConfiguration
Modified: annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java
===================================================================
--- annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java 2008-03-04
03:52:43 UTC (rev 14386)
+++ annotations/trunk/src/java/org/hibernate/cfg/AnnotationConfiguration.java 2008-03-04
04:17:10 UTC (rev 14387)
@@ -20,6 +20,7 @@
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeSet;
+import java.net.URL;
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
@@ -35,6 +36,7 @@
import org.hibernate.HibernateException;
import org.hibernate.MappingException;
import org.hibernate.SessionFactory;
+import org.hibernate.Interceptor;
import org.hibernate.annotations.AnyMetaDef;
import org.hibernate.annotations.common.reflection.ReflectionManager;
import org.hibernate.annotations.common.reflection.XClass;
@@ -711,7 +713,7 @@
}
@Override
- public Configuration addInputStream(InputStream xmlInputStream) throws MappingException
{
+ public AnnotationConfiguration addInputStream(InputStream xmlInputStream) throws
MappingException {
try {
List errors = new ArrayList();
SAXReader saxReader = xmlHelper.createSAXReader( "XML InputStream", errors,
getEntityResolver() );
@@ -828,7 +830,168 @@
return super.buildSessionFactory();
}
+ @Override
+ public AnnotationConfiguration addFile(String xmlFile) throws MappingException {
+ super.addFile( xmlFile );
+ return this;
+ }
+ @Override
+ public AnnotationConfiguration addFile(File xmlFile) throws MappingException {
+ super.addFile( xmlFile );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addCacheableFile(File xmlFile) throws MappingException {
+ super.addCacheableFile( xmlFile );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addCacheableFile(String xmlFile) throws MappingException
{
+ super.addCacheableFile( xmlFile );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addXML(String xml) throws MappingException {
+ super.addXML( xml );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addURL(URL url) throws MappingException {
+ super.addURL( url );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addResource(String resourceName, ClassLoader classLoader)
throws MappingException {
+ super.addResource( resourceName, classLoader );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addDocument(org.w3c.dom.Document doc) throws
MappingException {
+ super.addDocument( doc );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addResource(String resourceName) throws MappingException
{
+ super.addResource( resourceName );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addClass(Class persistentClass) throws MappingException
{
+ super.addClass( persistentClass );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addJar(File jar) throws MappingException {
+ super.addJar( jar );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addDirectory(File dir) throws MappingException {
+ super.addDirectory( dir );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration setInterceptor(Interceptor interceptor) {
+ super.setInterceptor( interceptor );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration setProperties(Properties properties) {
+ super.setProperties( properties );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration addProperties(Properties extraProperties) {
+ super.addProperties( extraProperties );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration mergeProperties(Properties properties) {
+ super.mergeProperties( properties );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration setProperty(String propertyName, String value) {
+ super.setProperty( propertyName, value );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration configure() throws HibernateException {
+ super.configure();
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration configure(String resource) throws HibernateException {
+ super.configure( resource );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration configure(URL url) throws HibernateException {
+ super.configure( url );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration configure(File configFile) throws HibernateException {
+ super.configure( configFile );
+ return this;
+ }
+
+ @Override
+ protected AnnotationConfiguration doConfigure(InputStream stream, String resourceName)
throws HibernateException {
+ super.doConfigure( stream, resourceName );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration configure(org.w3c.dom.Document document) throws
HibernateException {
+ super.configure( document );
+ return this;
+ }
+
+ @Override
+ protected AnnotationConfiguration doConfigure(Document doc) throws HibernateException {
+ super.doConfigure( doc );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration setCacheConcurrencyStrategy(String clazz, String
concurrencyStrategy) throws MappingException {
+ super.setCacheConcurrencyStrategy( clazz, concurrencyStrategy );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration setCollectionCacheConcurrencyStrategy(String
collectionRole, String concurrencyStrategy) throws MappingException {
+ super.setCollectionCacheConcurrencyStrategy( collectionRole, concurrencyStrategy );
+ return this;
+ }
+
+ @Override
+ public AnnotationConfiguration setNamingStrategy(NamingStrategy namingStrategy) {
+ super.setNamingStrategy( namingStrategy );
+ return this;
+ }
+
//not a public API
public ReflectionManager getReflectionManager() {
return reflectionManager;
Show replies by thread