net.csdn.jpa.model
Class JPABase

java.lang.Object
  extended by net.csdn.jpa.model.JPABase
All Implemented Interfaces:
GenericModel
Direct Known Subclasses:
Model

public class JPABase
extends Object
implements GenericModel

BlogInfo: WilliamZhu Date: 12-6-26 Time: 下午9:53


Field Summary
protected  net.csdn.common.logging.CSLogger logger
           
static MysqlClient mysqlClient
           
static List validateParses
           
 List<ValidateResult> validateResults
           
 
Constructor Summary
JPABase()
           
 
Method Summary
 Association associate(String obj)
           
<T> T
attr(String fieldName, Class<T> clzz)
           
 JPABase attr(String fieldName, Object value)
           
 void delete()
           
 javax.persistence.EntityManager em()
           
static
<T> T
findService(Class<T> clz)
           
static JPAConfig getJPAConfig()
           
static JPAContext getJPAContext()
           
 Integer id()
           
 Object key()
           
<T extends JPABase>
T
m(String methodName, Object... objs)
           
 boolean merge(Map params)
           
 boolean refresh()
           
 boolean save()
           
 boolean save(boolean validate)
           
 boolean update()
           
 boolean valid()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected net.csdn.common.logging.CSLogger logger

validateParses

public static final List validateParses

mysqlClient

public static final MysqlClient mysqlClient

validateResults

public final List<ValidateResult> validateResults
Constructor Detail

JPABase

public JPABase()
Method Detail

getJPAContext

public static JPAContext getJPAContext()

findService

public static <T> T findService(Class<T> clz)

id

public Integer id()

getJPAConfig

public static JPAConfig getJPAConfig()

attr

public <T> T attr(String fieldName,
                  Class<T> clzz)

attr

public JPABase attr(String fieldName,
                    Object value)

m

public <T extends JPABase> T m(String methodName,
                               Object... objs)

associate

public Association associate(String obj)

save

public boolean save()
Specified by:
save in interface GenericModel

save

public boolean save(boolean validate)

valid

public boolean valid()

em

public javax.persistence.EntityManager em()

refresh

public boolean refresh()
Specified by:
refresh in interface GenericModel

delete

public void delete()
Specified by:
delete in interface GenericModel

update

public boolean update()
Specified by:
update in interface GenericModel

merge

public boolean merge(Map params)

key

public Object key()
Specified by:
key in interface GenericModel


Copyright © 2014. All Rights Reserved.