Class NamedDocument

  • All Implemented Interfaces:
    java.lang.Iterable<BaseDocument.Entry>

    public final class NamedDocument
    extends BaseDocument
    Represents a document that has a "name" instead of an "id". For example, a Role document is represented as a NamedDocument.
    • Constructor Summary

      Constructors 
      Constructor Description
      NamedDocument​(java.lang.String name, Module coll, java.time.Instant ts)
      Initializes a new instance of the NamedDocument class with the specified name, coll, and ts.
      NamedDocument​(java.lang.String name, Module coll, java.time.Instant ts, java.util.Map<java.lang.String,​java.lang.Object> data)
      Initializes a new instance of the NamedDocument class with the specified name, coll, ts, and additional data stored as key/value pairs on the instance.
    • Constructor Detail

      • NamedDocument

        public NamedDocument​(java.lang.String name,
                             Module coll,
                             java.time.Instant ts)
        Initializes a new instance of the NamedDocument class with the specified name, coll, and ts.
        Parameters:
        name - The string value of the document name.
        coll - The module to which the document belongs.
        ts - The timestamp of the document.
      • NamedDocument

        public NamedDocument​(java.lang.String name,
                             Module coll,
                             java.time.Instant ts,
                             java.util.Map<java.lang.String,​java.lang.Object> data)
        Initializes a new instance of the NamedDocument class with the specified name, coll, ts, and additional data stored as key/value pairs on the instance.
        Parameters:
        name - The string value of the document name.
        coll - The module to which the document belongs.
        ts - The timestamp of the document.
        data - Additional data on the document.
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the string value of the document name.
        Returns:
        The name of the document.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object