本文整理了Java中org.datanucleus.store.query.Query.getRangeToExcl
方法的一些代码示例,展示了Query.getRangeToExcl
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getRangeToExcl
方法的具体详情如下:
包路径:org.datanucleus.store.query.Query
类名称:Query
方法名:getRangeToExcl
暂无
代码示例来源:origin: forcedotcom/java-sdk
/**
* See if there is a limit set and if we can use SOQL to execute the query.
*
* @param query Query
* @return the limit type of Soql, Java, or None
*/
public static LimitType getLimitType(Query query) {
if (query.getRangeFromIncl() > 0 || (query.getRangeToExcl() > 0 && query.getRangeToExcl() < Long.MAX_VALUE)) {
if (query.getRangeFromIncl() == 0) return LimitType.Soql;
return LimitType.Java;
}
return LimitType.None;
}
代码示例来源:origin: com.force.sdk/force-jpa
/**
* See if there is a limit set and if we can use SOQL to execute the query.
*
* @param query Query
* @return the limit type of Soql, Java, or None
*/
public static LimitType getLimitType(Query query) {
if (query.getRangeFromIncl() > 0 || (query.getRangeToExcl() > 0 && query.getRangeToExcl() < Long.MAX_VALUE)) {
if (query.getRangeFromIncl() == 0) return LimitType.Soql;
return LimitType.Java;
}
return LimitType.None;
}
代码示例来源:origin: org.datanucleus/datanucleus-java5
/**
* The maximum number of results the query object was set to retrieve.
* Returns Integer.MAX_VALUE if setMaxResults was not applied to the query object.
* @return maximum number of results
*/
public int getMaxResults()
{
long queryMin = query.getRangeFromIncl();
long queryMax = query.getRangeToExcl();
long max = queryMax - queryMin;
if (max > Integer.MAX_VALUE)
{
return Integer.MAX_VALUE;
}
return (int)max;
}
代码示例来源:origin: org.datanucleus/datanucleus-jpa
/**
* The maximum number of results the query object was set to retrieve.
* Returns Integer.MAX_VALUE if setMaxResults was not applied to the query object.
* @return maximum number of results
*/
public int getMaxResults()
{
long queryMin = query.getRangeFromIncl();
long queryMax = query.getRangeToExcl();
long max = queryMax - queryMin;
if (max > Integer.MAX_VALUE)
{
return Integer.MAX_VALUE;
}
return (int)max;
}
代码示例来源:origin: org.datanucleus/datanucleus-rdbms
else if (applyRangeChecks && index >= query.getRangeToExcl())
size = (int) (query.getRangeToExcl()-query.getRangeFromIncl());
hasMoreResults = false;
if (applyRangeChecks && index < query.getRangeToExcl())
代码示例来源:origin: org.datanucleus/datanucleus-rdbms
if (theSize > query.getRangeToExcl())
endIndex = (int) (query.getRangeToExcl()-1);
theSize = (int) (query.getRangeToExcl() - query.getRangeFromIncl());
代码示例来源:origin: org.datanucleus/datanucleus-rdbms
int maxElements = (int)(query.getRangeToExcl() - query.getRangeFromIncl());
if (resultObjs.size() == maxElements)
代码示例来源:origin: org.datanucleus/datanucleus-rdbms
/**
* Inform the query result that the connection is being closed so perform
* any operations now, or rest in peace.
*/
protected void closingConnection()
{
// Make sure all rows are loaded.
if (loadResultsAtCommit && isOpen())
{
// Query connection closing message
NucleusLogger.QUERY.debug(Localiser.msg("052606", query.toString()));
if (endIndex < 0)
{
endIndex = size()-1;
if (applyRangeChecks)
{
endIndex = (int) query.getRangeToExcl()-1;
}
}
for (int i=startIndex;i<endIndex+1;i++)
{
getObjectForIndex(i);
}
// Cache the query results
cacheQueryResults();
}
}
代码示例来源:origin: org.datanucleus/datanucleus-rdbms
long toExclNo = query.getRangeToExcl();
if (toExclNo != 0 && toExclNo != Long.MAX_VALUE)
代码示例来源:origin: org.datanucleus/datanucleus-neo4j
rangeTo = (query.getRangeToExcl() != Long.MAX_VALUE ? query.getRangeToExcl() : null);
if (rangeFrom != null || rangeTo != null)
内容来源于网络,如有侵权,请联系作者删除!