public abstract class Subscription extends PropertyHolderImpl implements SubscriptionI, BaseEntityI
Modifier and Type | Class and Description |
---|---|
static class |
Subscription.Converter
Converts instances of of
Subscription to corresponding value objects. |
static class |
Subscription.Factory
Constructs new instances of
Subscription . |
Constructor and Description |
---|
Subscription() |
Modifier and Type | Method and Description |
---|---|
<R,P> R |
accept(EntityVisitor<R,? super P> visitor,
P param) |
SubscriptionVO |
convertToVO()
converts this domain object (entity) to its corresponding value object
|
java.lang.String |
getAdapterType()
The market data adapter that this Subscription is valid for.
|
long |
getId() |
java.lang.String |
getMarketDataEventType()
A Type to distinguish between different market data and generic event subscriptions
|
Security |
getSecurity()
The base class of all Securities in the system
|
Strategy |
getStrategy()
Represents a running Strategy within the system.
|
int |
getVersion() |
void |
initializeSecurity(Initializer initializer) |
void |
initializeStrategy(Initializer initializer) |
boolean |
isInitialized() |
boolean |
isPersistent()
A
persistent Subscription will always be delivered to the strategy (i.e. |
void |
setAdapterType(java.lang.String adapterType) |
void |
setId(long id) |
void |
setInitialized() |
void |
setMarketDataEventType(java.lang.String marketDataEventType) |
void |
setPersistent(boolean persistent) |
void |
setSecurity(Security security) |
void |
setStrategy(Strategy strategy) |
void |
setVersion(int version) |
addProperty, clearProperties, getBooleanProperty, getDateProperty, getDoubleProperty, getIntProperty, getMoneyProperty, getProperties, getPropertiesCount, getProperty, getProperty, getPropertyNames, getTextProperty, hasProperty, removeProperty, setProperties
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public boolean isInitialized()
isInitialized
in interface BaseEntityI
isInitialized
in class PropertyHolder
public void setInitialized()
public <R,P> R accept(EntityVisitor<R,? super P> visitor, P param)
accept
in interface BaseEntityI
accept
in class PropertyHolder
public long getId()
getId
in interface BaseEntityI
getId
in interface PropertyHolderI
getId
in interface SubscriptionI
getId
in class PropertyHolder
public void setId(long id)
public int getVersion()
public void setVersion(int version)
public java.lang.String getAdapterType()
getAdapterType
in interface SubscriptionI
public void setAdapterType(java.lang.String adapterType)
public boolean isPersistent()
persistent
Subscription will always be delivered to the strategy (i.e. for SP500). A non-persistent
Subscription requested by a strategy for a specific duration of time (i.e. Options on SP500). When resetting the database before a simulation run, these Subscriptions will be removedisPersistent
in interface SubscriptionI
public void setPersistent(boolean persistent)
public java.lang.String getMarketDataEventType()
getMarketDataEventType
in interface SubscriptionI
public void setMarketDataEventType(java.lang.String marketDataEventType)
public Strategy getStrategy()
public void setStrategy(Strategy strategy)
public void initializeStrategy(Initializer initializer)
public Security getSecurity()
public void setSecurity(Security security)
public void initializeSecurity(Initializer initializer)
public SubscriptionVO convertToVO()