Class SaveDataDocument

java.lang.Object
dev.getelements.elements.sdk.model.savedata.SaveDataDocument

public class SaveDataDocument extends Object
Represents an arbitrary save data document that persists on the server. The document saves with a version identifier such that clients may resolve conflicts between the local copy and the remote copy.
  • Constructor Details

    • SaveDataDocument

      public SaveDataDocument()
      Creates a new instance.
  • Method Details

    • getId

      public String getId()
      Returns the database assigned unique ID of the document.
      Returns:
      the id
    • setId

      public void setId(String id)
      Sets the database assigned unique ID of the document.
      Parameters:
      id - the id
    • getSlot

      public int getSlot()
      Returns the slot of this save data document.
      Returns:
      the slot
    • setSlot

      public void setSlot(int slot)
      Sets the slot of this save data document.
      Parameters:
      slot - the slot
    • getUser

      public User getUser()
      Returns the user which owns the save data.
      Returns:
      the user
    • setUser

      public void setUser(User user)
      Sets the user which owns the save data.
      Parameters:
      user - the user
    • getProfile

      public Profile getProfile()
      Returns the profile which owns the save data.
      Returns:
      the profile
    • setProfile

      public void setProfile(Profile profile)
      Sets the profile which owns the save data.
      Parameters:
      profile - the profile
    • getVersion

      public String getVersion()
      Returns the revision of the save data document.
      Returns:
      the version
    • setVersion

      public void setVersion(String version)
      Sets the revision of the save data document.
      Parameters:
      version - the version
    • getTimestamp

      public long getTimestamp()
      Returns the timestamp of the last write to this document, in milliseconds since Unix epoch.
      Returns:
      the timestamp
    • setTimestamp

      public void setTimestamp(long timestamp)
      Sets the timestamp of the last write to this document, in milliseconds since Unix epoch.
      Parameters:
      timestamp - the timestamp
    • getContents

      public String getContents()
      Returns the contents of the save data.
      Returns:
      the contents
    • setContents

      public void setContents(String contents)
      Sets the contents of the save data.
      Parameters:
      contents - the contents
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object