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

com.j256.ormlite.table.ObjectFactory Maven / Gradle / Ivy

Go to download

Lightweight Object Relational Model (ORM) for persisting objects to SQL databases.

There is a newer version: 6.1
Show newest version
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;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy