com.fxcm.fix.entity
Class MarketDataSnapshot

java.lang.Object
  extended by com.fxcm.fix.pretrade.MarketDataSnapshot
      extended by com.fxcm.fix.entity.MarketDataSnapshot
All Implemented Interfaces:
com.fxcm.entity.IEntity, ITransportable, Serializable

public class MarketDataSnapshot
extends MarketDataSnapshot
implements com.fxcm.entity.IEntity

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.fxcm.fix.pretrade.MarketDataSnapshot
OBJ_TYPE
 
Constructor Summary
MarketDataSnapshot()
           
MarketDataSnapshot(MarketDataSnapshot aMarketDataSnapshot)
           
 
Method Summary
 boolean fill(IMessage aMsg)
          Recreates object state from given message.
 String getAskCurrency()
          Returns dealt currency, when field empty dealt currency is a left currency of quote symbol
 double getAskEntrySize()
          Returns quote liquidity, impressed in dealt currency, when field is missed any order quantity possible
 UTCDate getAskExpireDate()
          Returns quote expiration date
 UTCTimeOnly getAskExpireTime()
          Returns quote expiration time
 String getAskId()
          Returns ask quote id
 String getAskOriginator()
          Returns name of quote source
 String getAskQuoteCondition()
          Returns quote condition, Possible values: A active B closed
 int getAskQuoteType()
          Returns quote Type.
 String getBidCurrency()
          Returns dealt currency, when field empty dealt currency is a left currency of quote symbol
 double getBidEntrySize()
          Returns quote liquidity, impressed in dealt currency, when field is missed any order quantity possible
 UTCDate getBidExpireDate()
          Returns quote expiration date
 UTCTimeOnly getBidExpireTime()
          Returns quote expiration time
 String getBidId()
          Returns bid quote id
 String getBidOriginator()
          Returns name of quote source
 String getBidQuoteCondition()
          Returns quote condition, Possible values: A active B closed
 int getBidQuoteType()
          Returns quote Type.
 Date getCreationTime()
          Obtains entity creation time.
 String getDesc()
          Obtains entity description.
 Date getModificationTime()
          Obtains entity modification time.
 String getName()
          Obtains entity name.
 com.fxcm.entity.IPK getPK()
          Obtains entity Primary key.
 com.fxcm.entity.IStatus getStatus()
          Obtains entity status.
 int getTickVolume()
           
 boolean isDeleted()
          Determines whether object is deleted.
 boolean isNew()
          Determines whether object is new.
 long lastTouch()
          Return the time when the entity was last updated from db
 void printState(PrintStream aOut)
          Deprecated. printState is no longer supported. Use toString instead.
 void reset()
          Reset object state to default values.
 void setAskClose(double aAskClose)
          Updates closing ask price.
 void setAskCurrency(String aAskCurrency)
          Sets dealt currency, when field empty dealt currency is a left currency of quote symbol
 void setAskEntrySize(double aAskEntrySize)
          Sets quote liquidity, impressed in dealt currency, when field is missed any order quantity possible
 void setAskExpireDate(UTCDate aAskExpireDate)
          Sets quote expiration date
 void setAskExpireTime(UTCTimeOnly aAskExpireTime)
          Sets quote expiration time
 void setAskHigh(double aAskHigh)
          Updates high ask price.
 void setAskId(String aAskId)
          Sets ask quote id
 void setAskLow(double aAskLow)
          Updates low ask price.
 void setAskOpen(double aAskOpen)
          Updates opening ask price.
 void setAskOriginator(String aAskOriginator)
          Sets name of quote source
 void setAskQuoteCondition(String aAskQuoteCondition)
          Sets quote condition, Possible values: A active B closed
 void setAskQuoteType(int aAskQuoteType)
          Sets quote Type.
 void setBidClose(double aBidClose)
          Updates closing bid price.
 void setBidCurrency(String aBidCurrency)
          Sets dealt currency, when field empty dealt currency is a left currency of quote symbol
 void setBidEntrySize(double aBidEntrySize)
          Sets quote liquidity, impressed in dealt currency, when field is missed any order quantity possible
 void setBidExpireDate(UTCDate aBidExpireDate)
          Sets quote expiration date
 void setBidExpireTime(UTCTimeOnly aBidExpireTime)
          Sets quote expiration time
 void setBidHigh(double aBidHigh)
          Updates high bid price.
 void setBidId(String aBidId)
          Sets bid quote id
 void setBidLow(double aBidLow)
          Updates low bid price.
 void setBidOpen(double aBidOpen)
          Updates opening bid price.
 void setBidOriginator(String aBidOriginator)
          Sets name of quote source
 void setBidQuoteCondition(String aBidQuoteCondition)
          Sets quote condition, Possible values: A active B closed
 void setBidQuoteType(int aBidQuoteType)
          Sets quote Type.
 void setCreationTime(Date aTime)
          Updates Entity creation time.
 void setDate(UTCDate aDate)
          Updates snapshot date.
 void setDeleted()
          Sets entity status as deleted.
 void setDesc(String aDesc)
          Updates Entity description.
 void setFXCMTimingInterval(IFXCMTimingInterval aInterval)
          Updates candle timing interval.
 void setHigh(double aHigh)
          Updates trading session high price.
 void setInstrument(Instrument aInstrument)
          Updates snapshot currency.
 void setLow(double aLow)
          Updates trading session low price.
 void setModificationTime(Date aTime)
          Updates Entity modification time.
 void setName(String aName)
          Updates Entity name.
 void setNew()
          Sets entity status as new.
 void setPK(com.fxcm.entity.IPK aPk)
          Updates Entity Primary Key.
 void setStatus(com.fxcm.entity.IStatus aStatus)
          Updates Entity status.
 void setTickVolume(int aTickVolume)
          Update period tick volume.
 void setTime(UTCTimeOnly aTime)
          Updates snapshot time.
 void setTradingSessionID(String aTradingSessionID)
          Updates Trading Session ID.
 void setTradingSessionSubID(String aTradingSessionSubID)
          Updates Trading Session sub ID.
 IMessage toMessage(String aSID, IMessageFactory aFactory)
          Converts object to message.
 IMessage toMessage(String aSID, String aTradingSessionID, String aTradingSessionSubID, String aRequestID, int aMDEntryTypeSet, IMessageFactory aFactory)
          Converts object to IMessage.
 String toString()
           
 void touch()
          Sets the time when the entity was last updated from db.
 
Methods inherited from class com.fxcm.fix.pretrade.MarketDataSnapshot
equals, getAskClose, getAskHigh, getAskLow, getAskOpen, getBidClose, getBidHigh, getBidLow, getBidOpen, getCloseTimestamp, getDate, getFXCMContinuousFlag, getFXCMMsgID, getFXCMTimingInterval, getHigh, getInstrument, getLow, getMakingTime, getMDReqID, getOpenTimestamp, getOpenTimestampRef, getOriginator, getPriceStream, getQuoteID, getRequestID, getTickTime, getTime, getTradingSessionID, getTradingSessionSubID, getType, hashCode, isComplete, isTradeable, isValid, setComplete, setFXCMContinuousFlag, setFXCMMsgID, setMDReqID, setOpenTimestamp, setOriginator, setPriceStream, setQuoteID, setTradeable, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.fxcm.entity.IEntity
getType, isValid
 

Constructor Detail

MarketDataSnapshot

public MarketDataSnapshot()

MarketDataSnapshot

public MarketDataSnapshot(MarketDataSnapshot aMarketDataSnapshot)
Method Detail

lastTouch

public long lastTouch()
Return the time when the entity was last updated from db

Specified by:
lastTouch in interface com.fxcm.entity.IEntity
Returns:
touch time

touch

public void touch()
Sets the time when the entity was last updated from db.

Specified by:
touch in interface com.fxcm.entity.IEntity

setTradingSessionID

public void setTradingSessionID(String aTradingSessionID)
Description copied from class: MarketDataSnapshot
Updates Trading Session ID.

"FXCM" by default.

Overrides:
setTradingSessionID in class MarketDataSnapshot

setTradingSessionSubID

public void setTradingSessionSubID(String aTradingSessionSubID)
Description copied from class: MarketDataSnapshot
Updates Trading Session sub ID.

Use that as dealing desk name. Empty by default.

Overrides:
setTradingSessionSubID in class MarketDataSnapshot

setInstrument

public void setInstrument(Instrument aInstrument)
Description copied from class: MarketDataSnapshot
Updates snapshot currency.

Overrides:
setInstrument in class MarketDataSnapshot

setTime

public void setTime(UTCTimeOnly aTime)
Description copied from class: MarketDataSnapshot
Updates snapshot time.

"00:00:00" by default.

Overrides:
setTime in class MarketDataSnapshot
Parameters:
aTime - UTC time

setDate

public void setDate(UTCDate aDate)
Description copied from class: MarketDataSnapshot
Updates snapshot date.

Current date by default.

Overrides:
setDate in class MarketDataSnapshot
Parameters:
aDate - UTC date

setFXCMTimingInterval

public void setFXCMTimingInterval(IFXCMTimingInterval aInterval)
Description copied from class: MarketDataSnapshot
Updates candle timing interval.

Tick by default.

Overrides:
setFXCMTimingInterval in class MarketDataSnapshot
Parameters:
aInterval - candle timing interval

setAskLow

public void setAskLow(double aAskLow)
Updates low ask price.

0.00 by default.

Specified by:
setAskLow in class MarketDataSnapshot
Parameters:
aAskLow - AskLow

setAskHigh

public void setAskHigh(double aAskHigh)
Updates high ask price.

0.00 by default.

Specified by:
setAskHigh in class MarketDataSnapshot
Parameters:
aAskHigh - high ask price

setAskOpen

public void setAskOpen(double aAskOpen)
Updates opening ask price.

Ask price for ticks.0.00 by default.

Specified by:
setAskOpen in class MarketDataSnapshot
Parameters:
aAskOpen - opening ask price

setAskClose

public void setAskClose(double aAskClose)
Updates closing ask price.

0.00 by default.

Specified by:
setAskClose in class MarketDataSnapshot
Parameters:
aAskClose - closing ask price

setLow

public void setLow(double aLow)
Updates trading session low price.

0.00 by default.

Specified by:
setLow in class MarketDataSnapshot
Parameters:
aLow - low price

setHigh

public void setHigh(double aHigh)
Updates trading session high price.

0.00 by default.

Specified by:
setHigh in class MarketDataSnapshot
Parameters:
aHigh - high price

setBidLow

public void setBidLow(double aBidLow)
Updates low bid price.

0.00 by default.

Specified by:
setBidLow in class MarketDataSnapshot
Parameters:
aBidLow - low bid price

setBidHigh

public void setBidHigh(double aBidHigh)
Updates high bid price.

0.00 by default.

Specified by:
setBidHigh in class MarketDataSnapshot
Parameters:
aBidHigh - high bid price

setBidOpen

public void setBidOpen(double aBidOpen)
Updates opening bid price.

Bid price for ticks. 0.00 by default.

Specified by:
setBidOpen in class MarketDataSnapshot
Parameters:
aBidOpen - opening bid price

setBidClose

public void setBidClose(double aBidClose)
Updates closing bid price.

0.00 by default.

Specified by:
setBidClose in class MarketDataSnapshot
Parameters:
aBidClose - closing bid price

toMessage

public IMessage toMessage(String aSID,
                          IMessageFactory aFactory)
Converts object to message.


 

Specified by:
toMessage in interface ITransportable
Overrides:
toMessage in class MarketDataSnapshot
Parameters:
aSID - User session ID
aFactory - message factory to create message objects
Returns:
Can be null in case of errors

toMessage

public IMessage toMessage(String aSID,
                          String aTradingSessionID,
                          String aTradingSessionSubID,
                          String aRequestID,
                          int aMDEntryTypeSet,
                          IMessageFactory aFactory)
Converts object to IMessage.


 

Specified by:
toMessage in interface ITransportable
Specified by:
toMessage in class MarketDataSnapshot
Parameters:
aSID - user session ID
aTradingSessionID - Trading Session ID, to alternate a value from object state
aTradingSessionSubID - Trading Session Sub ID, to alternate a value from object state
aRequestID - Request ID, to alternate a value from object state
aFactory - message factory that is in use to process
aMDEntryTypeSet - Set of options for message creation, reserved
Returns:
new messge create or null if creation fails

reset

public void reset()
Reset object state to default values.

Overrides:
reset in class MarketDataSnapshot

fill

public boolean fill(IMessage aMsg)
Recreates object state from given message.

Specified by:
fill in interface ITransportable
Specified by:
fill in class MarketDataSnapshot
Parameters:
aMsg - orignal message to fill out object state
Returns:
true when valid object state is generated and false in case of errors

getCreationTime

public Date getCreationTime()
Obtains entity creation time.

Specified by:
getCreationTime in interface com.fxcm.entity.IEntity
Returns:
Entity creation time (based on OpenTimestamp)

getDesc

public String getDesc()
Obtains entity description.

Specified by:
getDesc in interface com.fxcm.entity.IEntity
Returns:
Entity description(based on entity PK)

getModificationTime

public Date getModificationTime()
Obtains entity modification time.

Specified by:
getModificationTime in interface com.fxcm.entity.IEntity
Returns:
Entity creation time (based on OpenTimestamp)

getName

public String getName()
Obtains entity name.

Specified by:
getName in interface com.fxcm.entity.IEntity
Overrides:
getName in class MarketDataSnapshot
Returns:
Entity name (based on entity PK)

getPK

public com.fxcm.entity.IPK getPK()
Obtains entity Primary key.

Specified by:
getPK in interface com.fxcm.entity.IEntity
Returns:
Entity Primary key (concatenation of TradingSessionIDs, symbol, interval and opening time)

getStatus

public com.fxcm.entity.IStatus getStatus()
Obtains entity status.

Not applicable for the MarketDataSnapshot.

Specified by:
getStatus in interface com.fxcm.entity.IEntity
Returns:
null

setCreationTime

public void setCreationTime(Date aTime)
Updates Entity creation time.

Not applicable for the MarketDataSnapshot.

Specified by:
setCreationTime in interface com.fxcm.entity.IEntity

setDesc

public void setDesc(String aDesc)
Updates Entity description.

Not applicable for the MarketDataSnapshot.

Specified by:
setDesc in interface com.fxcm.entity.IEntity

setModificationTime

public void setModificationTime(Date aTime)
Updates Entity modification time.

Not applicable for the MarketDataSnapshot.

Specified by:
setModificationTime in interface com.fxcm.entity.IEntity

setName

public void setName(String aName)
Updates Entity name.

Not applicable for the MarketDataSnapshot.

Specified by:
setName in interface com.fxcm.entity.IEntity

setPK

public void setPK(com.fxcm.entity.IPK aPk)
Updates Entity Primary Key.

Not applicable for the MarketDataSnapshot.

Specified by:
setPK in interface com.fxcm.entity.IEntity

setStatus

public void setStatus(com.fxcm.entity.IStatus aStatus)
               throws com.fxcm.GenericException
Updates Entity status.

Not applicable for the MarketDataSnapshot.

Specified by:
setStatus in interface com.fxcm.entity.IEntity
Throws:
com.fxcm.GenericException

printState

public void printState(PrintStream aOut)
Deprecated. printState is no longer supported. Use toString instead.

Prints object state to given print stream.

Specified by:
printState in interface com.fxcm.entity.IEntity
Parameters:
aOut - stream to print out

isNew

public boolean isNew()
Determines whether object is new.

Specified by:
isNew in interface com.fxcm.entity.IEntity
Returns:
true always

setNew

public void setNew()
Sets entity status as new.

Not applicable for the MarketDataSnapshot.

Specified by:
setNew in interface com.fxcm.entity.IEntity

isDeleted

