
de.tsl2.nano.serialization.FileBeanContainerx Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.directaccess Show documentation
Show all versions of tsl2.nano.directaccess Show documentation
TSL2 JEE Direct Access (local JPA through GenericLocalBeanContainer, GenericLocalServiceBean, GenericEntityManager, ScriptTool, Replication)
/*
* File: $HeadURL$
* Id : $Id$
*
* created by: Thomas Schneider, Thomas Schneider
* created on: Mar 25, 2011
*
* Copyright: (c) Thomas Schneider 2011, all rights reserved
*/
package de.tsl2.nano.serialization;
import java.util.HashMap;
import java.util.Map;
import de.tsl2.nano.bean.BeanContainer;
import de.tsl2.nano.persistence.GenericBeanContainer;
import de.tsl2.nano.persistence.GenericLocalServiceBean;
import de.tsl2.nano.service.util.IGenericService;
/**
* see {@link GenericLocalServiceBean}.
*
* initializes the {@link BeanContainer} singelton, to use a hibernate session.
*
* @author Thomas Schneider, Thomas Schneider
* @version $Revision$
*/
@SuppressWarnings({"rawtypes"})
public class FileBeanContainer extends GenericBeanContainer {
protected Map properties = new HashMap();
protected IGenericService service;
/**
* initializes the standard bean container to use GenericService methods. it creates an own servicefactory using the
* given classloader
*
* @param classloader loader to be used inside the own servicefactory instance.
*/
public static void initFileContainer(ClassLoader classloader) {
initContainer(new FileBeanContainer(), classloader);
}
protected IGenericService getGenService() {
if (service == null) {
service = new FileServiceBean();
}
return service;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy