com.j256.ormlite.table.ObjectFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ormlite-core Show documentation
Show all versions of ormlite-core Show documentation
Lightweight Object Relational Model (ORM) for persisting objects to SQL databases.
package com.j256.ormlite.table;
import java.lang.reflect.Constructor;
import java.sql.SQLException;
import com.j256.ormlite.dao.Dao;
/**
* Interface that allows you to inject a factory class that creates objects of this class. You set it on the DAO using:
* {@link Dao#setObjectFactory(ObjectFactory)}.
*
* @author graywatson
*/
public interface ObjectFactory {
/**
* Construct and return an object of a certain class.
*
* @throws SQLException
* if there was a problem creating the object.
*/
public T createObject(Constructor construcor, Class dataClass) throws SQLException;
}