Class VREvent

java.lang.Object
org.vrspace.server.dto.VREvent
Direct Known Subclasses:
ClientRequest

public class VREvent extends Object
An event that happened to an object. Event can change one or more properties of an object, and can be generated internally. It's typically received from a client, and represents changes to clients own properties, e.g. position.
Author:
joe
  • Constructor Details

    • VREvent

      public VREvent(VRObject source, Client client)
    • VREvent

      public VREvent(VRObject source)
    • VREvent

      public VREvent()
  • Method Details

    • addChange

      public VREvent addChange(String field, Object value)
    • getSourceClassName

      public String getSourceClassName()
    • getSourceId

      public Long getSourceId()
    • getSourceID

      public ID getSourceID()
    • sourceIs

      public boolean sourceIs(VRObject obj)
    • isOwner

      public boolean isOwner()
    • getObject

      public Map<String,Long> getObject()
      ID (class name + id ) suitable for serialization.
    • getChanges

      public Map<String,Object> getChanges()
      Changes to the object. Multiple changes to same property are going to be 'collapsed', i.e. last value of a field overrides any previous values.
    • getTimestamp

      public LocalDateTime getTimestamp()
      Event timestamp in UTC
    • getClassName

      public String getClassName()
    • getId

      public Long getId()
    • getSource

      public VRObject getSource()
    • getClient

      public Client getClient()
    • getPayload

      public String getPayload()
    • getOwnership

      public Ownership getOwnership()
    • setObject

      public void setObject(Map<String,Long> object)
      ID (class name + id ) suitable for serialization.
    • setChanges

      public void setChanges(Map<String,Object> changes)
      Changes to the object. Multiple changes to same property are going to be 'collapsed', i.e. last value of a field overrides any previous values.
    • setTimestamp

      public void setTimestamp(LocalDateTime timestamp)
      Event timestamp in UTC
    • setClassName

      public void setClassName(String className)
    • setId

      public void setId(Long id)
    • setSource

      public void setSource(VRObject source)
    • setClient

      public void setClient(Client client)
    • setPayload

      public void setPayload(String payload)
    • setOwnership

      public void setOwnership(Ownership ownership)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object