Spring Data Jpa

org.springframework.data.jpa.repository.support
Class QueryDslRepositorySupport

java.lang.Object
  extended by org.springframework.data.jpa.repository.support.QueryDslRepositorySupport

@Repository
public abstract class QueryDslRepositorySupport
extends Object

Base class for implementing repositories using QueryDsl library.

Author:
Oliver Gierke

Constructor Summary
QueryDslRepositorySupport()
           
 
Method Summary
protected  com.mysema.query.dml.DeleteClause<com.mysema.query.jpa.impl.JPADeleteClause> delete(com.mysema.query.types.EntityPath<?> path)
          Returns a fresh DeleteClause.
protected  com.mysema.query.jpa.JPQLQuery from(com.mysema.query.types.EntityPath<?>... paths)
          Returns a fresh JPQLQuery.
protected
<T> com.mysema.query.types.path.PathBuilder<T>
getBuilder(Class<T> type)
          Returns a PathBuilder for the given type.
protected  javax.persistence.EntityManager getEntityManager()
          Returns the EntityManager.
 void setEntityManager(javax.persistence.EntityManager entityManager)
          Setter to inject EntityManager.
protected  com.mysema.query.dml.UpdateClause<com.mysema.query.jpa.impl.JPAUpdateClause> update(com.mysema.query.types.EntityPath<?> path)
          Returns a fresh UpdateClause.
 void validate()
          Callback to verify configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryDslRepositorySupport

public QueryDslRepositorySupport()
Method Detail

setEntityManager

public void setEntityManager(javax.persistence.EntityManager entityManager)
Setter to inject EntityManager.

Parameters:
entityManager - must not be null

validate

@PostConstruct
public void validate()
Callback to verify configuration. Used by containers.


getEntityManager

protected javax.persistence.EntityManager getEntityManager()
Returns the EntityManager.

Returns:
the entityManager

from

protected com.mysema.query.jpa.JPQLQuery from(com.mysema.query.types.EntityPath<?>... paths)
Returns a fresh JPQLQuery.

Returns:
the Querydsl JPQLQuery.

delete

protected com.mysema.query.dml.DeleteClause<com.mysema.query.jpa.impl.JPADeleteClause> delete(com.mysema.query.types.EntityPath<?> path)
Returns a fresh DeleteClause.

Parameters:
path -
Returns:
the Querydsl DeleteClause.

update

protected com.mysema.query.dml.UpdateClause<com.mysema.query.jpa.impl.JPAUpdateClause> update(com.mysema.query.types.EntityPath<?> path)
Returns a fresh UpdateClause.

Parameters:
path -
Returns:
the Querydsl UpdateClause.

getBuilder

protected <T> com.mysema.query.types.path.PathBuilder<T> getBuilder(Class<T> type)
Returns a PathBuilder for the given type.

Type Parameters:
T -
Parameters:
type -
Returns:
the Querdsl PathBuilder.

Spring Data Jpa

Copyright © 2011-2012-2012 SpringSource. All Rights Reserved.