Class Position

java.lang.Object
com.bluebell.greenhouse.platform.models.core.entities.AbstractAuditableEntity
com.bluebell.greenhouse.platform.models.core.entities.position.Position
All Implemented Interfaces:
GenericEntity

@Entity public class Position extends AbstractAuditableEntity
Class representation of a position a trader can have in the markets.
Version:
3.0.6
Author:
Stephen Prizio
  • Constructor Details

    • Position

      public Position()
  • Method Details

    • generatePositionNumber

      public static long generatePositionNumber()
      Generates the next position number.
      Returns:
      position number
    • ensurePositionNumber

      public void ensurePositionNumber()
      Ensures a position number exists before insert.
    • equals

      public boolean equals(Object o)
      Defines an object's equivalence with this entity.
      Overrides:
      equals in class Object
      Parameters:
      o - the reference object with which to compare.
      Returns:
      true if equal
    • hashCode

      public int hashCode()
      Computes the hash code.
      Overrides:
      hashCode in class Object
      Returns:
      hash code