Class StrategyDTO

java.lang.Object
tech.cassandre.trading.bot.dto.strategy.StrategyDTO

public final class StrategyDTO extends Object
DTO representing a strategy.
  • Method Details

    • initializeLastPositionIdUsed

      public void initializeLastPositionIdUsed(Long value)
      This method is used during initialization to set the last position used for this time of strategy.
      Parameters:
      value - initial value
    • getNextPositionId

      public long getNextPositionId()
      This method returns the next position id to use.
      Returns:
      next position
    • equals

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

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

      public static StrategyDTO.StrategyDTOBuilder builder()
    • getUid

      public Long getUid()
      Technical id.
    • getStrategyId

      public String getStrategyId()
      An identifier that uniquely identifies the strategy - Comes from the Java annotation.
    • getName

      public String getName()
      Strategy name - Comes from the Java annotation.
    • getLastPositionIdUsed

      public AtomicLong getLastPositionIdUsed()
      Last strategyId used in database - Used to generate the next strategyId when there is a creation.
    • toString

      public String toString()
      Overrides:
      toString in class Object