Package io.datareplication.producer.feed
Class FeedEntityRepository.PageAssignment
- java.lang.Object
-
- io.datareplication.producer.feed.FeedEntityRepository.PageAssignment
-
- Enclosing interface:
- FeedEntityRepository
public static final class FeedEntityRepository.PageAssignment extends java.lang.Object
A subset of this repository's fields that are sufficient for operations that don't need the entity body.Some of the fields in this class correspond to fields in
Entity
orFeedEntityHeader
. See the field documentation for references.
-
-
Constructor Summary
Constructors Constructor Description PageAssignment(@NonNull ContentId contentId, @NonNull java.time.Instant lastModified, @NonNull java.util.Optional<@NonNull java.time.Instant> originalLastModified, long contentLength, @NonNull java.util.Optional<@NonNull PageId> pageId)
Creates a newPageAssignment
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NonNull ContentId
contentId()
The entity's content ID.long
contentLength()
The entity's body length.boolean
equals(java.lang.Object o)
int
hashCode()
@NonNull java.time.Instant
lastModified()
The entity's last-modified timestamp.@NonNull java.util.Optional<@NonNull java.time.Instant>
originalLastModified()
The old last-modified timestamp in case the entity is pushed backwards.@NonNull java.util.Optional<@NonNull PageId>
pageId()
The ID of the page that the entity is assigned to.java.lang.String
toString()
-
-
-
Constructor Detail
-
PageAssignment
public PageAssignment(@NonNull @NonNull ContentId contentId, @NonNull @NonNull java.time.Instant lastModified, @NonNull @NonNull java.util.Optional<@NonNull java.time.Instant> originalLastModified, long contentLength, @NonNull @NonNull java.util.Optional<@NonNull PageId> pageId)
Creates a newPageAssignment
instance.- Parameters:
contentId
- The entity's content ID. Corresponds toFeedEntityHeader.contentId()
.lastModified
- The entity's last-modified timestamp. Corresponds toFeedEntityHeader.lastModified()
.originalLastModified
- The old last-modified timestamp in case the entity is pushed backwards. Does not correspond to a field inEntity
. When an entity is initially saved into the repository, this field should be stored empty.contentLength
- The entity's body length. Corresponds toBody.contentLength()
.pageId
- The ID of the page that the entity is assigned to. Does not correspond to a field inEntity
. When an entity is initially saved into the repository, this field should be stored empty.
-
-
Method Detail
-
contentId
@NonNull public @NonNull ContentId contentId()
The entity's content ID. Corresponds toFeedEntityHeader.contentId()
.
-
lastModified
@NonNull public @NonNull java.time.Instant lastModified()
The entity's last-modified timestamp. Corresponds toFeedEntityHeader.lastModified()
.
-
originalLastModified
@NonNull public @NonNull java.util.Optional<@NonNull java.time.Instant> originalLastModified()
The old last-modified timestamp in case the entity is pushed backwards. Does not correspond to a field inEntity
. When an entity is initially saved into the repository, this field should be stored empty.
-
contentLength
public long contentLength()
The entity's body length. Corresponds toBody.contentLength()
.
-
pageId
@NonNull public @NonNull java.util.Optional<@NonNull PageId> pageId()
The ID of the page that the entity is assigned to. Does not correspond to a field inEntity
. When an entity is initially saved into the repository, this field should be stored empty.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-