本文整理汇总了Java中com.googlecode.cqengine.resultset.ResultSet.isNotEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java ResultSet.isNotEmpty方法的具体用法?Java ResultSet.isNotEmpty怎么用?Java ResultSet.isNotEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.googlecode.cqengine.resultset.ResultSet
的用法示例。
在下文中一共展示了ResultSet.isNotEmpty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findObject
import com.googlecode.cqengine.resultset.ResultSet; //导入方法依赖的package包/类
private T findObject(NotesOriginatorIdData oid) {
if (m_initialSync)
return null;
if (Boolean.TRUE.equals(m_wiped.get()))
return null;
Query<T> query = (Query<T>) equal(OBJ_UNID, oid.getUNID());
ResultSet<T> objectWithUNID = m_indexCollection.retrieve(query);
if (objectWithUNID.isNotEmpty()) {
T obj = objectWithUNID.iterator().next();
return obj;
}
return null;
}
示例2: removeFromIndex
import com.googlecode.cqengine.resultset.ResultSet; //导入方法依赖的package包/类
public boolean removeFromIndex(Integer id){
ResultSet<SysUserIndex> resultSet = sysUserData.retrieve(equal(SysUserIndex.ID, id));
if(null != resultSet && resultSet.isNotEmpty()){
SysUserIndex index = resultSet.uniqueResult();
return sysUserData.remove(index);
}
return false;
}
示例3: removeAllFromIndex
import com.googlecode.cqengine.resultset.ResultSet; //导入方法依赖的package包/类
public boolean removeAllFromIndex(Collection<Integer> ids){
ResultSet<SysUserIndex> resultSet = sysUserData.retrieve(in(SysUserIndex.ID, ids));
if(null != resultSet && resultSet.isNotEmpty()){
Collection<SysUserIndex> indexs = Lists.newArrayList();
for (SysUserIndex user : resultSet) {
indexs.add(user);
}
return sysUserData.removeAll(indexs);
}
return false;
}
示例4: foreignCollectionContains
import com.googlecode.cqengine.resultset.ResultSet; //导入方法依赖的package包/类
/**
* Checks if the given foreign collection contains objects which match the given query.
* @param foreignCollection The foreign collection to check
* @param query The query to check
* @return True if the foreign collection contains one or more objects which match the query, otherwise false
*/
static <F> boolean foreignCollectionContains(IndexedCollection<F> foreignCollection, Query<F> query) {
ResultSet<F> resultSet = foreignCollection.retrieve(query);
try {
return resultSet.isNotEmpty();
}
finally {
resultSet.close();
}
}