public class PositionVO extends PropertyHolderVO implements PositionI
Properties
.Constructor and Description |
---|
PositionVO(long id,
java.math.BigDecimal quantity,
java.math.BigDecimal cost,
java.math.BigDecimal realizedPL,
boolean persistent,
long strategyId,
long securityId) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.math.BigDecimal |
getCost()
the cost associated with the current holdings of this Position.
|
java.lang.String |
getObjectType() |
java.math.BigDecimal |
getQuantity()
The current quantity of this Position.
|
java.math.BigDecimal |
getRealizedPL()
the realized Profit-and-Loss of this Position
|
long |
getSecurityId()
The base class of all Securities in the system
|
long |
getStrategyId()
Represents a running Strategy within the system.
|
int |
hashCode() |
boolean |
isPersistent()
If set to
false , the Position will be removed when resetting the database before a simulation run. |
java.lang.String |
toString() |
getId
getId
public PositionVO(long id, java.math.BigDecimal quantity, java.math.BigDecimal cost, java.math.BigDecimal realizedPL, boolean persistent, long strategyId, long securityId)
public java.lang.String getObjectType()
getObjectType
in class PropertyHolderVO
public java.math.BigDecimal getQuantity()
getQuantity
in interface PositionI
public java.math.BigDecimal getCost()
public java.math.BigDecimal getRealizedPL()
getRealizedPL
in interface PositionI
public boolean isPersistent()
false
, the Position will be removed when resetting the database before a simulation run.isPersistent
in interface PositionI
public long getStrategyId()
public long getSecurityId()
public java.lang.String toString()
toString
in interface BaseValueObjectI
toString
in class PropertyHolderVO
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object