package com.evolute.siprp.server.logic.recover_pwd;

import com.evolute.siprp.server.db.InitDB;
import com.evolute.utils.Singleton;
import com.evolute.utils.db.DBManager;
import com.evolute.utils.db.Executer;
import com.evolute.utils.jdo.JDOProvider;

public class RecoverDataProvider 
{
	private static RecoverDataProvider instance = null;
	
	private final Executer EXECUTER;
	private final JDOProvider JDO_PROVIDER;
	
	
	private RecoverDataProvider() throws Exception
	{
		System.out.println( "-- InitDB.init()" );
		InitDB.init();
		
		DBManager dbm = ( DBManager ) Singleton.getInstance( Singleton.DEFAULT_DBMANAGER );
		EXECUTER = dbm.getSharedExecuter( this );
		JDO_PROVIDER = ( JDOProvider ) Singleton.getInstance( Singleton.DEFAULT_JDO_PROVIDER );
	}
	
	
	public static RecoverDataProvider getProvider() throws Exception
	{
		if ( instance == null )
		{
			instance = new RecoverDataProvider();
		}
		return instance;
	}
	
	
}
