Class DtoTool

java.lang.Object
com.vernaio.kayros.engine.v2.api.dto.DtoTool
All Implemented Interfaces:
IDtoTool

public class DtoTool extends Object implements IDtoTool
Initial availabilities (positive list) and reservations (negative list) of a tool. At every time, the required quantity on some tool kind may not exceed the total available quantity of tools with this kind.
  • Constructor Details

    • DtoTool

      protected DtoTool()
    • DtoTool

      public DtoTool(String id, String kind)
  • Method Details

    • getId

      public String getId()
      Unique identifier among all DtoTool.
      Specified by:
      getId in interface IDtoTool
    • setId

      public void setId(String id)
      Unique identifier among all DtoTool.
      Specified by:
      setId in interface IDtoTool
    • getKind

      public String getKind()
      The kind of this tool. Tools are always required via their kind.
      Specified by:
      getKind in interface IDtoTool
    • setKind

      public void setKind(String kind)
      The kind of this tool. Tools are always required via their kind.
      Specified by:
      setKind in interface IDtoTool
    • getAvailabilities

      public IDtoToolAvailability[] getAvailabilities()
      When are how many of this tool available. Quantities of intersecting availabilities are added up. If set to null, one of this tool is available always.
      Specified by:
      getAvailabilities in interface IDtoTool
    • setAvailabilities

      public void setAvailabilities(IDtoToolAvailability[] availabilities)
      When are how many of this tool available. Quantities of intersecting availabilities are added up. If set to null, one of this tool is available always.
      Specified by:
      setAvailabilities in interface IDtoTool
    • getReservations

      public IDtoToolReservation[] getReservations()
      When are how many of this tool NOT available. Reserved quantities are subtracted from the available quantities at all affected times. Negative total tool quantites are interpreted as 0.
      Specified by:
      getReservations in interface IDtoTool
    • setReservations

      public void setReservations(IDtoToolReservation[] reservations)
      When are how many of this tool NOT available. Reserved quantities are subtracted from the available quantities at all affected times. Negative total tool quantites are interpreted as 0.
      Specified by:
      setReservations in interface IDtoTool
    • equals

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

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

      public DtoTool withId(String id)
      Unique identifier among all DtoTool.
    • withKind

      public DtoTool withKind(String kind)
      The kind of this tool. Tools are always required via their kind.
    • withAvailabilities

      public DtoTool withAvailabilities(IDtoToolAvailability[] availabilities)
      When are how many of this tool available. Quantities of intersecting availabilities are added up. If set to null, one of this tool is available always.
    • withReservations

      public DtoTool withReservations(IDtoToolReservation[] reservations)
      When are how many of this tool NOT available. Reserved quantities are subtracted from the available quantities at all affected times. Negative total tool quantites are interpreted as 0.