Package com.atlassian.jira.index.ha
Interface WithIdAndVersion
- All Superinterfaces:
WithId
- All Known Implementing Classes:
EntityVersion
,EntityWithVersion
,WithIdAndVersion.DefaultWithIdAndVersion
Entities implementing this interface are supposed to be uniquely identifiable by id and have a version.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.atlassian.jira.entity.WithId
ID_COMPARATOR
-
Method Summary
Modifier and TypeMethodDescriptionstatic WithIdAndVersion
fromDocument
(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document) static Collection<WithIdAndVersion>
fromDocuments
(IndexDirectoryFactory.Name indexName, Collection<org.apache.lucene.document.Document> documents) static WithIdAndVersion
-
Method Details
-
of
-
getVersion
Long getVersion() -
fromDocument
static WithIdAndVersion fromDocument(IndexDirectoryFactory.Name indexName, org.apache.lucene.document.Document document) throws IllegalArgumentException - Parameters:
indexName
- index namedocument
- document related toindexName
with id and version- Returns:
- WithIdAndVersion created from
indexName
anddocument
- Throws:
IllegalArgumentException
- whenWithIdAndVersion
cannot be created fromindexName
anddocument
-
fromDocuments
static Collection<WithIdAndVersion> fromDocuments(IndexDirectoryFactory.Name indexName, Collection<org.apache.lucene.document.Document> documents) throws IllegalArgumentException - Throws:
IllegalArgumentException
-