本文整理了Java中org.datanucleus.store.query.Query.setResultMetaData
方法的一些代码示例,展示了Query.setResultMetaData
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setResultMetaData
方法的具体详情如下:
包路径:org.datanucleus.store.query.Query
类名称:Query
方法名:setResultMetaData
暂无
代码示例来源:origin: com.force.sdk/force-jpa
/**
* Create an instance of Query for executing an SOQL query.
* @param soqlString a native SOQL query string
* @param resultSetMapping the name of the result set mapping
* @return the new query instance
*/
@Override
public Query createNativeQuery(String soqlString, String resultSetMapping) {
assertIsOpen();
try {
org.datanucleus.store.query.Query internalQuery = om.getOMFContext().getQueryManager().newQuery(
SOQL_LANGUAGE, om.getExecutionContext(), soqlString);
QueryResultMetaData qrmd = om.getMetaDataManager().getMetaDataForQueryResult(resultSetMapping);
if (qrmd == null) {
// TODO Localise this, and check if it is the correct exception to throw
throw new IllegalArgumentException("ResultSetMapping " + resultSetMapping + " is not found");
}
internalQuery.setResultMetaData(qrmd);
return new JPAQuery(this, internalQuery, SOQL_LANGUAGE);
} catch (NucleusException ne) {
throw new IllegalArgumentException(ne.getMessage(), ne);
}
}
代码示例来源:origin: forcedotcom/java-sdk
/**
* Create an instance of Query for executing an SOQL query.
* @param soqlString a native SOQL query string
* @param resultSetMapping the name of the result set mapping
* @return the new query instance
*/
@Override
public Query createNativeQuery(String soqlString, String resultSetMapping) {
assertIsOpen();
try {
org.datanucleus.store.query.Query internalQuery = om.getOMFContext().getQueryManager().newQuery(
SOQL_LANGUAGE, om.getExecutionContext(), soqlString);
QueryResultMetaData qrmd = om.getMetaDataManager().getMetaDataForQueryResult(resultSetMapping);
if (qrmd == null) {
// TODO Localise this, and check if it is the correct exception to throw
throw new IllegalArgumentException("ResultSetMapping " + resultSetMapping + " is not found");
}
internalQuery.setResultMetaData(qrmd);
return new JPAQuery(this, internalQuery, SOQL_LANGUAGE);
} catch (NucleusException ne) {
throw new IllegalArgumentException(ne.getMessage(), ne);
}
}
代码示例来源:origin: org.datanucleus/datanucleus-jpa
/**
* Create an instance of Query for executing an SQL query.
* @param sqlString a native SQL query string
* @param resultSetMapping the name of the result set mapping
* @return the new query instance
*/
public Query createNativeQuery(String sqlString, String resultSetMapping)
{
assertIsOpen();
try
{
org.datanucleus.store.query.Query internalQuery = om.getOMFContext().getQueryManager().newQuery(
QueryLanguage.SQL.toString(), om.getExecutionContext(), sqlString);
QueryResultMetaData qrmd = om.getMetaDataManager().getMetaDataForQueryResult(resultSetMapping);
if (qrmd == null)
{
// TODO Localise this, and check if it is the correct exception to throw
throw new IllegalArgumentException("ResultSetMapping " + resultSetMapping + " is not found");
}
internalQuery.setResultMetaData(qrmd);
return new JPAQuery(this, internalQuery, QueryLanguage.SQL.toString());
}
catch (NucleusException ne)
{
throw new IllegalArgumentException(ne.getMessage(), ne);
}
}
代码示例来源:origin: org.datanucleus/datanucleus-java5
/**
* Create an instance of Query for executing an SQL query.
* @param sqlString a native SQL query string
* @param resultSetMapping the name of the result set mapping
* @return the new query instance
*/
public Query createNativeQuery(String sqlString, String resultSetMapping)
{
assertIsOpen();
try
{
org.datanucleus.store.query.Query jpoxQuery = getObjectManager().getOMFContext().getQueryManager().newQuery(
QueryLanguage.SQL.toString(), getObjectManager(), sqlString);
QueryResultMetaData qrmd = om.getMetaDataManager().getMetaDataForQueryResult(resultSetMapping);
if (qrmd == null)
{
// TODO Localise this, and check if it is the correct exception to throw
throw new IllegalArgumentException("ResultSetMapping " + resultSetMapping + " is not found");
}
jpoxQuery.setResultMetaData(qrmd);
return new JPAQuery(this, jpoxQuery, QueryLanguage.SQL.toString());
}
catch (NucleusException jpe)
{
throw new IllegalArgumentException(jpe.getMessage(), jpe);
}
}
代码示例来源:origin: org.datanucleus/datanucleus-jpa
internalQuery.setResultMetaData(qrmd);
return new JPAQuery(this, internalQuery, qmd.getLanguage());
代码示例来源:origin: org.datanucleus/datanucleus-java5
jpoxQuery.setResultMetaData(qrmd);
return new JPAQuery(this, jpoxQuery, qmd.getLanguage());
内容来源于网络,如有侵权,请联系作者删除!