@Component(value="blQueryHelper") public class QueryHelperImpl extends Object implements QueryHelper, org.springframework.context.ApplicationContextAware
QueryHelper
. Utilizes the BroadleafRequestContext
to store query hints
in a ThreadLocal context.Constructor and Description |
---|
QueryHelperImpl() |
Modifier and Type | Method and Description |
---|---|
Object |
getQueryHint(String hintKey) |
List |
getResultListWithHint(javax.persistence.Query query,
String hintKey,
Object hintValue) |
<T> List<T> |
getResultListWithHint(javax.persistence.TypedQuery<T> query,
String hintKey,
Object hintValue) |
Object |
getSingleResultWithHint(javax.persistence.Query query,
String hintKey,
Object hintValue) |
<T> T |
getSingleResultWithHint(javax.persistence.TypedQuery<T> query,
String hintKey,
Object hintValue) |
static QueryHelper |
getSingleton() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
public static QueryHelper getSingleton()
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public <T> List<T> getResultListWithHint(javax.persistence.TypedQuery<T> query, String hintKey, Object hintValue)
getResultListWithHint
in interface QueryHelper
public <T> T getSingleResultWithHint(javax.persistence.TypedQuery<T> query, String hintKey, Object hintValue)
getSingleResultWithHint
in interface QueryHelper
public List getResultListWithHint(javax.persistence.Query query, String hintKey, Object hintValue)
getResultListWithHint
in interface QueryHelper
public Object getSingleResultWithHint(javax.persistence.Query query, String hintKey, Object hintValue)
getSingleResultWithHint
in interface QueryHelper
public Object getQueryHint(String hintKey)
getQueryHint
in interface QueryHelper
Copyright © 2022. All rights reserved.