package siprp.database.cayenne.providers;

import org.apache.cayenne.CayenneContext;
import org.apache.cayenne.access.DataContext;
import org.apache.cayenne.access.QueryLogger;
import org.apache.cayenne.conf.Configuration;
import org.apache.cayenne.conf.DefaultConfiguration;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.impl.SimpleLog;

import common.log.SimpleLogger;

public class MainDAO
{
	protected static DataContext context = null;
	
	public MainDAO()
	{
		if( context == null )
		{
//			DefaultConfiguration conf = new DefaultConfiguration();
//			conf.addClassPath("");
//			conf.getDomain().getProperties();
//			Configuration.initializeSharedConfiguration();
//			Configuration.getSharedConfiguration().getDomain().getNode( "SIPRPNode" ).getDataSource();
			context = DataContext.createDataContext();
		}
	}
}
