Interface CouchbasePersistentEntity<T>

All Superinterfaces:
Iterable<CouchbasePersistentProperty>, PersistentEntity<T,CouchbasePersistentProperty>
All Known Implementing Classes:
BasicCouchbasePersistentEntity

public interface CouchbasePersistentEntity<T> extends PersistentEntity<T,CouchbasePersistentProperty>
Represents an entity that can be persisted which contains 0 or more properties.
Author:
Michael Nitschinger, Michael Reiche
  • Field Details

    • TTL_IN_SECONDS_INCLUSIVE_END

      static final long TTL_IN_SECONDS_INCLUSIVE_END
      The threshold (inclusive) after which expiry should be expressed as a Unix UTC time.
      See Also:
  • Method Details

    • getExpiry

      @Deprecated int getExpiry()
      Deprecated.
      Returns the expiration time of the entity.

      The Couchbase format for expiration time is: - for TTL < 31 days (<= 30 * 24 * 60 * 60): expressed as a TTL in seconds - for TTL > 30 days: expressed as Unix UTC time of expiry (number of SECONDS since the Epoch)

      Returns:
      the expiration time in correct Couchbase format.
    • getExpiryDuration

      Duration getExpiryDuration()
      Returns the expiration time of the entity.

      The Couchbase format for expiration time is: - for TTL < 31 days (<= 30 * 24 * 60 * 60): expressed as a TTL in seconds - for TTL > 30 days: expressed as Unix UTC time of expiry (number of SECONDS since the Epoch)

      Returns:
      the expiration time Duration
    • isTouchOnRead

      boolean isTouchOnRead()
      Flag for using getAndTouch operations for reads, resetting the expiration (if one was set) when the entity is directly read (eg. findOne, findById).
      Returns:
      true if a direct read of the document should trigger a touch, resetting its expiration timer.
    • hasTextScoreProperty

      boolean hasTextScoreProperty()
    • getTextScoreProperty

      CouchbasePersistentProperty getTextScoreProperty()