Interface VirtualEntry

All Known Implementing Classes:
CDCInfo, DeletedDocumentInfo, SpaceDocument

public interface VirtualEntry
Author:
Niv Ingberg
  • Method Details

    • getTypeName

      String getTypeName()
      Returns:
      the type name.
    • setTypeName

      VirtualEntry setTypeName(String typeName)
      Sets the document type name.
      Parameters:
      typeName - Type name to set.
      Returns:
      This document (used for fluent method chaining).
    • getVersion

      int getVersion()
      Returns the entry's version.
      Returns:
      This document (used for fluent method chaining).
    • setVersion

      VirtualEntry setVersion(int version)
      Sets the entry's version.
      Returns:
      This document (used for fluent method chaining).
    • isTransient

      boolean isTransient()
      Returns:
      true if the entry is transient, false otherwise.
    • setTransient

      VirtualEntry setTransient(boolean isTransient)
      Sets whether or not the entry is transient.
      Returns:
      This document (used for fluent method chaining).
    • containsProperty

      boolean containsProperty(String name)
      Returns true if this document contains the specified property.
      Parameters:
      name - Name of property to look for.
      Returns:
      Returns true if this document contains the specified property, false otherwise.
    • getProperty

      <T> T getProperty(String name)
      Gets a property's value by its name. If the property does not exist in this document null is returned.
      Parameters:
      name - Name of property.
      Returns:
      Value of property.
    • setProperty

      VirtualEntry setProperty(String name, Object value)
      Sets a property's value by its name. If the property is already defined in this document the existing value is overridden.
      Parameters:
      name - Name of property
      value - New value of property.
      Returns:
      This document (used for fluent method chaining).
    • removeProperty

      <T> T removeProperty(String name)
      Removes the property from the document (if it exists).
      Parameters:
      name - Name of property to remove.
      Returns:
      Previous value associated with specified property, or null if there was no such property.
    • getProperties

      Map<String,Object> getProperties()
      Returns an unmodifiable view of the document's properties. Attempts to modify the returned map, whether direct or via its collection views, result in an UnsupportedOperationException.

      Returns:
      Reference to document's properties map.
    • addProperties

      VirtualEntry addProperties(Map<String,Object> properties)
      Adds the specified properties to the document's current properties.
      Parameters:
      properties - Properties to add.
      Returns:
      This document (used for fluent method chaining).