com.jpattern.orm
Class JPOrm

java.lang.Object
  extended by com.jpattern.orm.JPOrm
All Implemented Interfaces:
JPO
Direct Known Subclasses:
JPOrmDataSource

public class JPOrm
extends Object
implements JPO

Author:
Francesco Cina' 26/ago/2011

Constructor Summary
JPOrm(SessionProvider sessionProvider)
          Create a new instance of JPOrm.
 
Method Summary
 void destory()
          Destroy the current IJPOrm instance and all it's references.
 SessionProvider getSessionProvider()
           
 TypeFactory getTypeFactory()
           
<BEAN> void
register(Class<BEAN> clazz)
          Register a new class to be managed as a bean.
 void register(ExtendedTypeWrapper<?,?> typeWrapper)
          Register a new TypeWrapper.
 void register(List<Class<?>> classes)
          Register a list of classes to be managed as a beans.
 Session session()
          Return a session from the current IJPOrm implementation
 void setValidator(Validator validator)
          Set the default validator to be used to validate beans before update and save actions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPOrm

public JPOrm(SessionProvider sessionProvider)
Create a new instance of JPOrm.

Parameters:
sessionProvider -
Method Detail

session

public final Session session()
Description copied from interface: JPO
Return a session from the current IJPOrm implementation

Specified by:
session in interface JPO
Returns:

register

public <BEAN> void register(Class<BEAN> clazz)
              throws OrmConfigurationException
Description copied from interface: JPO
Register a new class to be managed as a bean.

Specified by:
register in interface JPO
Throws:
OrmConfigurationException

destory

public void destory()
Description copied from interface: JPO
Destroy the current IJPOrm instance and all it's references.

Specified by:
destory in interface JPO

register

public void register(List<Class<?>> classes)
              throws OrmConfigurationException
Description copied from interface: JPO
Register a list of classes to be managed as a beans.

Specified by:
register in interface JPO
Throws:
OrmConfigurationException

getSessionProvider

public SessionProvider getSessionProvider()

register

public void register(ExtendedTypeWrapper<?,?> typeWrapper)
              throws OrmConfigurationException
Description copied from interface: JPO
Register a new TypeWrapper. If a TypeWrapper wraps a Class that is already mapped, the last registered TypeWrapper will be used.

Specified by:
register in interface JPO
Throws:
OrmConfigurationException

setValidator

public void setValidator(Validator validator)
Description copied from interface: JPO
Set the default validator to be used to validate beans before update and save actions

Specified by:
setValidator in interface JPO

getTypeFactory

public TypeFactory getTypeFactory()


Copyright © 2013. All Rights Reserved.