Package com.atlassian.jira.issue.util
Class DatabaseIssuesIterable
java.lang.Object
com.atlassian.jira.issue.util.DatabaseIssuesIterable
- All Implemented Interfaces:
IssuesIterable,EnclosedIterable<Issue>,Sized
This
EnclosedIterable is used to iterate over all issues in the database.
This implementation is superseded by the more flexible DatabaseIterable or
PagedDatabaseIterable.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.util.collect.EnclosedIterable
EnclosedIterable.Functions, EnclosedIterable.ListResolver<T> -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseIssuesIterable(OfBizDelegator delegator, IssueFactory issueFactory) DatabaseIssuesIterable(OfBizDelegator delegator, IssueFactory issueFactory, org.ofbiz.core.entity.EntityCondition condition) DatabaseIssuesIterable(OfBizDelegator delegator, IssueFactory issueFactory, org.ofbiz.core.entity.EntityCondition condition, List<String> orderBy, org.ofbiz.core.entity.EntityFindOptions findOptions) DatabaseIssuesIterable(OfBizDelegator delegator, IssueFactory issueFactory, org.ofbiz.core.entity.EntityCondition condition, org.ofbiz.core.entity.EntityFindOptions findOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoidApply the sink to all elements in the Collection.booleanisEmpty()intsize()You cannot rely on this size after you have started iterating through the issuesprotected voidAllows for IssuesIterable implementations that spy on each iterated issue.toString()Return a user friendly message that identifies which issues this iterable holds.
-
Constructor Details
-
DatabaseIssuesIterable
-
DatabaseIssuesIterable
public DatabaseIssuesIterable(OfBizDelegator delegator, IssueFactory issueFactory, @Nullable org.ofbiz.core.entity.EntityCondition condition) -
DatabaseIssuesIterable
public DatabaseIssuesIterable(OfBizDelegator delegator, IssueFactory issueFactory, @Nullable org.ofbiz.core.entity.EntityCondition condition, @Nullable org.ofbiz.core.entity.EntityFindOptions findOptions) -
DatabaseIssuesIterable
public DatabaseIssuesIterable(OfBizDelegator delegator, IssueFactory issueFactory, @Nullable org.ofbiz.core.entity.EntityCondition condition, @Nullable List<String> orderBy, @Nullable org.ofbiz.core.entity.EntityFindOptions findOptions)
-
-
Method Details
-
foreach
Description copied from interface:EnclosedIterableApply the sink to all elements in the Collection.- Specified by:
foreachin interfaceEnclosedIterable<Issue>
-
size
public int size()You cannot rely on this size after you have started iterating through the issues- Specified by:
sizein interfaceEnclosedIterable<Issue>- Specified by:
sizein interfaceSized- Returns:
- the likely size of the objects passed into the sink in
EnclosedIterable.foreach(Consumer). Be careful depending on this size being exact, as in many cases its best efforts value or may be unstable due to concurrent changes.
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceEnclosedIterable<Issue>- Specified by:
isEmptyin interfaceSized- Returns:
- true if the there is no data behind it.
-
toString
Description copied from interface:IssuesIterableReturn a user friendly message that identifies which issues this iterable holds. If there is a problem, this method is used to log what issues are affected.For example, if there is a problem locking the Lucene index this method is used to log which issues could not be reindexed.
Hence, it is important to provide a useful implementation for this method.
- Specified by:
toStringin interfaceIssuesIterable- Overrides:
toStringin classObject
-
spy
Allows for IssuesIterable implementations that spy on each iterated issue. Implementations of this method must not modify the issue state.- Parameters:
next- an Issue that is about to be iterated through
-