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

com.jpattern.orm.JPO Maven / Gradle / Ivy

There is a newer version: 3.5.1
Show newest version
package com.jpattern.orm;

import java.util.List;

import com.jpattern.orm.exception.OrmConfigurationException;
import com.jpattern.orm.exception.OrmException;
import com.jpattern.orm.generator.wrapper.TypeWrapper;
import com.jpattern.orm.session.Session;

/**
 * 
 * @author Francesco Cina
 *
 * 21/mag/2011
 */
public interface JPO {

	/**
	 * Return a session from the current IJPOrm implementation
	 * @return
	 */
	Session session() throws OrmException;

	/**
	 * Destroy the current IJPOrm instance and all it's references.
	 * After the execution of this method it will be not possible to call it through the
	 * static method JOPOrm.get(String jpOrmName)
	 */
	void destory();

	/**
	 * Register a new class to be managed as a bean.
	 * 
	 * @param 
	 * @param clazz
	 * @throws OrmConfigurationException
	 */
	 void register(Class clazz) throws OrmConfigurationException;

	/**
	 * Register a list of classes to be managed as a beans.
	 * 
	 * @param 
	 * @param clazz
	 * @throws OrmConfigurationException
	 */
	void register(List> classes) throws OrmConfigurationException;

	/**
	 * Register a new TypeWrapper.
	 * If a TypeWrapper wraps a Class that is already mapped, the last registered TypeWrapper will be used.
	 * 
	 * @param typeWrapper
	 * @throws OrmConfigurationException
	 */
	void register(TypeWrapper typeWrapper) throws OrmConfigurationException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy