Class SaveDataDocument
java.lang.Object
dev.getelements.elements.sdk.model.savedata.SaveDataDocument
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the contents of the save data.getId()Returns the database assigned unique ID of the document.Returns the profile which owns the save data.intgetSlot()Returns the slot of this save data document.longReturns the timestamp of the last write to this document, in milliseconds since Unix epoch.getUser()Returns the user which owns the save data.Returns the revision of the save data document.inthashCode()voidsetContents(String contents) Sets the contents of the save data.voidSets the database assigned unique ID of the document.voidsetProfile(Profile profile) Sets the profile which owns the save data.voidsetSlot(int slot) Sets the slot of this save data document.voidsetTimestamp(long timestamp) Sets the timestamp of the last write to this document, in milliseconds since Unix epoch.voidSets the user which owns the save data.voidsetVersion(String version) Sets the revision of the save data document.toString()
-
Constructor Details
-
SaveDataDocument
public SaveDataDocument()Creates a new instance.
-
-
Method Details
-
getId
Returns the database assigned unique ID of the document.- Returns:
- the id
-
setId
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
Returns the user which owns the save data.- Returns:
- the user
-
setUser
Sets the user which owns the save data.- Parameters:
user- the user
-
getProfile
Returns the profile which owns the save data.- Returns:
- the profile
-
setProfile
Sets the profile which owns the save data.- Parameters:
profile- the profile
-
getVersion
Returns the revision of the save data document.- Returns:
- the version
-
setVersion
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
Returns the contents of the save data.- Returns:
- the contents
-
setContents
Sets the contents of the save data.- Parameters:
contents- the contents
-
equals
-
hashCode
public int hashCode() -
toString
-