本文整理了Java中org.datanucleus.store.query.Query.setResult
方法的一些代码示例,展示了Query.setResult
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setResult
方法的具体详情如下:
包路径:org.datanucleus.store.query.Query
类名称:Query
方法名:setResult
暂无
代码示例来源:origin: org.datanucleus/datanucleus-api-jdo
/**
* Set the result for the query.
* @param result Result clause
*/
public void setResult(String result)
{
assertIsOpen();
try
{
query.setResult(result);
}
catch (NucleusException jpe)
{
throw NucleusJDOHelper.getJDOExceptionForNucleusException(jpe);
}
}
代码示例来源: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;
}
内容来源于网络,如有侵权,请联系作者删除!