001    /*****************************************************************************
002     * Copyright (c) PicoContainer Organization. All rights reserved.            *
003     * ------------------------------------------------------------------------- *
004     * The software in this package is published under the terms of the BSD      *
005     * style license a copy of which has been included with this distribution in *
006     * the license.html file.                                                    *
007     *                                                                           *
008     * Idea by Rachel Davies, Original code by Aslak Hellesoy and Paul Hammant   *
009     *****************************************************************************/
010    
011    package org.nanocontainer.persistence.hibernate;
012    
013    import java.io.File;
014    import java.net.URL;
015    
016    import org.hibernate.HibernateException;
017    import org.hibernate.cfg.Configuration;
018    import org.w3c.dom.Document;
019    
020    /**
021     * Constructable Hibernate configuration. Just a wrapper around various
022     * configure() methods. See respective {@link org.hibernate.cfg.Configuration configure methods}.
023     * 
024     * @author Jose Peleteiro <juzepeleteiro@intelli.biz>
025     * @version $Revision: 2043 $
026     * @see org.hibernate.cfg.Configuration
027     */
028    public class ConstructableConfiguration extends Configuration {
029    
030        public ConstructableConfiguration() throws HibernateException {
031            this.configure();
032        }
033    
034        public ConstructableConfiguration(URL url) throws HibernateException {
035            this.configure(url);
036        }
037    
038        public ConstructableConfiguration(String resource) throws HibernateException {
039            this.configure(resource);
040        }
041    
042        public ConstructableConfiguration(File configFile) throws HibernateException {
043            this.configure(configFile);
044        }
045    
046        public ConstructableConfiguration(Document document) throws HibernateException {
047            this.configure(document);
048        }
049    
050    }