本文整理了Java中org.datanucleus.store.query.Query.setUnique
方法的一些代码示例,展示了Query.setUnique
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setUnique
方法的具体详情如下:
包路径:org.datanucleus.store.query.Query
类名称:Query
方法名:setUnique
暂无
代码示例来源:origin: org.datanucleus/datanucleus-api-jdo
/**
* Set whether to expect a unique result.
* @param unique Whether results are unique
*/
public void setUnique(boolean unique)
{
assertIsOpen();
try
{
query.setUnique(unique);
}
catch (NucleusException jpe)
{
throw NucleusJDOHelper.getJDOExceptionForNucleusException(jpe);
}
}
代码示例来源:origin: org.datanucleus/datanucleus-api-jdo
@Override
public <R> R executeResultUnique(Class<R> resultCls)
{
assertIsOpen();
query.setUnique(true);
if (resultCls == null)
{
throw new JDOUserException("Result Class must be specified");
}
this.query.setResultClass(resultCls);
return (R) executeInternal();
}
代码示例来源:origin: org.datanucleus/datanucleus-api-jdo
@Override
public Object executeResultUnique()
{
assertIsOpen();
query.setUnique(true);
if (query.getResult() == null)
{
throw new JDOUserException("Cannot call executeResultUnique method when query has result unset. Call executeUnique instead.");
}
return executeInternal();
}
代码示例来源:origin: org.datanucleus/datanucleus-java5
query.setUnique(true);
return query.executeWithMap(null); // Params defined using setParameter() earlier
代码示例来源:origin: org.datanucleus/datanucleus-api-jdo
@Override
public T executeUnique()
{
assertIsOpen();
query.setUnique(true);
if (query.getResult() != null)
{
throw new JDOUserException("Cannot call executeXXX method when query has result set to " + query.getResult() + ". Use executeResultUnique() instead");
}
return (T) executeInternal();
}
代码示例来源:origin: org.datanucleus/datanucleus-jpa
query.setUnique(true);
代码示例来源:origin: org.datanucleus/datanucleus-api-jdo
internalQuery.setUnique(unique);
if (candidates != null)
内容来源于网络,如有侵权,请联系作者删除!