public boolean isDeleted()
Determines whether object is deleted.

Specified by:
isDeleted in interface com.fxcm.entity.IEntity
Returns:
false always

setDeleted

public void setDeleted()
Sets entity status as deleted.

Not applicable for the MarketDataSnapshot.

Specified by:
setDeleted in interface com.fxcm.entity.IEntity

getBidId

public String getBidId()
Returns bid quote id

Specified by:
getBidId in class MarketDataSnapshot
Returns:
bid quote id

setBidId

public void setBidId(String aBidId)
Sets bid quote id

Specified by:
setBidId in class MarketDataSnapshot
Parameters:
aBidId - bid quote id

getAskId

public String getAskId()
Returns ask quote id

Specified by:
getAskId in class MarketDataSnapshot
Returns:
ask quote id

setAskId

public void setAskId(String aAskId)
Sets ask quote id

Specified by:
setAskId in class MarketDataSnapshot
Parameters:
aAskId - ask quote id

getBidQuoteCondition

public String getBidQuoteCondition()
Returns quote condition, Possible values: A active B closed

Specified by:
getBidQuoteCondition in class MarketDataSnapshot
Returns:
quote condition, Possible values: A active B closed

setBidQuoteCondition

public void setBidQuoteCondition(String aBidQuoteCondition)
Sets quote condition, Possible values: A active B closed

Specified by:
setBidQuoteCondition in class MarketDataSnapshot
Parameters:
aBidQuoteCondition - quote condition, Possible values: A active B closed

getBidQuoteType

public int getBidQuoteType()
Returns quote Type. Possible values "0" - Indicative, "1" - Tradeable

Specified by:
getBidQuoteType in class MarketDataSnapshot
Returns:
quote Type. Possible values "0" - Indicative, "1" - Tradeable

setBidQuoteType

public void setBidQuoteType(int aBidQuoteType)
Sets quote Type. Possible values "0" - Indicative, "1" - Tradeable

Specified by:
setBidQuoteType in class MarketDataSnapshot
Parameters:
aBidQuoteType - quote Type. Possible values "0" - Indicative, "1" - Tradeable

getBidExpireDate

public UTCDate getBidExpireDate()
Returns quote expiration date

Specified by:
getBidExpireDate in class MarketDataSnapshot
Returns:
quote expiration date

setBidExpireDate

public void setBidExpireDate(UTCDate aBidExpireDate)
Sets quote expiration date

Specified by:
setBidExpireDate in class MarketDataSnapshot
Parameters:
aBidExpireDate - quote expiration date

getBidExpireTime

public UTCTimeOnly getBidExpireTime()
Returns quote expiration time

Specified by:
getBidExpireTime in class MarketDataSnapshot
Returns:
quote expiration time

setBidExpireTime

public void setBidExpireTime(UTCTimeOnly aBidExpireTime)
Sets quote expiration time

Specified by:
setBidExpireTime in class MarketDataSnapshot
Parameters:
aBidExpireTime - quote expiration time

getBidOriginator

public String getBidOriginator()
Returns name of quote source

Specified by:
getBidOriginator in class MarketDataSnapshot
Returns:
name of quote source

setBidOriginator

public void setBidOriginator(String aBidOriginator)
Sets name of quote source

Specified by:
setBidOriginator in class MarketDataSnapshot
Parameters:
aBidOriginator - name of quote source

getBidCurrency

public String getBidCurrency()
Returns dealt currency, when field empty dealt currency is a left currency of quote symbol

Specified by:
getBidCurrency in class MarketDataSnapshot
Returns:
dealt currency, when field empty dealt currency is a left currency of quote symbol

setBidCurrency

public void setBidCurrency(String aBidCurrency)
Sets dealt currency, when field empty dealt currency is a left currency of quote symbol

Specified by:
setBidCurrency in class MarketDataSnapshot
Parameters:
aBidCurrency - dealt currency, when field empty dealt currency is a left currency of quote symbol

getBidEntrySize

public double getBidEntrySize()
Returns quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

