All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.baltoro.service.DaoFactory Maven / Gradle / Ivy

package io.baltoro.service;

public final class DaoFactory
{
	
	static Dao getInstance()
	{
		return new DaoImpl();
	}
	
	public static  T get(Class _class)
	{
		Object service = null;
		try
		{
			Class clazz = Class.forName(_class.getName()+"Impl");
			service = clazz.newInstance();
		} 
		catch (Exception e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return _class.cast(service);
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy