com.hcl.domino.data.DominoCollection Maven / Gradle / Ivy
/*
* ==========================================================================
* Copyright (C) 2019-2022 HCL America, Inc. ( http://www.hcl.com/ )
* All rights reserved.
* ==========================================================================
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. You may obtain a
* copy of the License at .
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
* ==========================================================================
*/
package com.hcl.domino.data;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.function.BiConsumer;
import com.hcl.domino.misc.DominoClientDescendant;
import com.hcl.domino.misc.Loop;
/**
* Term borrowed from MongoDB. Covers Domino views/folders
* Collection Type (static = view)
* Contains CollectionEntry, Hibernate compliant
*
* @author t.b.d
*/
public interface DominoCollection extends IAdaptable, DominoClientDescendant {
/** Available column sort directions */
public enum Direction {
Ascending, Descending
}
void forEachDocument(int skip, int count, BiConsumer consumer);
List getAliases();
/**
* Returns an ordered set of note ids for collection entries that the current
* user is
* allowed to see.
*
* Implementations are likely, but not guaranteed, to return a
* {@link LinkedHashSet}.
*
*
* @param withDocuments true to return document note ids
* @param withCategories true to return category note ids
* @return sorted set of note ids
*/
Set getAllIds(boolean withDocuments, boolean withCategories);
/**
* Very fast way to get all note ids in a view. For checkRights=false
* and "show response documents in hierarchy" turned off, it is very likely that the
* method produces the result in no time, because it just copies an already existing internal
* IDTable.
*
* @param checkRights true to check access rights
* @return IDTable with note ids
*/
IDTable getAllIdsAsIDTable(boolean checkRights);
/**
* Returns an ordered set of note ids for collection entries that match the
* specified lookup key (supporting multi column lookups)
*
* Implementations are likely, but not guaranteed, to return a
* {@link LinkedHashSet}.
*
*
* @param findFlags flags to configure the lookup operation
* @param key lookup key (list of String, Number, DominoDateRange)
* @return sorted set of note ids
*/
Set getAllIdsByKey(Set findFlags, Collection
© 2015 - 2025 Weber Informatics LLC | Privacy Policy