Interface ITrackable


public interface ITrackable
Interface for data objects that can track their changes, including logical deletion.

### Example ###

 
  public class MyData implements IStringIdentifiable, ITrackable {
    private String id;
    public String field1;
    public int field2;
    ...
    public String getId() {...}
    public void setId(String newId) {...}

    public ZonedDateTime getCreateTime(){...};
    public void setCreateTime(){...};
    public ZonedDateTime getLastChangeTime(){...};
    public void setLastChangeTime(){...};
    public boolean isDeleted(){...};
    public void setDeleted(){...};
  }
  
  
  • Method Details

    • getCreateTime

      ZonedDateTime getCreateTime()
      Gets the time when the object was created
      Returns:
      UTC date and time then object was created
    • setCreateTime

      void setCreateTime(ZonedDateTime value)
      Sets a time when the object was created
      Parameters:
      value - UTC date and time then object was created
    • getLastChangeTime

      ZonedDateTime getLastChangeTime()
      Gets the last time when the object was changed (created, updated or deleted)
      Returns:
      UTC date and time when the last change occurred
    • setLastChangeTime

      void setLastChangeTime(ZonedDateTime value)
      Sets the last time when the object was changed (created, updated or deleted)
      Parameters:
      value - UTC date and time when the last change occurred
    • isDeleted

      boolean isDeleted()
      Gets the logical deletion flag
      Returns:
      true if the object was deleted and false if the object is still active
    • setDeleted

      void setDeleted(boolean value)
      Sets the logical deletion flag
      Parameters:
      value - boolean value to set