play.db.jpa
Class JPQL
java.lang.Object
play.db.jpa.JPQL
public class JPQL
- extends java.lang.Object
Constructor Summary |
JPQL()
|
Method Summary |
GenericModel.JPAQuery |
all(java.lang.String entity)
|
Query |
bindParameters(Query q,
java.util.Map<java.lang.String,java.lang.Object> params)
|
Query |
bindParameters(Query q,
java.lang.Object... params)
|
long |
count(java.lang.String entity)
|
long |
count(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
|
JPABase |
create(java.lang.String entity,
java.lang.String name,
Scope.Params params)
|
java.lang.String |
createCountQuery(java.lang.String entityName,
java.lang.String entityClass,
java.lang.String query,
java.lang.Object... params)
|
java.lang.String |
createDeleteQuery(java.lang.String entityName,
java.lang.String entityClass,
java.lang.String query,
java.lang.Object... params)
|
java.lang.String |
createFindByQuery(java.lang.String entityName,
java.lang.String entityClass,
java.lang.String query,
java.lang.Object... params)
|
int |
delete(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
|
int |
deleteAll(java.lang.String entity)
|
EntityManager |
em()
|
protected static java.lang.String |
extractProp(java.lang.String part,
java.lang.String end)
|
GenericModel.JPAQuery |
find(java.lang.String entity)
|
GenericModel.JPAQuery |
find(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
|
java.util.List |
findAll(java.lang.String entity)
|
java.util.List |
findBy(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
|
JPABase |
findById(java.lang.String entity,
java.lang.Object id)
|
java.lang.String |
findByToJPQL(java.lang.String findBy)
|
JPABase |
findOneBy(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
public static JPQL instance
JPQL
public JPQL()
em
public EntityManager em()
count
public long count(java.lang.String entity)
count
public long count(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
findAll
public java.util.List findAll(java.lang.String entity)
findById
public JPABase findById(java.lang.String entity,
java.lang.Object id)
throws java.lang.Exception
- Throws:
java.lang.Exception
findBy
public java.util.List findBy(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
find
public GenericModel.JPAQuery find(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
find
public GenericModel.JPAQuery find(java.lang.String entity)
all
public GenericModel.JPAQuery all(java.lang.String entity)
delete
public int delete(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
deleteAll
public int deleteAll(java.lang.String entity)
findOneBy
public JPABase findOneBy(java.lang.String entity,
java.lang.String query,
java.lang.Object[] params)
create
public JPABase create(java.lang.String entity,
java.lang.String name,
Scope.Params params)
throws java.lang.Exception
- Throws:
java.lang.Exception
createFindByQuery
public java.lang.String createFindByQuery(java.lang.String entityName,
java.lang.String entityClass,
java.lang.String query,
java.lang.Object... params)
createDeleteQuery
public java.lang.String createDeleteQuery(java.lang.String entityName,
java.lang.String entityClass,
java.lang.String query,
java.lang.Object... params)
createCountQuery
public java.lang.String createCountQuery(java.lang.String entityName,
java.lang.String entityClass,
java.lang.String query,
java.lang.Object... params)
bindParameters
public Query bindParameters(Query q,
java.lang.Object... params)
bindParameters
public Query bindParameters(Query q,
java.util.Map<java.lang.String,java.lang.Object> params)
findByToJPQL
public java.lang.String findByToJPQL(java.lang.String findBy)
extractProp
protected static java.lang.String extractProp(java.lang.String part,
java.lang.String end)
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly