本文整理了Java中org.datanucleus.store.query.Query.setCompilation
方法的一些代码示例,展示了Query.setCompilation
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setCompilation
方法的具体详情如下:
包路径:org.datanucleus.store.query.Query
类名称:Query
方法名:setCompilation
暂无
代码示例来源:origin: org.datanucleus/datanucleus-jpa
/**
* Method to return a query for the specified Criteria Query.
* @param criteriaQuery The Criteria query
* @return The JPA query to use
*/
public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
CriteriaQueryImpl<T> criteria = (CriteriaQueryImpl<T>)criteriaQuery;
String jpqlString = criteria.toString();
TypedQuery<T> query = null;
QueryCompilation compilation = criteria.getCompilation(om.getMetaDataManager(), om.getClassLoaderResolver());
if (criteria.getResultType() != null && criteria.getResultType() != compilation.getCandidateClass())
{
query = createQuery(jpqlString, criteria.getResultType());
}
else
{
query = createQuery(jpqlString);
}
org.datanucleus.store.query.Query internalQuery = ((JPAQuery)query).getInternalQuery();
if (compilation.getExprResult() == null)
{
// If the result was "Object(e)" or "e" then this is meaningless so remove
internalQuery.setResult(null);
}
internalQuery.setCompilation(compilation);
return query;
}
代码示例来源:origin: org.datanucleus/datanucleus-api-jdo
internalQuery.setCompilation(compilation);
内容来源于网络,如有侵权,请联系作者删除!