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 package org.nanocontainer.persistence.hibernate.classic;
011
012 import net.sf.hibernate.cfg.Configuration;
013 import net.sf.hibernate.HibernateException;
014
015 import java.net.URL;
016 import java.io.File;
017 import org.w3c.dom.Document;
018
019 /**
020 * Constructable Hibernate configuration. Just a wrapper around various
021 * configure() methods. See respective {@link net.sf.hibernate.cfg.Configuration configure methods}.
022 *
023 * @author Konstantin Pribluda
024 * @version $Revision: 2043 $
025 * @see net.sf.hibernate.cfg.Configuration
026 */
027 public class ConstructableConfiguration extends Configuration {
028
029 public ConstructableConfiguration() throws HibernateException {
030 configure();
031 }
032
033 public ConstructableConfiguration(URL url) throws HibernateException {
034 configure(url);
035 }
036 public ConstructableConfiguration(String resource) throws HibernateException {
037 configure(resource);
038 }
039
040 public ConstructableConfiguration(File configFile) throws HibernateException {
041 configure(configFile);
042 }
043
044
045 public ConstructableConfiguration(Document document) throws HibernateException {
046 configure(document);
047 }
048 }