Specified by:
getBidEntrySize in class MarketDataSnapshot
Returns:
quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

setBidEntrySize

public void setBidEntrySize(double aBidEntrySize)
Sets quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

Specified by:
setBidEntrySize in class MarketDataSnapshot
Parameters:
aBidEntrySize - quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

getAskQuoteCondition

public String getAskQuoteCondition()
Returns quote condition, Possible values: A active B closed

Specified by:
getAskQuoteCondition in class MarketDataSnapshot
Returns:
quote condition, Possible values: A active B closed

setAskQuoteCondition

public void setAskQuoteCondition(String aAskQuoteCondition)
Sets quote condition, Possible values: A active B closed

Specified by:
setAskQuoteCondition in class MarketDataSnapshot
Parameters:
aAskQuoteCondition - quote condition, Possible values: A active B closed

getAskQuoteType

public int getAskQuoteType()
Returns quote Type. Possible values "0" - Indicative, "1" - Tradeable

Specified by:
getAskQuoteType in class MarketDataSnapshot
Returns:
quote Type. Possible values "0" - Indicative, "1" - Tradeable

setAskQuoteType

public void setAskQuoteType(int aAskQuoteType)
Sets quote Type. Possible values "0" - Indicative, "1" - Tradeable

Specified by:
setAskQuoteType in class MarketDataSnapshot
Parameters:
aAskQuoteType - quote Type. Possible values "0" - Indicative, "1" - Tradeable

getAskExpireDate

public UTCDate getAskExpireDate()
Returns quote expiration date

Specified by:
getAskExpireDate in class MarketDataSnapshot
Returns:
quote expiration date

setAskExpireDate

public void setAskExpireDate(UTCDate aAskExpireDate)
Sets quote expiration date

Specified by:
setAskExpireDate in class MarketDataSnapshot
Parameters:
aAskExpireDate - quote expiration date

getAskExpireTime

public UTCTimeOnly getAskExpireTime()
Returns quote expiration time

Specified by:
getAskExpireTime in class MarketDataSnapshot
Returns:
quote expiration time

setAskExpireTime

public void setAskExpireTime(UTCTimeOnly aAskExpireTime)
Sets quote expiration time

Specified by:
setAskExpireTime in class MarketDataSnapshot
Parameters:
aAskExpireTime - quote expiration time

getAskOriginator

public String getAskOriginator()
Returns name of quote source

Specified by:
getAskOriginator in class MarketDataSnapshot
Returns:
name of quote source

setAskOriginator

public void setAskOriginator(String aAskOriginator)
Sets name of quote source

Specified by:
setAskOriginator in class MarketDataSnapshot
Parameters:
aAskOriginator - name of quote source

getAskCurrency

public String getAskCurrency()
Returns dealt currency, when field empty dealt currency is a left currency of quote symbol

Specified by:
getAskCurrency in class MarketDataSnapshot
Returns:
dealt currency, when field empty dealt currency is a left currency of quote symbol

setAskCurrency

public void setAskCurrency(String aAskCurrency)
Sets dealt currency, when field empty dealt currency is a left currency of quote symbol

Specified by:
setAskCurrency in class MarketDataSnapshot
Parameters:
aAskCurrency - dealt currency, when field empty dealt currency is a left currency of quote symbol

getAskEntrySize

public double getAskEntrySize()
Returns quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

Specified by:
getAskEntrySize in class MarketDataSnapshot
Returns:
quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

setAskEntrySize

public void setAskEntrySize(double aAskEntrySize)
Sets quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

Specified by:
setAskEntrySize in class MarketDataSnapshot
Parameters:
aAskEntrySize - quote liquidity, impressed in dealt currency, when field is missed any order quantity possible

getTickVolume

public int getTickVolume()
Overrides:
getTickVolume in class MarketDataSnapshot

setTickVolume

public void setTickVolume(int aTickVolume)
Description copied from class: MarketDataSnapshot
Update period tick volume.

Specified by:
setTickVolume in class MarketDataSnapshot

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 FXCM, LLC. All Rights Reserved.