|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectplay.db.jpa.JPABase
play.db.jpa.GenericModel
@MappedSuperclass public class GenericModel
A super class for JPA entities
| 嵌套类摘要 | |
|---|---|
static class |
GenericModel.JPAQuery
A JPAQuery |
| 从类 play.db.jpa.JPABase 继承的嵌套类/接口 |
|---|
JPABase.JPAQueryException |
| 从接口 play.db.Model 继承的嵌套类/接口 |
|---|
Model.BinaryField, Model.Choices, Model.Factory, Model.Manager, Model.Property |
| 字段摘要 |
|---|
| 从类 play.db.jpa.JPABase 继承的字段 |
|---|
willBeSaved |
| 构造方法摘要 | |
|---|---|
GenericModel()
|
|
| 方法摘要 | ||
|---|---|---|
void |
_saveAttachment()
|
|
void |
_setupAttachment()
|
|
static GenericModel.JPAQuery |
all()
Prepare a query to find *all* entities. |
|
static long |
count()
Count entities |
|
static long |
count(java.lang.String query,
java.lang.Object... params)
Count entities with a special query. |
|
boolean |
create()
store (ie insert) the entity. |
|
static
|
create(java.lang.Class<?> type,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.String[]> params,
java.lang.annotation.Annotation[] annotations)
已过时。 |
|
static
|
create(ParamNode rootParamNode,
java.lang.String name,
java.lang.Class<?> type,
java.lang.annotation.Annotation[] annotations)
|
|
static
|
create(java.lang.String name,
Scope.Params params)
|
|
|
delete()
Delete the entity. |
|
static int |
delete(java.lang.String query,
java.lang.Object... params)
Batch delete of entities |
|
static int |
deleteAll()
Delete all entities |
|
static
|
edit(java.lang.Object o,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.String[]> params,
java.lang.annotation.Annotation[] annotations)
已过时。 |
|
|
edit(ParamNode rootParamNode,
java.lang.String name)
|
|
static
|
edit(ParamNode rootParamNode,
java.lang.String name,
java.lang.Object o,
java.lang.annotation.Annotation[] annotations)
|
|
|
edit(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String[]> params)
已过时。 |
|
static GenericModel.JPAQuery |
find(java.lang.String query,
java.lang.Object... params)
Prepare a query to find entities. |
|
static
|
findAll()
Find all entities of this type |
|
static
|
findById(java.lang.Object id)
Find the entity with the corresponding id. |
|
|
merge()
Merge this object to obtain a managed entity (usefull when the object comes from the Cache). |
|
|
refresh()
Refresh the entity state. |
|
|
save()
store (ie insert) the entity. |
|
boolean |
validateAndCreate()
|
|
boolean |
validateAndSave()
|
|
| 从类 play.db.jpa.JPABase 继承的方法 |
|---|
_delete, _key, _save, em, equals, getEntityId, getJPAConfig, getJPAContext, hashCode, isPersistent, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public GenericModel()
| 方法详细信息 |
|---|
@Deprecated
public static <T extends JPABase> T create(java.lang.Class<?> type,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.String[]> params,
java.lang.annotation.Annotation[] annotations)
public static <T extends JPABase> T create(ParamNode rootParamNode,
java.lang.String name,
java.lang.Class<?> type,
java.lang.annotation.Annotation[] annotations)
@Deprecated
public static <T extends JPABase> T edit(java.lang.Object o,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.String[]> params,
java.lang.annotation.Annotation[] annotations)
public static <T extends JPABase> T edit(ParamNode rootParamNode,
java.lang.String name,
java.lang.Object o,
java.lang.annotation.Annotation[] annotations)
@Deprecated
public <T extends GenericModel> T edit(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String[]> params)
public <T extends GenericModel> T edit(ParamNode rootParamNode,
java.lang.String name)
public boolean validateAndSave()
public boolean validateAndCreate()
public <T extends JPABase> T save()
public boolean create()
public <T extends JPABase> T refresh()
public <T extends JPABase> T merge()
public <T extends JPABase> T delete()
public static <T extends JPABase> T create(java.lang.String name,
Scope.Params params)
public static long count()
public static long count(java.lang.String query,
java.lang.Object... params)
query - HQL query or shortcutparams - Params to bind to the query
public static <T extends JPABase> java.util.List<T> findAll()
public static <T extends JPABase> T findById(java.lang.Object id)
id - The entity id
public static GenericModel.JPAQuery find(java.lang.String query,
java.lang.Object... params)
query - HQL query or shortcutparams - Params to bind to the query
public static GenericModel.JPAQuery all()
public static int delete(java.lang.String query,
java.lang.Object... params)
query - HQL query or shortcutparams - Params to bind to the query
public static int deleteAll()
public void _setupAttachment()
public void _saveAttachment()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||