Class AbstractDataRecord

  • All Implemented Interfaces:
    DataRecord
    Direct Known Subclasses:
    CachingDataRecord, DbDataRecord, FileDataRecord

    public abstract class AbstractDataRecord
    extends java.lang.Object
    implements DataRecord
    Abstract data record base class. This base class contains only a reference to the data identifier of the record and implements the standard Object equality, hash code, and string representation methods based on the identifier.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)
      Checks if the given object is a data record with the same identifier as this one.
      DataIdentifier getIdentifier()
      Returns the data identifier.
      java.lang.String getReference()
      Returns a secure reference to this binary, or null if no such reference is available.
      int hashCode()
      Returns the hash code of the data identifier.
      java.lang.String toString()
      Returns the string representation of the data identifier.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractDataRecord

        public AbstractDataRecord​(AbstractDataStore store,
                                  DataIdentifier identifier)
        Creates a data record with the given identifier.
        Parameters:
        identifier - data identifier
    • Method Detail

      • getReference

        public java.lang.String getReference()
        Description copied from interface: DataRecord
        Returns a secure reference to this binary, or null if no such reference is available.
        Specified by:
        getReference in interface DataRecord
        Returns:
        binary reference, or null
      • toString

        public java.lang.String toString()
        Returns the string representation of the data identifier.
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation
      • equals

        public boolean equals​(java.lang.Object object)
        Checks if the given object is a data record with the same identifier as this one.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        object - other object
        Returns:
        true if the other object is a data record and has the same identifier as this one, false otherwise
      • hashCode

        public int hashCode()
        Returns the hash code of the data identifier.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hash code