Initial
This commit is contained in:
BIN
ClassGen/Debug/classgen.exe
Normal file
BIN
ClassGen/Debug/classgen.exe
Normal file
Binary file not shown.
BIN
ClassGen/Debug/classgen.pdb
Normal file
BIN
ClassGen/Debug/classgen.pdb
Normal file
Binary file not shown.
BIN
ClassGen/Debug/vc60.idb
Normal file
BIN
ClassGen/Debug/vc60.idb
Normal file
Binary file not shown.
BIN
ClassGen/Debug/vc60.pdb
Normal file
BIN
ClassGen/Debug/vc60.pdb
Normal file
Binary file not shown.
628
ClassGen/Historic.cs
Normal file
628
ClassGen/Historic.cs
Normal file
@@ -0,0 +1,628 @@
|
||||
using System;
|
||||
|
||||
|
||||
namespace ZBI.Risk.Server.Mapped
|
||||
{
|
||||
[Serializable]
|
||||
public class Historic
|
||||
{
|
||||
private DateTime tradeDate;
|
||||
private string tradeDateTxt;
|
||||
private string portfolio;
|
||||
private string subPortfolio;
|
||||
private string ticker;
|
||||
private string tickerDesc;
|
||||
private string uticker;
|
||||
private string instrument;
|
||||
private decimal contractSize;
|
||||
private string hedgeIndex;
|
||||
private string hedgeSector;
|
||||
private string area;
|
||||
private string areaSector;
|
||||
private decimal yClose;
|
||||
private decimal utickerClose;
|
||||
private decimal yUtickerClose;
|
||||
private decimal delta;
|
||||
private decimal yDelta;
|
||||
private decimal hedgeBeta;
|
||||
private decimal areaBeta;
|
||||
private decimal sectorBeta;
|
||||
private decimal groupBeta;
|
||||
private decimal qty;
|
||||
private decimal yQty;
|
||||
private decimal qtyChange;
|
||||
private decimal hedgeClose;
|
||||
private decimal hedgePerc;
|
||||
private decimal areaClose;
|
||||
private decimal areaPerc;
|
||||
private decimal sectorClose;
|
||||
private decimal sectorPerc;
|
||||
private decimal mktValue;
|
||||
private decimal yMktValue;
|
||||
private decimal exposure;
|
||||
private decimal yExposure;
|
||||
private decimal hbExposure;
|
||||
private decimal yHbExposure;
|
||||
private decimal abExposure;
|
||||
private decimal yAbExposure;
|
||||
private decimal sbExposure;
|
||||
private decimal ySbExposure;
|
||||
private decimal pnl;
|
||||
private decimal pnlPerc;
|
||||
private decimal priceChange;
|
||||
private decimal priceChangePerc;
|
||||
private decimal priceChangeAmt;
|
||||
private decimal sectorAlphaPerc;
|
||||
private decimal groupAlphaPerc;
|
||||
private decimal areaAlphaPerc;
|
||||
private decimal hedgeAlphaPerc;
|
||||
private decimal areaPnlAmt;
|
||||
private decimal sectorPnlAmt;
|
||||
private decimal sectorAlphaAmt;
|
||||
private decimal groupAlphaAmt;
|
||||
private decimal areaAlphaAmt;
|
||||
private decimal hedgeAlphaAmt;
|
||||
private decimal abReturnAmt;
|
||||
private decimal abReturnPerc;
|
||||
private decimal altIndexReturnPerc;
|
||||
private decimal altIndexReturnAmt;
|
||||
private decimal indexBetaAdjPerc;
|
||||
private decimal indexBetaAdjAmt;
|
||||
private decimal intradayPerc;
|
||||
private decimal intradayAmt;
|
||||
private decimal optionalityPerc;
|
||||
private decimal optionalityAmt;
|
||||
private string currency;
|
||||
private decimal baseClose;
|
||||
private decimal yBaseClose;
|
||||
private decimal fxPerc;
|
||||
private decimal fxAmt;
|
||||
private decimal fxRate;
|
||||
private decimal yFxRate;
|
||||
private string exposureView;
|
||||
private string marketView;
|
||||
private string callPut;
|
||||
private int daysExpire;
|
||||
private decimal strikePrice;
|
||||
private string associate;
|
||||
private bool ipo;
|
||||
private decimal ratio;
|
||||
private bool exported;
|
||||
private string source;
|
||||
private decimal vwap;
|
||||
private decimal vwapPnl;
|
||||
private decimal adh;
|
||||
private decimal aac;
|
||||
private decimal azap;
|
||||
private DateTime goAround;
|
||||
private decimal alphaGoAround;
|
||||
private decimal alphaReal;
|
||||
private decimal alphaUnreal;
|
||||
private decimal pnlReal;
|
||||
private decimal pnlUnreal;
|
||||
private decimal cashFlow;
|
||||
private decimal betaCashFlow;
|
||||
private DateTime lastTradeDate;
|
||||
private decimal lastTradeQty;
|
||||
private decimal enterpriseValue;
|
||||
private decimal mktCap;
|
||||
private decimal wgtAve;
|
||||
private decimal volume;
|
||||
private long rowID;
|
||||
public DateTime TradeDate
|
||||
{
|
||||
get{return tradeDate;}
|
||||
set{tradeDate=value;}
|
||||
}
|
||||
public string TradeDateTxt
|
||||
{
|
||||
get{return tradeDateTxt;}
|
||||
set{tradeDateTxt=value;}
|
||||
}
|
||||
public string Portfolio
|
||||
{
|
||||
get{return portfolio;}
|
||||
set{portfolio=value;}
|
||||
}
|
||||
public string SubPortfolio
|
||||
{
|
||||
get{return subPortfolio;}
|
||||
set{subPortfolio=value;}
|
||||
}
|
||||
public string Ticker
|
||||
{
|
||||
get{return ticker;}
|
||||
set{ticker=value;}
|
||||
}
|
||||
public string TickerDesc
|
||||
{
|
||||
get{return tickerDesc;}
|
||||
set{tickerDesc=value;}
|
||||
}
|
||||
public string Uticker
|
||||
{
|
||||
get{return uticker;}
|
||||
set{uticker=value;}
|
||||
}
|
||||
public string Instrument
|
||||
{
|
||||
get{return instrument;}
|
||||
set{instrument=value;}
|
||||
}
|
||||
public decimal ContractSize
|
||||
{
|
||||
get{return contractSize;}
|
||||
set{contractSize=value;}
|
||||
}
|
||||
public string HedgeIndex
|
||||
{
|
||||
get{return hedgeIndex;}
|
||||
set{hedgeIndex=value;}
|
||||
}
|
||||
public string HedgeSector
|
||||
{
|
||||
get{return hedgeSector;}
|
||||
set{hedgeSector=value;}
|
||||
}
|
||||
public string Area
|
||||
{
|
||||
get{return area;}
|
||||
set{area=value;}
|
||||
}
|
||||
public string AreaSector
|
||||
{
|
||||
get{return areaSector;}
|
||||
set{areaSector=value;}
|
||||
}
|
||||
public decimal YClose
|
||||
{
|
||||
get{return yClose;}
|
||||
set{yClose=value;}
|
||||
}
|
||||
public decimal UtickerClose
|
||||
{
|
||||
get{return utickerClose;}
|
||||
set{utickerClose=value;}
|
||||
}
|
||||
public decimal YUtickerClose
|
||||
{
|
||||
get{return yUtickerClose;}
|
||||
set{yUtickerClose=value;}
|
||||
}
|
||||
public decimal Delta
|
||||
{
|
||||
get{return delta;}
|
||||
set{delta=value;}
|
||||
}
|
||||
public decimal YDelta
|
||||
{
|
||||
get{return yDelta;}
|
||||
set{yDelta=value;}
|
||||
}
|
||||
public decimal HedgeBeta
|
||||
{
|
||||
get{return hedgeBeta;}
|
||||
set{hedgeBeta=value;}
|
||||
}
|
||||
public decimal AreaBeta
|
||||
{
|
||||
get{return areaBeta;}
|
||||
set{areaBeta=value;}
|
||||
}
|
||||
public decimal SectorBeta
|
||||
{
|
||||
get{return sectorBeta;}
|
||||
set{sectorBeta=value;}
|
||||
}
|
||||
public decimal GroupBeta
|
||||
{
|
||||
get{return groupBeta;}
|
||||
set{groupBeta=value;}
|
||||
}
|
||||
public decimal Qty
|
||||
{
|
||||
get{return qty;}
|
||||
set{qty=value;}
|
||||
}
|
||||
public decimal YQty
|
||||
{
|
||||
get{return yQty;}
|
||||
set{yQty=value;}
|
||||
}
|
||||
public decimal QtyChange
|
||||
{
|
||||
get{return qtyChange;}
|
||||
set{qtyChange=value;}
|
||||
}
|
||||
public decimal HedgeClose
|
||||
{
|
||||
get{return hedgeClose;}
|
||||
set{hedgeClose=value;}
|
||||
}
|
||||
public decimal HedgePerc
|
||||
{
|
||||
get{return hedgePerc;}
|
||||
set{hedgePerc=value;}
|
||||
}
|
||||
public decimal AreaClose
|
||||
{
|
||||
get{return areaClose;}
|
||||
set{areaClose=value;}
|
||||
}
|
||||
public decimal AreaPerc
|
||||
{
|
||||
get{return areaPerc;}
|
||||
set{areaPerc=value;}
|
||||
}
|
||||
public decimal SectorClose
|
||||
{
|
||||
get{return sectorClose;}
|
||||
set{sectorClose=value;}
|
||||
}
|
||||
public decimal SectorPerc
|
||||
{
|
||||
get{return sectorPerc;}
|
||||
set{sectorPerc=value;}
|
||||
}
|
||||
public decimal MktValue
|
||||
{
|
||||
get{return mktValue;}
|
||||
set{mktValue=value;}
|
||||
}
|
||||
public decimal YMktValue
|
||||
{
|
||||
get{return yMktValue;}
|
||||
set{yMktValue=value;}
|
||||
}
|
||||
public decimal Exposure
|
||||
{
|
||||
get{return exposure;}
|
||||
set{exposure=value;}
|
||||
}
|
||||
public decimal YExposure
|
||||
{
|
||||
get{return yExposure;}
|
||||
set{yExposure=value;}
|
||||
}
|
||||
public decimal HbExposure
|
||||
{
|
||||
get{return hbExposure;}
|
||||
set{hbExposure=value;}
|
||||
}
|
||||
public decimal YHbExposure
|
||||
{
|
||||
get{return yHbExposure;}
|
||||
set{yHbExposure=value;}
|
||||
}
|
||||
public decimal AbExposure
|
||||
{
|
||||
get{return abExposure;}
|
||||
set{abExposure=value;}
|
||||
}
|
||||
public decimal YAbExposure
|
||||
{
|
||||
get{return yAbExposure;}
|
||||
set{yAbExposure=value;}
|
||||
}
|
||||
public decimal SbExposure
|
||||
{
|
||||
get{return sbExposure;}
|
||||
set{sbExposure=value;}
|
||||
}
|
||||
public decimal YSbExposure
|
||||
{
|
||||
get{return ySbExposure;}
|
||||
set{ySbExposure=value;}
|
||||
}
|
||||
public decimal Pnl
|
||||
{
|
||||
get{return pnl;}
|
||||
set{pnl=value;}
|
||||
}
|
||||
public decimal PnlPerc
|
||||
{
|
||||
get{return pnlPerc;}
|
||||
set{pnlPerc=value;}
|
||||
}
|
||||
public decimal PriceChange
|
||||
{
|
||||
get{return priceChange;}
|
||||
set{priceChange=value;}
|
||||
}
|
||||
public decimal PriceChangePerc
|
||||
{
|
||||
get{return priceChangePerc;}
|
||||
set{priceChangePerc=value;}
|
||||
}
|
||||
public decimal PriceChangeAmt
|
||||
{
|
||||
get{return priceChangeAmt;}
|
||||
set{priceChangeAmt=value;}
|
||||
}
|
||||
public decimal SectorAlphaPerc
|
||||
{
|
||||
get{return sectorAlphaPerc;}
|
||||
set{sectorAlphaPerc=value;}
|
||||
}
|
||||
public decimal GroupAlphaPerc
|
||||
{
|
||||
get{return groupAlphaPerc;}
|
||||
set{groupAlphaPerc=value;}
|
||||
}
|
||||
public decimal AreaAlphaPerc
|
||||
{
|
||||
get{return areaAlphaPerc;}
|
||||
set{areaAlphaPerc=value;}
|
||||
}
|
||||
public decimal HedgeAlphaPerc
|
||||
{
|
||||
get{return hedgeAlphaPerc;}
|
||||
set{hedgeAlphaPerc=value;}
|
||||
}
|
||||
public decimal AreaPnlAmt
|
||||
{
|
||||
get{return areaPnlAmt;}
|
||||
set{areaPnlAmt=value;}
|
||||
}
|
||||
public decimal SectorPnlAmt
|
||||
{
|
||||
get{return sectorPnlAmt;}
|
||||
set{sectorPnlAmt=value;}
|
||||
}
|
||||
public decimal SectorAlphaAmt
|
||||
{
|
||||
get{return sectorAlphaAmt;}
|
||||
set{sectorAlphaAmt=value;}
|
||||
}
|
||||
public decimal GroupAlphaAmt
|
||||
{
|
||||
get{return groupAlphaAmt;}
|
||||
set{groupAlphaAmt=value;}
|
||||
}
|
||||
public decimal AreaAlphaAmt
|
||||
{
|
||||
get{return areaAlphaAmt;}
|
||||
set{areaAlphaAmt=value;}
|
||||
}
|
||||
public decimal HedgeAlphaAmt
|
||||
{
|
||||
get{return hedgeAlphaAmt;}
|
||||
set{hedgeAlphaAmt=value;}
|
||||
}
|
||||
public decimal AbReturnAmt
|
||||
{
|
||||
get{return abReturnAmt;}
|
||||
set{abReturnAmt=value;}
|
||||
}
|
||||
public decimal AbReturnPerc
|
||||
{
|
||||
get{return abReturnPerc;}
|
||||
set{abReturnPerc=value;}
|
||||
}
|
||||
public decimal AltIndexReturnPerc
|
||||
{
|
||||
get{return altIndexReturnPerc;}
|
||||
set{altIndexReturnPerc=value;}
|
||||
}
|
||||
public decimal AltIndexReturnAmt
|
||||
{
|
||||
get{return altIndexReturnAmt;}
|
||||
set{altIndexReturnAmt=value;}
|
||||
}
|
||||
public decimal IndexBetaAdjPerc
|
||||
{
|
||||
get{return indexBetaAdjPerc;}
|
||||
set{indexBetaAdjPerc=value;}
|
||||
}
|
||||
public decimal IndexBetaAdjAmt
|
||||
{
|
||||
get{return indexBetaAdjAmt;}
|
||||
set{indexBetaAdjAmt=value;}
|
||||
}
|
||||
public decimal IntradayPerc
|
||||
{
|
||||
get{return intradayPerc;}
|
||||
set{intradayPerc=value;}
|
||||
}
|
||||
public decimal IntradayAmt
|
||||
{
|
||||
get{return intradayAmt;}
|
||||
set{intradayAmt=value;}
|
||||
}
|
||||
public decimal OptionalityPerc
|
||||
{
|
||||
get{return optionalityPerc;}
|
||||
set{optionalityPerc=value;}
|
||||
}
|
||||
public decimal OptionalityAmt
|
||||
{
|
||||
get{return optionalityAmt;}
|
||||
set{optionalityAmt=value;}
|
||||
}
|
||||
public string Currency
|
||||
{
|
||||
get{return currency;}
|
||||
set{currency=value;}
|
||||
}
|
||||
public decimal BaseClose
|
||||
{
|
||||
get{return baseClose;}
|
||||
set{baseClose=value;}
|
||||
}
|
||||
public decimal YBaseClose
|
||||
{
|
||||
get{return yBaseClose;}
|
||||
set{yBaseClose=value;}
|
||||
}
|
||||
public decimal FxPerc
|
||||
{
|
||||
get{return fxPerc;}
|
||||
set{fxPerc=value;}
|
||||
}
|
||||
public decimal FxAmt
|
||||
{
|
||||
get{return fxAmt;}
|
||||
set{fxAmt=value;}
|
||||
}
|
||||
public decimal FxRate
|
||||
{
|
||||
get{return fxRate;}
|
||||
set{fxRate=value;}
|
||||
}
|
||||
public decimal YFxRate
|
||||
{
|
||||
get{return yFxRate;}
|
||||
set{yFxRate=value;}
|
||||
}
|
||||
public string ExposureView
|
||||
{
|
||||
get{return exposureView;}
|
||||
set{exposureView=value;}
|
||||
}
|
||||
public string MarketView
|
||||
{
|
||||
get{return marketView;}
|
||||
set{marketView=value;}
|
||||
}
|
||||
public string CallPut
|
||||
{
|
||||
get{return callPut;}
|
||||
set{callPut=value;}
|
||||
}
|
||||
public int DaysExpire
|
||||
{
|
||||
get{return daysExpire;}
|
||||
set{daysExpire=value;}
|
||||
}
|
||||
public decimal StrikePrice
|
||||
{
|
||||
get{return strikePrice;}
|
||||
set{strikePrice=value;}
|
||||
}
|
||||
public string Associate
|
||||
{
|
||||
get{return associate;}
|
||||
set{associate=value;}
|
||||
}
|
||||
public bool Ipo
|
||||
{
|
||||
get{return ipo;}
|
||||
set{ipo=value;}
|
||||
}
|
||||
public decimal Ratio
|
||||
{
|
||||
get{return ratio;}
|
||||
set{ratio=value;}
|
||||
}
|
||||
public bool Exported
|
||||
{
|
||||
get{return exported;}
|
||||
set{exported=value;}
|
||||
}
|
||||
public string Source
|
||||
{
|
||||
get{return source;}
|
||||
set{source=value;}
|
||||
}
|
||||
public decimal Vwap
|
||||
{
|
||||
get{return vwap;}
|
||||
set{vwap=value;}
|
||||
}
|
||||
public decimal VwapPnl
|
||||
{
|
||||
get{return vwapPnl;}
|
||||
set{vwapPnl=value;}
|
||||
}
|
||||
public decimal Adh
|
||||
{
|
||||
get{return adh;}
|
||||
set{adh=value;}
|
||||
}
|
||||
public decimal Aac
|
||||
{
|
||||
get{return aac;}
|
||||
set{aac=value;}
|
||||
}
|
||||
public decimal Azap
|
||||
{
|
||||
get{return azap;}
|
||||
set{azap=value;}
|
||||
}
|
||||
public DateTime GoAround
|
||||
{
|
||||
get{return goAround;}
|
||||
set{goAround=value;}
|
||||
}
|
||||
public decimal AlphaGoAround
|
||||
{
|
||||
get{return alphaGoAround;}
|
||||
set{alphaGoAround=value;}
|
||||
}
|
||||
public decimal AlphaReal
|
||||
{
|
||||
get{return alphaReal;}
|
||||
set{alphaReal=value;}
|
||||
}
|
||||
public decimal AlphaUnreal
|
||||
{
|
||||
get{return alphaUnreal;}
|
||||
set{alphaUnreal=value;}
|
||||
}
|
||||
public decimal PnlReal
|
||||
{
|
||||
get{return pnlReal;}
|
||||
set{pnlReal=value;}
|
||||
}
|
||||
public decimal PnlUnreal
|
||||
{
|
||||
get{return pnlUnreal;}
|
||||
set{pnlUnreal=value;}
|
||||
}
|
||||
public decimal CashFlow
|
||||
{
|
||||
get{return cashFlow;}
|
||||
set{cashFlow=value;}
|
||||
}
|
||||
public decimal BetaCashFlow
|
||||
{
|
||||
get{return betaCashFlow;}
|
||||
set{betaCashFlow=value;}
|
||||
}
|
||||
public DateTime LastTradeDate
|
||||
{
|
||||
get{return lastTradeDate;}
|
||||
set{lastTradeDate=value;}
|
||||
}
|
||||
public decimal LastTradeQty
|
||||
{
|
||||
get{return lastTradeQty;}
|
||||
set{lastTradeQty=value;}
|
||||
}
|
||||
public decimal EnterpriseValue
|
||||
{
|
||||
get{return enterpriseValue;}
|
||||
set{enterpriseValue=value;}
|
||||
}
|
||||
public decimal MktCap
|
||||
{
|
||||
get{return mktCap;}
|
||||
set{mktCap=value;}
|
||||
}
|
||||
public decimal WgtAve
|
||||
{
|
||||
get{return wgtAve;}
|
||||
set{wgtAve=value;}
|
||||
}
|
||||
public decimal Volume
|
||||
{
|
||||
get{return volume;}
|
||||
set{volume=value;}
|
||||
}
|
||||
public long RowID
|
||||
{
|
||||
get{return rowID;}
|
||||
set{rowID=value;}
|
||||
}
|
||||
}
|
||||
}
|
||||
951
ClassGen/Historic.java
Normal file
951
ClassGen/Historic.java
Normal file
@@ -0,0 +1,951 @@
|
||||
package zbi.risk.server.vhi.mapped
|
||||
|
||||
|
||||
public class Historic
|
||||
{
|
||||
private Timestamp tradeDate;
|
||||
private String tradeDateTxt;
|
||||
private String portfolio;
|
||||
private String subPortfolio;
|
||||
private String ticker;
|
||||
private String tickerDesc;
|
||||
private String uticker;
|
||||
private String instrument;
|
||||
private float mktCap;
|
||||
private float wgtAve;
|
||||
private float volume;
|
||||
private float contractSize;
|
||||
private String hedgeIndex;
|
||||
private String hedgeSector;
|
||||
private String area;
|
||||
private String areaSector;
|
||||
private float close;
|
||||
private float yClose;
|
||||
private float utickerClose;
|
||||
private float yUtickerClose;
|
||||
private float delta;
|
||||
private float yDelta;
|
||||
private int daysExpire;
|
||||
private float strikePrice;
|
||||
private float hedgeBeta;
|
||||
private float areaBeta;
|
||||
private float sectorBeta;
|
||||
private float groupBeta;
|
||||
private float qty;
|
||||
private float yQty;
|
||||
private float qtyChange;
|
||||
private float hedgeClose;
|
||||
private float hedgePerc;
|
||||
private float areaClose;
|
||||
private float areaPerc;
|
||||
private float sectorClose;
|
||||
private float sectorPerc;
|
||||
private float mktValue;
|
||||
private float yMktValue;
|
||||
private float pnl;
|
||||
private float exposure;
|
||||
private float yExposure;
|
||||
private float hbExposure;
|
||||
private float yHbExposure;
|
||||
private float abExposure;
|
||||
private float yAbExposure;
|
||||
private float sbExposure;
|
||||
private float ySbExposure;
|
||||
private float areaPnlAmt;
|
||||
private float sectorPnlAmt;
|
||||
private float pnlPerc;
|
||||
private float priceChange;
|
||||
private float priceChangePerc;
|
||||
private float priceChangeAmt;
|
||||
private float sectorAlphaPerc;
|
||||
private float groupAlphaPerc;
|
||||
private float areaAlphaPerc;
|
||||
private float sectorAlphaAmt;
|
||||
private float groupAlphaAmt;
|
||||
private float areaAlphaAmt;
|
||||
private float abReturnAmt;
|
||||
private float abReturnPerc;
|
||||
private float intradayPerc;
|
||||
private float intradayAmt;
|
||||
private float optionalityAmt;
|
||||
private float optionalityPerc;
|
||||
private String currency;
|
||||
private float baseClose;
|
||||
private float yBaseClose;
|
||||
private float fxPerc;
|
||||
private float fxAmt;
|
||||
private float fxRate;
|
||||
private float yFxRate;
|
||||
private float altIndexReturnPerc;
|
||||
private float altIndexReturnAmt;
|
||||
private float indexBetaAdjPerc;
|
||||
private float indexBetaAdjAmt;
|
||||
private float vwap;
|
||||
private float vwapPnl;
|
||||
private float hedgeAlphaAmt;
|
||||
private String exposureView;
|
||||
private String marketView;
|
||||
private String callPut;
|
||||
private String [month];
|
||||
private boolean private;
|
||||
private boolean ipo;
|
||||
private float ratio;
|
||||
private String source;
|
||||
private Timestamp goAround;
|
||||
private float adh;
|
||||
private float aac;
|
||||
private float azap;
|
||||
private boolean exported;
|
||||
private float hedgeAlphaPerc;
|
||||
private float alphaGoAround;
|
||||
private float alphaReal;
|
||||
private float alphaUnreal;
|
||||
private float pnlReal;
|
||||
private float pnlUnreal;
|
||||
private float cashFlow;
|
||||
private float betaCashFlow;
|
||||
private Timestamp lastTradeDate;
|
||||
private float lastTradeQty;
|
||||
private float enterpriseValue;
|
||||
private String associate;
|
||||
public Timestamp getTradeDate()
|
||||
{
|
||||
return tradeDate;
|
||||
}
|
||||
public void setTradeDate(Timestamp tradeDate)
|
||||
{
|
||||
this.tradeDate=tradeDate;
|
||||
}
|
||||
public String getTradeDateTxt()
|
||||
{
|
||||
return tradeDateTxt;
|
||||
}
|
||||
public void setTradeDateTxt(String tradeDateTxt)
|
||||
{
|
||||
this.tradeDateTxt=tradeDateTxt;
|
||||
}
|
||||
public String getPortfolio()
|
||||
{
|
||||
return portfolio;
|
||||
}
|
||||
public void setPortfolio(String portfolio)
|
||||
{
|
||||
this.portfolio=portfolio;
|
||||
}
|
||||
public String getSubPortfolio()
|
||||
{
|
||||
return subPortfolio;
|
||||
}
|
||||
public void setSubPortfolio(String subPortfolio)
|
||||
{
|
||||
this.subPortfolio=subPortfolio;
|
||||
}
|
||||
public String getTicker()
|
||||
{
|
||||
return ticker;
|
||||
}
|
||||
public void setTicker(String ticker)
|
||||
{
|
||||
this.ticker=ticker;
|
||||
}
|
||||
public String getTickerDesc()
|
||||
{
|
||||
return tickerDesc;
|
||||
}
|
||||
public void setTickerDesc(String tickerDesc)
|
||||
{
|
||||
this.tickerDesc=tickerDesc;
|
||||
}
|
||||
public String getUticker()
|
||||
{
|
||||
return uticker;
|
||||
}
|
||||
public void setUticker(String uticker)
|
||||
{
|
||||
this.uticker=uticker;
|
||||
}
|
||||
public String getInstrument()
|
||||
{
|
||||
return instrument;
|
||||
}
|
||||
public void setInstrument(String instrument)
|
||||
{
|
||||
this.instrument=instrument;
|
||||
}
|
||||
public float getMktCap()
|
||||
{
|
||||
return mktCap;
|
||||
}
|
||||
public void setMktCap(float mktCap)
|
||||
{
|
||||
this.mktCap=mktCap;
|
||||
}
|
||||
public float getWgtAve()
|
||||
{
|
||||
return wgtAve;
|
||||
}
|
||||
public void setWgtAve(float wgtAve)
|
||||
{
|
||||
this.wgtAve=wgtAve;
|
||||
}
|
||||
public float getVolume()
|
||||
{
|
||||
return volume;
|
||||
}
|
||||
public void setVolume(float volume)
|
||||
{
|
||||
this.volume=volume;
|
||||
}
|
||||
public float getContractSize()
|
||||
{
|
||||
return contractSize;
|
||||
}
|
||||
public void setContractSize(float contractSize)
|
||||
{
|
||||
this.contractSize=contractSize;
|
||||
}
|
||||
public String getHedgeIndex()
|
||||
{
|
||||
return hedgeIndex;
|
||||
}
|
||||
public void setHedgeIndex(String hedgeIndex)
|
||||
{
|
||||
this.hedgeIndex=hedgeIndex;
|
||||
}
|
||||
public String getHedgeSector()
|
||||
{
|
||||
return hedgeSector;
|
||||
}
|
||||
public void setHedgeSector(String hedgeSector)
|
||||
{
|
||||
this.hedgeSector=hedgeSector;
|
||||
}
|
||||
public String getArea()
|
||||
{
|
||||
return area;
|
||||
}
|
||||
public void setArea(String area)
|
||||
{
|
||||
this.area=area;
|
||||
}
|
||||
public String getAreaSector()
|
||||
{
|
||||
return areaSector;
|
||||
}
|
||||
public void setAreaSector(String areaSector)
|
||||
{
|
||||
this.areaSector=areaSector;
|
||||
}
|
||||
public float get[close]()
|
||||
{
|
||||
return [close];
|
||||
}
|
||||
public void set[close](float [close])
|
||||
{
|
||||
this.[close]=[close];
|
||||
}
|
||||
public float getYClose()
|
||||
{
|
||||
return yClose;
|
||||
}
|
||||
public void setYClose(float yClose)
|
||||
{
|
||||
this.yClose=yClose;
|
||||
}
|
||||
public float getUtickerClose()
|
||||
{
|
||||
return utickerClose;
|
||||
}
|
||||
public void setUtickerClose(float utickerClose)
|
||||
{
|
||||
this.utickerClose=utickerClose;
|
||||
}
|
||||
public float getYUtickerClose()
|
||||
{
|
||||
return yUtickerClose;
|
||||
}
|
||||
public void setYUtickerClose(float yUtickerClose)
|
||||
{
|
||||
this.yUtickerClose=yUtickerClose;
|
||||
}
|
||||
public float getDelta()
|
||||
{
|
||||
return delta;
|
||||
}
|
||||
public void setDelta(float delta)
|
||||
{
|
||||
this.delta=delta;
|
||||
}
|
||||
public float getYDelta()
|
||||
{
|
||||
return yDelta;
|
||||
}
|
||||
public void setYDelta(float yDelta)
|
||||
{
|
||||
this.yDelta=yDelta;
|
||||
}
|
||||
public int getDaysExpire()
|
||||
{
|
||||
return daysExpire;
|
||||
}
|
||||
public void setDaysExpire(int daysExpire)
|
||||
{
|
||||
this.daysExpire=daysExpire;
|
||||
}
|
||||
public float getStrikePrice()
|
||||
{
|
||||
return strikePrice;
|
||||
}
|
||||
public void setStrikePrice(float strikePrice)
|
||||
{
|
||||
this.strikePrice=strikePrice;
|
||||
}
|
||||
public float getHedgeBeta()
|
||||
{
|
||||
return hedgeBeta;
|
||||
}
|
||||
public void setHedgeBeta(float hedgeBeta)
|
||||
{
|
||||
this.hedgeBeta=hedgeBeta;
|
||||
}
|
||||
public float getAreaBeta()
|
||||
{
|
||||
return areaBeta;
|
||||
}
|
||||
public void setAreaBeta(float areaBeta)
|
||||
{
|
||||
this.areaBeta=areaBeta;
|
||||
}
|
||||
public float getSectorBeta()
|
||||
{
|
||||
return sectorBeta;
|
||||
}
|
||||
public void setSectorBeta(float sectorBeta)
|
||||
{
|
||||
this.sectorBeta=sectorBeta;
|
||||
}
|
||||
public float getGroupBeta()
|
||||
{
|
||||
return groupBeta;
|
||||
}
|
||||
public void setGroupBeta(float groupBeta)
|
||||
{
|
||||
this.groupBeta=groupBeta;
|
||||
}
|
||||
public float getQty()
|
||||
{
|
||||
return qty;
|
||||
}
|
||||
public void setQty(float qty)
|
||||
{
|
||||
this.qty=qty;
|
||||
}
|
||||
public float getYQty()
|
||||
{
|
||||
return yQty;
|
||||
}
|
||||
public void setYQty(float yQty)
|
||||
{
|
||||
this.yQty=yQty;
|
||||
}
|
||||
public float getQtyChange()
|
||||
{
|
||||
return qtyChange;
|
||||
}
|
||||
public void setQtyChange(float qtyChange)
|
||||
{
|
||||
this.qtyChange=qtyChange;
|
||||
}
|
||||
public float getHedgeClose()
|
||||
{
|
||||
return hedgeClose;
|
||||
}
|
||||
public void setHedgeClose(float hedgeClose)
|
||||
{
|
||||
this.hedgeClose=hedgeClose;
|
||||
}
|
||||
public float getHedgePerc()
|
||||
{
|
||||
return hedgePerc;
|
||||
}
|
||||
public void setHedgePerc(float hedgePerc)
|
||||
{
|
||||
this.hedgePerc=hedgePerc;
|
||||
}
|
||||
public float getAreaClose()
|
||||
{
|
||||
return areaClose;
|
||||
}
|
||||
public void setAreaClose(float areaClose)
|
||||
{
|
||||
this.areaClose=areaClose;
|
||||
}
|
||||
public float getAreaPerc()
|
||||
{
|
||||
return areaPerc;
|
||||
}
|
||||
public void setAreaPerc(float areaPerc)
|
||||
{
|
||||
this.areaPerc=areaPerc;
|
||||
}
|
||||
public float getSectorClose()
|
||||
{
|
||||
return sectorClose;
|
||||
}
|
||||
public void setSectorClose(float sectorClose)
|
||||
{
|
||||
this.sectorClose=sectorClose;
|
||||
}
|
||||
public float getSectorPerc()
|
||||
{
|
||||
return sectorPerc;
|
||||
}
|
||||
public void setSectorPerc(float sectorPerc)
|
||||
{
|
||||
this.sectorPerc=sectorPerc;
|
||||
}
|
||||
public float getMktValue()
|
||||
{
|
||||
return mktValue;
|
||||
}
|
||||
public void setMktValue(float mktValue)
|
||||
{
|
||||
this.mktValue=mktValue;
|
||||
}
|
||||
public float getYMktValue()
|
||||
{
|
||||
return yMktValue;
|
||||
}
|
||||
public void setYMktValue(float yMktValue)
|
||||
{
|
||||
this.yMktValue=yMktValue;
|
||||
}
|
||||
public float getPnl()
|
||||
{
|
||||
return pnl;
|
||||
}
|
||||
public void setPnl(float pnl)
|
||||
{
|
||||
this.pnl=pnl;
|
||||
}
|
||||
public float getExposure()
|
||||
{
|
||||
return exposure;
|
||||
}
|
||||
public void setExposure(float exposure)
|
||||
{
|
||||
this.exposure=exposure;
|
||||
}
|
||||
public float getYExposure()
|
||||
{
|
||||
return yExposure;
|
||||
}
|
||||
public void setYExposure(float yExposure)
|
||||
{
|
||||
this.yExposure=yExposure;
|
||||
}
|
||||
public float getHbExposure()
|
||||
{
|
||||
return hbExposure;
|
||||
}
|
||||
public void setHbExposure(float hbExposure)
|
||||
{
|
||||
this.hbExposure=hbExposure;
|
||||
}
|
||||
public float getYHbExposure()
|
||||
{
|
||||
return yHbExposure;
|
||||
}
|
||||
public void setYHbExposure(float yHbExposure)
|
||||
{
|
||||
this.yHbExposure=yHbExposure;
|
||||
}
|
||||
public float getAbExposure()
|
||||
{
|
||||
return abExposure;
|
||||
}
|
||||
public void setAbExposure(float abExposure)
|
||||
{
|
||||
this.abExposure=abExposure;
|
||||
}
|
||||
public float getYAbExposure()
|
||||
{
|
||||
return yAbExposure;
|
||||
}
|
||||
public void setYAbExposure(float yAbExposure)
|
||||
{
|
||||
this.yAbExposure=yAbExposure;
|
||||
}
|
||||
public float getSbExposure()
|
||||
{
|
||||
return sbExposure;
|
||||
}
|
||||
public void setSbExposure(float sbExposure)
|
||||
{
|
||||
this.sbExposure=sbExposure;
|
||||
}
|
||||
public float getYSbExposure()
|
||||
{
|
||||
return ySbExposure;
|
||||
}
|
||||
public void setYSbExposure(float ySbExposure)
|
||||
{
|
||||
this.ySbExposure=ySbExposure;
|
||||
}
|
||||
public float getAreaPnlAmt()
|
||||
{
|
||||
return areaPnlAmt;
|
||||
}
|
||||
public void setAreaPnlAmt(float areaPnlAmt)
|
||||
{
|
||||
this.areaPnlAmt=areaPnlAmt;
|
||||
}
|
||||
public float getSectorPnlAmt()
|
||||
{
|
||||
return sectorPnlAmt;
|
||||
}
|
||||
public void setSectorPnlAmt(float sectorPnlAmt)
|
||||
{
|
||||
this.sectorPnlAmt=sectorPnlAmt;
|
||||
}
|
||||
public float getPnlPerc()
|
||||
{
|
||||
return pnlPerc;
|
||||
}
|
||||
public void setPnlPerc(float pnlPerc)
|
||||
{
|
||||
this.pnlPerc=pnlPerc;
|
||||
}
|
||||
public float getPriceChange()
|
||||
{
|
||||
return priceChange;
|
||||
}
|
||||
public void setPriceChange(float priceChange)
|
||||
{
|
||||
this.priceChange=priceChange;
|
||||
}
|
||||
public float getPriceChangePerc()
|
||||
{
|
||||
return priceChangePerc;
|
||||
}
|
||||
public void setPriceChangePerc(float priceChangePerc)
|
||||
{
|
||||
this.priceChangePerc=priceChangePerc;
|
||||
}
|
||||
public float getPriceChangeAmt()
|
||||
{
|
||||
return priceChangeAmt;
|
||||
}
|
||||
public void setPriceChangeAmt(float priceChangeAmt)
|
||||
{
|
||||
this.priceChangeAmt=priceChangeAmt;
|
||||
}
|
||||
public float getSectorAlphaPerc()
|
||||
{
|
||||
return sectorAlphaPerc;
|
||||
}
|
||||
public void setSectorAlphaPerc(float sectorAlphaPerc)
|
||||
{
|
||||
this.sectorAlphaPerc=sectorAlphaPerc;
|
||||
}
|
||||
public float getGroupAlphaPerc()
|
||||
{
|
||||
return groupAlphaPerc;
|
||||
}
|
||||
public void setGroupAlphaPerc(float groupAlphaPerc)
|
||||
{
|
||||
this.groupAlphaPerc=groupAlphaPerc;
|
||||
}
|
||||
public float getAreaAlphaPerc()
|
||||
{
|
||||
return areaAlphaPerc;
|
||||
}
|
||||
public void setAreaAlphaPerc(float areaAlphaPerc)
|
||||
{
|
||||
this.areaAlphaPerc=areaAlphaPerc;
|
||||
}
|
||||
public float getSectorAlphaAmt()
|
||||
{
|
||||
return sectorAlphaAmt;
|
||||
}
|
||||
public void setSectorAlphaAmt(float sectorAlphaAmt)
|
||||
{
|
||||
this.sectorAlphaAmt=sectorAlphaAmt;
|
||||
}
|
||||
public float getGroupAlphaAmt()
|
||||
{
|
||||
return groupAlphaAmt;
|
||||
}
|
||||
public void setGroupAlphaAmt(float groupAlphaAmt)
|
||||
{
|
||||
this.groupAlphaAmt=groupAlphaAmt;
|
||||
}
|
||||
public float getAreaAlphaAmt()
|
||||
{
|
||||
return areaAlphaAmt;
|
||||
}
|
||||
public void setAreaAlphaAmt(float areaAlphaAmt)
|
||||
{
|
||||
this.areaAlphaAmt=areaAlphaAmt;
|
||||
}
|
||||
public float getAbReturnAmt()
|
||||
{
|
||||
return abReturnAmt;
|
||||
}
|
||||
public void setAbReturnAmt(float abReturnAmt)
|
||||
{
|
||||
this.abReturnAmt=abReturnAmt;
|
||||
}
|
||||
public float getAbReturnPerc()
|
||||
{
|
||||
return abReturnPerc;
|
||||
}
|
||||
public void setAbReturnPerc(float abReturnPerc)
|
||||
{
|
||||
this.abReturnPerc=abReturnPerc;
|
||||
}
|
||||
public float getIntradayPerc()
|
||||
{
|
||||
return intradayPerc;
|
||||
}
|
||||
public void setIntradayPerc(float intradayPerc)
|
||||
{
|
||||
this.intradayPerc=intradayPerc;
|
||||
}
|
||||
public float getIntradayAmt()
|
||||
{
|
||||
return intradayAmt;
|
||||
}
|
||||
public void setIntradayAmt(float intradayAmt)
|
||||
{
|
||||
this.intradayAmt=intradayAmt;
|
||||
}
|
||||
public float getOptionalityAmt()
|
||||
{
|
||||
return optionalityAmt;
|
||||
}
|
||||
public void setOptionalityAmt(float optionalityAmt)
|
||||
{
|
||||
this.optionalityAmt=optionalityAmt;
|
||||
}
|
||||
public float getOptionalityPerc()
|
||||
{
|
||||
return optionalityPerc;
|
||||
}
|
||||
public void setOptionalityPerc(float optionalityPerc)
|
||||
{
|
||||
this.optionalityPerc=optionalityPerc;
|
||||
}
|
||||
public String getCurrency()
|
||||
{
|
||||
return currency;
|
||||
}
|
||||
public void setCurrency(String currency)
|
||||
{
|
||||
this.currency=currency;
|
||||
}
|
||||
public float getBaseClose()
|
||||
{
|
||||
return baseClose;
|
||||
}
|
||||
public void setBaseClose(float baseClose)
|
||||
{
|
||||
this.baseClose=baseClose;
|
||||
}
|
||||
public float getYBaseClose()
|
||||
{
|
||||
return yBaseClose;
|
||||
}
|
||||
public void setYBaseClose(float yBaseClose)
|
||||
{
|
||||
this.yBaseClose=yBaseClose;
|
||||
}
|
||||
public float getFxPerc()
|
||||
{
|
||||
return fxPerc;
|
||||
}
|
||||
public void setFxPerc(float fxPerc)
|
||||
{
|
||||
this.fxPerc=fxPerc;
|
||||
}
|
||||
public float getFxAmt()
|
||||
{
|
||||
return fxAmt;
|
||||
}
|
||||
public void setFxAmt(float fxAmt)
|
||||
{
|
||||
this.fxAmt=fxAmt;
|
||||
}
|
||||
public float getFxRate()
|
||||
{
|
||||
return fxRate;
|
||||
}
|
||||
public void setFxRate(float fxRate)
|
||||
{
|
||||
this.fxRate=fxRate;
|
||||
}
|
||||
public float getYFxRate()
|
||||
{
|
||||
return yFxRate;
|
||||
}
|
||||
public void setYFxRate(float yFxRate)
|
||||
{
|
||||
this.yFxRate=yFxRate;
|
||||
}
|
||||
public float getAltIndexReturnPerc()
|
||||
{
|
||||
return altIndexReturnPerc;
|
||||
}
|
||||
public void setAltIndexReturnPerc(float altIndexReturnPerc)
|
||||
{
|
||||
this.altIndexReturnPerc=altIndexReturnPerc;
|
||||
}
|
||||
public float getAltIndexReturnAmt()
|
||||
{
|
||||
return altIndexReturnAmt;
|
||||
}
|
||||
public void setAltIndexReturnAmt(float altIndexReturnAmt)
|
||||
{
|
||||
this.altIndexReturnAmt=altIndexReturnAmt;
|
||||
}
|
||||
public float getIndexBetaAdjPerc()
|
||||
{
|
||||
return indexBetaAdjPerc;
|
||||
}
|
||||
public void setIndexBetaAdjPerc(float indexBetaAdjPerc)
|
||||
{
|
||||
this.indexBetaAdjPerc=indexBetaAdjPerc;
|
||||
}
|
||||
public float getIndexBetaAdjAmt()
|
||||
{
|
||||
return indexBetaAdjAmt;
|
||||
}
|
||||
public void setIndexBetaAdjAmt(float indexBetaAdjAmt)
|
||||
{
|
||||
this.indexBetaAdjAmt=indexBetaAdjAmt;
|
||||
}
|
||||
public float getVwap()
|
||||
{
|
||||
return vwap;
|
||||
}
|
||||
public void setVwap(float vwap)
|
||||
{
|
||||
this.vwap=vwap;
|
||||
}
|
||||
public float getVwapPnl()
|
||||
{
|
||||
return vwapPnl;
|
||||
}
|
||||
public void setVwapPnl(float vwapPnl)
|
||||
{
|
||||
this.vwapPnl=vwapPnl;
|
||||
}
|
||||
public float getHedgeAlphaAmt()
|
||||
{
|
||||
return hedgeAlphaAmt;
|
||||
}
|
||||
public void setHedgeAlphaAmt(float hedgeAlphaAmt)
|
||||
{
|
||||
this.hedgeAlphaAmt=hedgeAlphaAmt;
|
||||
}
|
||||
public String getExposureView()
|
||||
{
|
||||
return exposureView;
|
||||
}
|
||||
public void setExposureView(String exposureView)
|
||||
{
|
||||
this.exposureView=exposureView;
|
||||
}
|
||||
public String getMarketView()
|
||||
{
|
||||
return marketView;
|
||||
}
|
||||
public void setMarketView(String marketView)
|
||||
{
|
||||
this.marketView=marketView;
|
||||
}
|
||||
public String getCallPut()
|
||||
{
|
||||
return callPut;
|
||||
}
|
||||
public void setCallPut(String callPut)
|
||||
{
|
||||
this.callPut=callPut;
|
||||
}
|
||||
public String get[month]()
|
||||
{
|
||||
return [month];
|
||||
}
|
||||
public void set[month](String [month])
|
||||
{
|
||||
this.[month]=[month];
|
||||
}
|
||||
public boolean getPrivate()
|
||||
{
|
||||
return private;
|
||||
}
|
||||
public void setPrivate(boolean private)
|
||||
{
|
||||
this.private=private;
|
||||
}
|
||||
public boolean getIpo()
|
||||
{
|
||||
return ipo;
|
||||
}
|
||||
public void setIpo(boolean ipo)
|
||||
{
|
||||
this.ipo=ipo;
|
||||
}
|
||||
public float getRatio()
|
||||
{
|
||||
return ratio;
|
||||
}
|
||||
public void setRatio(float ratio)
|
||||
{
|
||||
this.ratio=ratio;
|
||||
}
|
||||
public String getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
public void setSource(String source)
|
||||
{
|
||||
this.source=source;
|
||||
}
|
||||
public Timestamp getGoAround()
|
||||
{
|
||||
return goAround;
|
||||
}
|
||||
public void setGoAround(Timestamp goAround)
|
||||
{
|
||||
this.goAround=goAround;
|
||||
}
|
||||
public float getAdh()
|
||||
{
|
||||
return adh;
|
||||
}
|
||||
public void setAdh(float adh)
|
||||
{
|
||||
this.adh=adh;
|
||||
}
|
||||
public float getAac()
|
||||
{
|
||||
return aac;
|
||||
}
|
||||
public void setAac(float aac)
|
||||
{
|
||||
this.aac=aac;
|
||||
}
|
||||
public float getAzap()
|
||||
{
|
||||
return azap;
|
||||
}
|
||||
public void setAzap(float azap)
|
||||
{
|
||||
this.azap=azap;
|
||||
}
|
||||
public boolean getExported()
|
||||
{
|
||||
return exported;
|
||||
}
|
||||
public void setExported(boolean exported)
|
||||
{
|
||||
this.exported=exported;
|
||||
}
|
||||
public float getHedgeAlphaPerc()
|
||||
{
|
||||
return hedgeAlphaPerc;
|
||||
}
|
||||
public void setHedgeAlphaPerc(float hedgeAlphaPerc)
|
||||
{
|
||||
this.hedgeAlphaPerc=hedgeAlphaPerc;
|
||||
}
|
||||
public float getAlphaGoAround()
|
||||
{
|
||||
return alphaGoAround;
|
||||
}
|
||||
public void setAlphaGoAround(float alphaGoAround)
|
||||
{
|
||||
this.alphaGoAround=alphaGoAround;
|
||||
}
|
||||
public float getAlphaReal()
|
||||
{
|
||||
return alphaReal;
|
||||
}
|
||||
public void setAlphaReal(float alphaReal)
|
||||
{
|
||||
this.alphaReal=alphaReal;
|
||||
}
|
||||
public float getAlphaUnreal()
|
||||
{
|
||||
return alphaUnreal;
|
||||
}
|
||||
public void setAlphaUnreal(float alphaUnreal)
|
||||
{
|
||||
this.alphaUnreal=alphaUnreal;
|
||||
}
|
||||
public float getPnlReal()
|
||||
{
|
||||
return pnlReal;
|
||||
}
|
||||
public void setPnlReal(float pnlReal)
|
||||
{
|
||||
this.pnlReal=pnlReal;
|
||||
}
|
||||
public float getPnlUnreal()
|
||||
{
|
||||
return pnlUnreal;
|
||||
}
|
||||
public void setPnlUnreal(float pnlUnreal)
|
||||
{
|
||||
this.pnlUnreal=pnlUnreal;
|
||||
}
|
||||
public float getCashFlow()
|
||||
{
|
||||
return cashFlow;
|
||||
}
|
||||
public void setCashFlow(float cashFlow)
|
||||
{
|
||||
this.cashFlow=cashFlow;
|
||||
}
|
||||
public float getBetaCashFlow()
|
||||
{
|
||||
return betaCashFlow;
|
||||
}
|
||||
public void setBetaCashFlow(float betaCashFlow)
|
||||
{
|
||||
this.betaCashFlow=betaCashFlow;
|
||||
}
|
||||
public Timestamp getLastTradeDate()
|
||||
{
|
||||
return lastTradeDate;
|
||||
}
|
||||
public void setLastTradeDate(Timestamp lastTradeDate)
|
||||
{
|
||||
this.lastTradeDate=lastTradeDate;
|
||||
}
|
||||
public float getLastTradeQty()
|
||||
{
|
||||
return lastTradeQty;
|
||||
}
|
||||
public void setLastTradeQty(float lastTradeQty)
|
||||
{
|
||||
this.lastTradeQty=lastTradeQty;
|
||||
}
|
||||
public float getEnterpriseValue()
|
||||
{
|
||||
return enterpriseValue;
|
||||
}
|
||||
public void setEnterpriseValue(float enterpriseValue)
|
||||
{
|
||||
this.enterpriseValue=enterpriseValue;
|
||||
}
|
||||
public String getAssociate()
|
||||
{
|
||||
return associate;
|
||||
}
|
||||
public void setAssociate(String associate)
|
||||
{
|
||||
this.associate=associate;
|
||||
}
|
||||
};
|
||||
153
ClassGen/HistoricDA.cs
Normal file
153
ClassGen/HistoricDA.cs
Normal file
@@ -0,0 +1,153 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace ZBI.Risk.Server.Mapped
|
||||
{
|
||||
public class HistoricDA
|
||||
{
|
||||
public ArrayList readAll()
|
||||
{
|
||||
SqlConnection sqlConnection=null;
|
||||
SqlDataReader sqlDataReader=null;
|
||||
SqlCommand sqlCommand=null;
|
||||
try
|
||||
{
|
||||
ArrayList arrayList=new ArrayList();
|
||||
string strQuery="select trade_date, trade_date_txt, portfolio, sub_portfolio, ticker, ticker_desc, uticker, instrument, contract_size, hedge_index, hedge_sector, area, area_sector, y_close, uticker_close, y_uticker_close, delta, y_delta, hedge_beta, area_beta, sector_beta, group_beta, qty, y_qty, qty_change, hedge_close, hedge_perc, area_close, area_perc, sector_close, sector_perc, mkt_value, y_mkt_value, exposure, y_exposure, hb_exposure, y_hb_exposure, ab_exposure, y_ab_exposure, sb_exposure, y_sb_exposure, pnl, pnl_perc, price_change, price_change_perc, price_change_amt, sector_alpha_perc, group_alpha_perc, area_alpha_perc, hedge_alpha_perc, area_pnl_amt, sector_pnl_amt, sector_alpha_amt, group_alpha_amt, area_alpha_amt, hedge_alpha_amt, ab_return_amt, ab_return_perc, alt_index_return_perc, alt_index_return_amt, index_beta_adj_perc, index_beta_adj_amt, intraday_perc, intraday_amt, optionality_perc, optionality_amt, currency, base_close, y_base_close, fx_perc, fx_amt, fx_rate, y_fx_rate, exposure_view, market_view, call_put, days_expire, strike_price, associate, ipo, ratio, exported, source, vwap, vwap_pnl, adh, aac, azap, go_around, alpha_go_around, alpha_real, alpha_unreal, pnl_real, pnl_unreal, cash_flow, beta_cash_flow, last_trade_date, last_trade_qty, enterprise_value, mkt_cap, wgt_ave, volume, RowID from dt_main_positions";
|
||||
sqlConnection=createSqlConnection(DRMS,dt_main_positions,"sa","");
|
||||
sqlCommand=new SqlCommand(strQuery,sqlConnection);
|
||||
sqlDataReader=sqlCommand.ExecuteReader();
|
||||
while(sqlDataReader.Read())
|
||||
{
|
||||
Historic historic=new Historic();
|
||||
historic.TradeDate=sqlDataReader.getDateTime(0);
|
||||
historic.TradeDateTxt=sqlDataReader.getString(1);
|
||||
historic.Portfolio=sqlDataReader.getString(2);
|
||||
historic.SubPortfolio=sqlDataReader.getString(3);
|
||||
historic.Ticker=sqlDataReader.getString(4);
|
||||
historic.TickerDesc=sqlDataReader.getString(5);
|
||||
historic.Uticker=sqlDataReader.getString(6);
|
||||
historic.Instrument=sqlDataReader.getString(7);
|
||||
historic.ContractSize=sqlDataReader.getDecimal(8);
|
||||
historic.HedgeIndex=sqlDataReader.getString(9);
|
||||
historic.HedgeSector=sqlDataReader.getString(10);
|
||||
historic.Area=sqlDataReader.getString(11);
|
||||
historic.AreaSector=sqlDataReader.getString(12);
|
||||
historic.YClose=sqlDataReader.getDecimal(13);
|
||||
historic.UtickerClose=sqlDataReader.getDecimal(14);
|
||||
historic.YUtickerClose=sqlDataReader.getDecimal(15);
|
||||
historic.Delta=sqlDataReader.getDecimal(16);
|
||||
historic.YDelta=sqlDataReader.getDecimal(17);
|
||||
historic.HedgeBeta=sqlDataReader.getDecimal(18);
|
||||
historic.AreaBeta=sqlDataReader.getDecimal(19);
|
||||
historic.SectorBeta=sqlDataReader.getDecimal(20);
|
||||
historic.GroupBeta=sqlDataReader.getDecimal(21);
|
||||
historic.Qty=sqlDataReader.getDecimal(22);
|
||||
historic.YQty=sqlDataReader.getDecimal(23);
|
||||
historic.QtyChange=sqlDataReader.getDecimal(24);
|
||||
historic.HedgeClose=sqlDataReader.getDecimal(25);
|
||||
historic.HedgePerc=sqlDataReader.getDecimal(26);
|
||||
historic.AreaClose=sqlDataReader.getDecimal(27);
|
||||
historic.AreaPerc=sqlDataReader.getDecimal(28);
|
||||
historic.SectorClose=sqlDataReader.getDecimal(29);
|
||||
historic.SectorPerc=sqlDataReader.getDecimal(30);
|
||||
historic.MktValue=sqlDataReader.getDecimal(31);
|
||||
historic.YMktValue=sqlDataReader.getDecimal(32);
|
||||
historic.Exposure=sqlDataReader.getDecimal(33);
|
||||
historic.YExposure=sqlDataReader.getDecimal(34);
|
||||
historic.HbExposure=sqlDataReader.getDecimal(35);
|
||||
historic.YHbExposure=sqlDataReader.getDecimal(36);
|
||||
historic.AbExposure=sqlDataReader.getDecimal(37);
|
||||
historic.YAbExposure=sqlDataReader.getDecimal(38);
|
||||
historic.SbExposure=sqlDataReader.getDecimal(39);
|
||||
historic.YSbExposure=sqlDataReader.getDecimal(40);
|
||||
historic.Pnl=sqlDataReader.getDecimal(41);
|
||||
historic.PnlPerc=sqlDataReader.getDecimal(42);
|
||||
historic.PriceChange=sqlDataReader.getDecimal(43);
|
||||
historic.PriceChangePerc=sqlDataReader.getDecimal(44);
|
||||
historic.PriceChangeAmt=sqlDataReader.getDecimal(45);
|
||||
historic.SectorAlphaPerc=sqlDataReader.getDecimal(46);
|
||||
historic.GroupAlphaPerc=sqlDataReader.getDecimal(47);
|
||||
historic.AreaAlphaPerc=sqlDataReader.getDecimal(48);
|
||||
historic.HedgeAlphaPerc=sqlDataReader.getDecimal(49);
|
||||
historic.AreaPnlAmt=sqlDataReader.getDecimal(50);
|
||||
historic.SectorPnlAmt=sqlDataReader.getDecimal(51);
|
||||
historic.SectorAlphaAmt=sqlDataReader.getDecimal(52);
|
||||
historic.GroupAlphaAmt=sqlDataReader.getDecimal(53);
|
||||
historic.AreaAlphaAmt=sqlDataReader.getDecimal(54);
|
||||
historic.HedgeAlphaAmt=sqlDataReader.getDecimal(55);
|
||||
historic.AbReturnAmt=sqlDataReader.getDecimal(56);
|
||||
historic.AbReturnPerc=sqlDataReader.getDecimal(57);
|
||||
historic.AltIndexReturnPerc=sqlDataReader.getDecimal(58);
|
||||
historic.AltIndexReturnAmt=sqlDataReader.getDecimal(59);
|
||||
historic.IndexBetaAdjPerc=sqlDataReader.getDecimal(60);
|
||||
historic.IndexBetaAdjAmt=sqlDataReader.getDecimal(61);
|
||||
historic.IntradayPerc=sqlDataReader.getDecimal(62);
|
||||
historic.IntradayAmt=sqlDataReader.getDecimal(63);
|
||||
historic.OptionalityPerc=sqlDataReader.getDecimal(64);
|
||||
historic.OptionalityAmt=sqlDataReader.getDecimal(65);
|
||||
historic.Currency=sqlDataReader.getString(66);
|
||||
historic.BaseClose=sqlDataReader.getDecimal(67);
|
||||
historic.YBaseClose=sqlDataReader.getDecimal(68);
|
||||
historic.FxPerc=sqlDataReader.getDecimal(69);
|
||||
historic.FxAmt=sqlDataReader.getDecimal(70);
|
||||
historic.FxRate=sqlDataReader.getDecimal(71);
|
||||
historic.YFxRate=sqlDataReader.getDecimal(72);
|
||||
historic.ExposureView=sqlDataReader.getString(73);
|
||||
historic.MarketView=sqlDataReader.getString(74);
|
||||
historic.CallPut=sqlDataReader.getString(75);
|
||||
historic.DaysExpire=sqlDataReader.getInt(76);
|
||||
historic.StrikePrice=sqlDataReader.getDecimal(77);
|
||||
historic.Associate=sqlDataReader.getString(78);
|
||||
historic.Ipo=sqlDataReader.getBool(79);
|
||||
historic.Ratio=sqlDataReader.getDecimal(80);
|
||||
historic.Exported=sqlDataReader.getBool(81);
|
||||
historic.Source=sqlDataReader.getString(82);
|
||||
historic.Vwap=sqlDataReader.getDecimal(83);
|
||||
historic.VwapPnl=sqlDataReader.getDecimal(84);
|
||||
historic.Adh=sqlDataReader.getDecimal(85);
|
||||
historic.Aac=sqlDataReader.getDecimal(86);
|
||||
historic.Azap=sqlDataReader.getDecimal(87);
|
||||
historic.GoAround=sqlDataReader.getDateTime(88);
|
||||
historic.AlphaGoAround=sqlDataReader.getDecimal(89);
|
||||
historic.AlphaReal=sqlDataReader.getDecimal(90);
|
||||
historic.AlphaUnreal=sqlDataReader.getDecimal(91);
|
||||
historic.PnlReal=sqlDataReader.getDecimal(92);
|
||||
historic.PnlUnreal=sqlDataReader.getDecimal(93);
|
||||
historic.CashFlow=sqlDataReader.getDecimal(94);
|
||||
historic.BetaCashFlow=sqlDataReader.getDecimal(95);
|
||||
historic.LastTradeDate=sqlDataReader.getDateTime(96);
|
||||
historic.LastTradeQty=sqlDataReader.getDecimal(97);
|
||||
historic.EnterpriseValue=sqlDataReader.getDecimal(98);
|
||||
historic.MktCap=sqlDataReader.getDecimal(99);
|
||||
historic.WgtAve=sqlDataReader.getDecimal(100);
|
||||
historic.Volume=sqlDataReader.getDecimal(101);
|
||||
historic.RowID=sqlDataReader.getLong(102);
|
||||
arrayList.add(historic);
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(null!=sqlDataReader)sqlDataReader.Close();
|
||||
if(null!=sqlConnection)sqlConnection.Close();
|
||||
}
|
||||
}
|
||||
private static SqlConnection createSqlConnection(string datssource,string database,string username,string password)
|
||||
{
|
||||
try
|
||||
{
|
||||
string connectionString="Data Source=DRMS;User ID=sa;password=";
|
||||
SqlConnection connection=new SqlConnection(connectionString);
|
||||
connection.Open();
|
||||
return connection;
|
||||
}
|
||||
catch(SqlException exception)
|
||||
{
|
||||
Console.WriteLine(exception.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
154
ClassGen/HistoricDA.java
Normal file
154
ClassGen/HistoricDA.java
Normal file
@@ -0,0 +1,154 @@
|
||||
package zbi.risk.server.vhi.mapped
|
||||
|
||||
|
||||
public class HistoricDA
|
||||
{
|
||||
public List readAll()throws SQLException
|
||||
{
|
||||
Statement statement=null;
|
||||
ResultSet rs=null;
|
||||
Connection connection=null;
|
||||
String strQuery=null;
|
||||
List list=null;
|
||||
|
||||
try
|
||||
{
|
||||
Historic historic = new Historic();
|
||||
connection=getConnection();
|
||||
statement=connection.createStatement();
|
||||
list=new ArrayList();
|
||||
strQuery="select trade_date, trade_date_txt, portfolio, sub_portfolio, ticker, ticker_desc, uticker, instrument, mkt_cap, wgt_ave, volume, contract_size, hedge_index, hedge_sector, area, area_sector, [close], y_close, uticker_close, y_uticker_close, delta, y_delta, days_expire, strike_price, hedge_beta, area_beta, sector_beta, group_beta, qty, y_qty, qty_change, hedge_close, hedge_perc, area_close, area_perc, sector_close, sector_perc, mkt_value, y_mkt_value, pnl, exposure, y_exposure, hb_exposure, y_hb_exposure, ab_exposure, y_ab_exposure, sb_exposure, y_sb_exposure, area_pnl_amt, sector_pnl_amt, pnl_perc, price_change, price_change_perc, price_change_amt, sector_alpha_perc, group_alpha_perc, area_alpha_perc, sector_alpha_amt, group_alpha_amt, area_alpha_amt, ab_return_amt, ab_return_perc, intraday_perc, intraday_amt, optionality_amt, optionality_perc, currency, base_close, y_base_close, fx_perc, fx_amt, fx_rate, y_fx_rate, alt_index_return_perc, alt_index_return_amt, index_beta_adj_perc, index_beta_adj_amt, vwap, vwap_pnl, hedge_alpha_amt, exposure_view, market_view, call_put, [month], private, ipo, ratio, source, go_around, adh, aac, azap, exported, hedge_alpha_perc, alpha_go_around, alpha_real, alpha_unreal, pnl_real, pnl_unreal, cash_flow, beta_cash_flow, last_trade_date, last_trade_qty, enterprise_value, associate from dt_main_positions";
|
||||
rs=statement.executeQuery(strQuery);
|
||||
while(rs.next())
|
||||
{
|
||||
historic.setTradeDate(rs.getTimestamp("trade_date"));
|
||||
historic.setTradeDateTxt(rs.getString("trade_date_txt"));
|
||||
historic.setPortfolio(rs.getString("portfolio"));
|
||||
historic.setSubPortfolio(rs.getString("sub_portfolio"));
|
||||
historic.setTicker(rs.getString("ticker"));
|
||||
historic.setTickerDesc(rs.getString("ticker_desc"));
|
||||
historic.setUticker(rs.getString("uticker"));
|
||||
historic.setInstrument(rs.getString("instrument"));
|
||||
historic.setMktCap(rs.getFloat("mkt_cap"));
|
||||
historic.setWgtAve(rs.getFloat("wgt_ave"));
|
||||
historic.setVolume(rs.getFloat("volume"));
|
||||
historic.setContractSize(rs.getFloat("contract_size"));
|
||||
historic.setHedgeIndex(rs.getString("hedge_index"));
|
||||
historic.setHedgeSector(rs.getString("hedge_sector"));
|
||||
historic.setArea(rs.getString("area"));
|
||||
historic.setAreaSector(rs.getString("area_sector"));
|
||||
historic.set[close](rs.getFloat("[close]"));
|
||||
historic.setYClose(rs.getFloat("y_close"));
|
||||
historic.setUtickerClose(rs.getFloat("uticker_close"));
|
||||
historic.setYUtickerClose(rs.getFloat("y_uticker_close"));
|
||||
historic.setDelta(rs.getFloat("delta"));
|
||||
historic.setYDelta(rs.getFloat("y_delta"));
|
||||
historic.setDaysExpire(rs.getInt("days_expire"));
|
||||
historic.setStrikePrice(rs.getFloat("strike_price"));
|
||||
historic.setHedgeBeta(rs.getFloat("hedge_beta"));
|
||||
historic.setAreaBeta(rs.getFloat("area_beta"));
|
||||
historic.setSectorBeta(rs.getFloat("sector_beta"));
|
||||
historic.setGroupBeta(rs.getFloat("group_beta"));
|
||||
historic.setQty(rs.getFloat("qty"));
|
||||
historic.setYQty(rs.getFloat("y_qty"));
|
||||
historic.setQtyChange(rs.getFloat("qty_change"));
|
||||
historic.setHedgeClose(rs.getFloat("hedge_close"));
|
||||
historic.setHedgePerc(rs.getFloat("hedge_perc"));
|
||||
historic.setAreaClose(rs.getFloat("area_close"));
|
||||
historic.setAreaPerc(rs.getFloat("area_perc"));
|
||||
historic.setSectorClose(rs.getFloat("sector_close"));
|
||||
historic.setSectorPerc(rs.getFloat("sector_perc"));
|
||||
historic.setMktValue(rs.getFloat("mkt_value"));
|
||||
historic.setYMktValue(rs.getFloat("y_mkt_value"));
|
||||
historic.setPnl(rs.getFloat("pnl"));
|
||||
historic.setExposure(rs.getFloat("exposure"));
|
||||
historic.setYExposure(rs.getFloat("y_exposure"));
|
||||
historic.setHbExposure(rs.getFloat("hb_exposure"));
|
||||
historic.setYHbExposure(rs.getFloat("y_hb_exposure"));
|
||||
historic.setAbExposure(rs.getFloat("ab_exposure"));
|
||||
historic.setYAbExposure(rs.getFloat("y_ab_exposure"));
|
||||
historic.setSbExposure(rs.getFloat("sb_exposure"));
|
||||
historic.setYSbExposure(rs.getFloat("y_sb_exposure"));
|
||||
historic.setAreaPnlAmt(rs.getFloat("area_pnl_amt"));
|
||||
historic.setSectorPnlAmt(rs.getFloat("sector_pnl_amt"));
|
||||
historic.setPnlPerc(rs.getFloat("pnl_perc"));
|
||||
historic.setPriceChange(rs.getFloat("price_change"));
|
||||
historic.setPriceChangePerc(rs.getFloat("price_change_perc"));
|
||||
historic.setPriceChangeAmt(rs.getFloat("price_change_amt"));
|
||||
historic.setSectorAlphaPerc(rs.getFloat("sector_alpha_perc"));
|
||||
historic.setGroupAlphaPerc(rs.getFloat("group_alpha_perc"));
|
||||
historic.setAreaAlphaPerc(rs.getFloat("area_alpha_perc"));
|
||||
historic.setSectorAlphaAmt(rs.getFloat("sector_alpha_amt"));
|
||||
historic.setGroupAlphaAmt(rs.getFloat("group_alpha_amt"));
|
||||
historic.setAreaAlphaAmt(rs.getFloat("area_alpha_amt"));
|
||||
historic.setAbReturnAmt(rs.getFloat("ab_return_amt"));
|
||||
historic.setAbReturnPerc(rs.getFloat("ab_return_perc"));
|
||||
historic.setIntradayPerc(rs.getFloat("intraday_perc"));
|
||||
historic.setIntradayAmt(rs.getFloat("intraday_amt"));
|
||||
historic.setOptionalityAmt(rs.getFloat("optionality_amt"));
|
||||
historic.setOptionalityPerc(rs.getFloat("optionality_perc"));
|
||||
historic.setCurrency(rs.getString("currency"));
|
||||
historic.setBaseClose(rs.getFloat("base_close"));
|
||||
historic.setYBaseClose(rs.getFloat("y_base_close"));
|
||||
historic.setFxPerc(rs.getFloat("fx_perc"));
|
||||
historic.setFxAmt(rs.getFloat("fx_amt"));
|
||||
historic.setFxRate(rs.getFloat("fx_rate"));
|
||||
historic.setYFxRate(rs.getFloat("y_fx_rate"));
|
||||
historic.setAltIndexReturnPerc(rs.getFloat("alt_index_return_perc"));
|
||||
historic.setAltIndexReturnAmt(rs.getFloat("alt_index_return_amt"));
|
||||
historic.setIndexBetaAdjPerc(rs.getFloat("index_beta_adj_perc"));
|
||||
historic.setIndexBetaAdjAmt(rs.getFloat("index_beta_adj_amt"));
|
||||
historic.setVwap(rs.getFloat("vwap"));
|
||||
historic.setVwapPnl(rs.getFloat("vwap_pnl"));
|
||||
historic.setHedgeAlphaAmt(rs.getFloat("hedge_alpha_amt"));
|
||||
historic.setExposureView(rs.getString("exposure_view"));
|
||||
historic.setMarketView(rs.getString("market_view"));
|
||||
historic.setCallPut(rs.getString("call_put"));
|
||||
historic.set[month](rs.getString("[month]"));
|
||||
historic.setPrivate(rs.getBoolean("private"));
|
||||
historic.setIpo(rs.getBoolean("ipo"));
|
||||
historic.setRatio(rs.getFloat("ratio"));
|
||||
historic.setSource(rs.getString("source"));
|
||||
historic.setGoAround(rs.getTimestamp("go_around"));
|
||||
historic.setAdh(rs.getFloat("adh"));
|
||||
historic.setAac(rs.getFloat("aac"));
|
||||
historic.setAzap(rs.getFloat("azap"));
|
||||
historic.setExported(rs.getBoolean("exported"));
|
||||
historic.setHedgeAlphaPerc(rs.getFloat("hedge_alpha_perc"));
|
||||
historic.setAlphaGoAround(rs.getFloat("alpha_go_around"));
|
||||
historic.setAlphaReal(rs.getFloat("alpha_real"));
|
||||
historic.setAlphaUnreal(rs.getFloat("alpha_unreal"));
|
||||
historic.setPnlReal(rs.getFloat("pnl_real"));
|
||||
historic.setPnlUnreal(rs.getFloat("pnl_unreal"));
|
||||
historic.setCashFlow(rs.getFloat("cash_flow"));
|
||||
historic.setBetaCashFlow(rs.getFloat("beta_cash_flow"));
|
||||
historic.setLastTradeDate(rs.getTimestamp("last_trade_date"));
|
||||
historic.setLastTradeQty(rs.getFloat("last_trade_qty"));
|
||||
historic.setEnterpriseValue(rs.getFloat("enterprise_value"));
|
||||
historic.setAssociate(rs.getString("associate"));
|
||||
list.add(historic);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(null!=rs)rs.close();
|
||||
if(null!=statement)statement.close();
|
||||
}
|
||||
}
|
||||
private Connection getConnection()throws SQLException
|
||||
{
|
||||
try
|
||||
{
|
||||
InitialContext jndiCntx=new InitialContext();
|
||||
DataSource ds=(DataSource)jndiCntx.lookup("java:DRMS")
|
||||
jndiCntx.close();
|
||||
return ds.getConnection();
|
||||
}
|
||||
catch(NamingException exception)
|
||||
{
|
||||
message("[getConnection] Object not found");
|
||||
throw new EJBException(exception);
|
||||
}
|
||||
}
|
||||
};
|
||||
425
ClassGen/Main.cpp
Normal file
425
ClassGen/Main.cpp
Normal file
@@ -0,0 +1,425 @@
|
||||
#include <common/file.hpp>
|
||||
#include <common/profile.hpp>
|
||||
#include <common/string.hpp>
|
||||
#include <common/block.hpp>
|
||||
#include <ClassGen/NameValuePair.hpp>
|
||||
|
||||
class ClassMapper
|
||||
{
|
||||
public:
|
||||
ClassMapper();
|
||||
virtual ~ClassMapper();
|
||||
bool createClass(const String &language,const String &packageName,String className,const String &databaseName,const String &tableName,const String &strPathMapFile,const String &strPathTable);
|
||||
private:
|
||||
bool loadMapping(const String &strPathMapFile);
|
||||
bool mapType(const String &type,String &mapped);
|
||||
bool createCSharpClass(const String &packageName,const String &className,Block<NameValuePair> &variables);
|
||||
bool createCSharpDataAccess(const String &packageName,const String &className,const String &instanceName,const String &databaseName,const String &tableName,Block<NameValuePair> &variables,Block<NameValuePair> &originals);
|
||||
bool createJAVAClass(const String &packageName,const String &className,Block<NameValuePair> &variables);
|
||||
bool createJAVADataAccess(const String &packageName,const String &className,const String &instanceName,const String &databaseName,const String &tableName,Block<NameValuePair> &variables,Block<NameValuePair> &originals);
|
||||
|
||||
String makeHungarian(const String &name);
|
||||
String makeAccessor(const String &name);
|
||||
String makeMutator(const String &name);
|
||||
String makeFirstUpper(const String &name);
|
||||
String makeFirstLower(const String &name);
|
||||
Block<NameValuePair> mNameValuePairs;
|
||||
};
|
||||
|
||||
ClassMapper::ClassMapper()
|
||||
{
|
||||
}
|
||||
|
||||
ClassMapper::~ClassMapper()
|
||||
{
|
||||
}
|
||||
|
||||
bool ClassMapper::createClass(const String &language,const String &packageName,String className,const String &databaseName,const String &tableName,const String &strPathMapFile,const String &strPathTable)
|
||||
{
|
||||
File inFile;
|
||||
String strLine;
|
||||
String name;
|
||||
String value;
|
||||
String instanceName;
|
||||
Block<NameValuePair> variables;
|
||||
Block<NameValuePair> originals;
|
||||
int errors=0;
|
||||
|
||||
if(!loadMapping(strPathMapFile))return false;
|
||||
if(!inFile.open(strPathTable,"rb"))return false;
|
||||
while(true)
|
||||
{
|
||||
inFile.readLine(strLine);
|
||||
if(strLine.isNull())break;
|
||||
name=strLine.betweenString(0,' ');
|
||||
value=strLine.betweenString(' ',' ');
|
||||
if(!mapType(value,value))
|
||||
{
|
||||
printf("Don't know how to map %s\n",value.str());
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
variables.insert(&NameValuePair(makeFirstLower(makeHungarian(name)),value));
|
||||
originals.insert(&NameValuePair(name,value));
|
||||
}
|
||||
inFile.close();
|
||||
if(errors)return false;
|
||||
if(!variables.size())return false;
|
||||
instanceName=makeFirstLower(className);
|
||||
className=makeFirstUpper(className);
|
||||
if(language=="JAVA")
|
||||
{
|
||||
createJAVAClass(packageName,className,variables);
|
||||
createJAVADataAccess(packageName,className,instanceName,databaseName,tableName,variables,originals);\
|
||||
}
|
||||
else if(language=="C#")
|
||||
{
|
||||
createCSharpClass(packageName,className,variables);
|
||||
createCSharpDataAccess(packageName,className,instanceName,databaseName,tableName,variables,originals);\
|
||||
}
|
||||
printf("generation completed.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClassMapper::createCSharpClass(const String &packageName,const String &className,Block<NameValuePair> &variables)
|
||||
{
|
||||
File outFile;
|
||||
bool closeNameSpace=false;
|
||||
|
||||
if(!outFile.open(className+String(".cs"),"wb"))return false;
|
||||
outFile.writeLine("using System;");
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("\t");
|
||||
|
||||
if(!packageName.isNull())
|
||||
{
|
||||
outFile.writeLine(String("namespace ")+packageName);
|
||||
outFile.writeLine("{");
|
||||
closeNameSpace=true;
|
||||
}
|
||||
outFile.writeLine(" [Serializable]");
|
||||
outFile.writeLine(String(" public class ")+className);
|
||||
outFile.writeLine(" {");
|
||||
for(int index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=variables[index];
|
||||
outFile.writeLine(String(" private ")+nameValuePair.getValue()+String(" ")+nameValuePair.getName()+String(";"));
|
||||
}
|
||||
for(index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=variables[index];
|
||||
outFile.writeLine(String(" public ")+nameValuePair.getValue()+String(" ")+makeFirstUpper(nameValuePair.getName()));
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" get{return ")+nameValuePair.getName()+String(";}"));
|
||||
outFile.writeLine(String(" set{")+nameValuePair.getName()+String("=value;}"));
|
||||
outFile.writeLine(" }");
|
||||
}
|
||||
outFile.writeLine(" }");
|
||||
if(closeNameSpace)outFile.writeLine("}");
|
||||
outFile.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClassMapper::createCSharpDataAccess(const String &packageName,const String &className,const String &instanceName,const String &databaseName,const String &tableName,Block<NameValuePair> &variables,Block<NameValuePair> &originals)
|
||||
{
|
||||
File outFile;
|
||||
String select;
|
||||
bool closeNameSpace=false;
|
||||
|
||||
if(!outFile.open(className+String("DA")+String(".cs"),"wb"))return false;
|
||||
outFile.writeLine("using System;");
|
||||
outFile.writeLine("using System.Collections;");
|
||||
outFile.writeLine("using System.Data.SqlClient;");
|
||||
outFile.writeLine("\t");
|
||||
if(!packageName.isNull())
|
||||
{
|
||||
outFile.writeLine(String("namespace ")+packageName);
|
||||
outFile.writeLine("{");
|
||||
closeNameSpace=true;
|
||||
}
|
||||
outFile.writeLine(String(" public class ")+className+String("DA"));
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" public ArrayList readAll()");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" SqlConnection sqlConnection=null;");
|
||||
outFile.writeLine(" SqlDataReader sqlDataReader=null;");
|
||||
outFile.writeLine(" SqlCommand sqlCommand=null;");
|
||||
outFile.writeLine(" try");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" ArrayList arrayList=new ArrayList();");
|
||||
select=" string strQuery=\"select ";
|
||||
for(int index=0;index<originals.size();index++)
|
||||
{
|
||||
select+=originals[index].getName();
|
||||
if(index<originals.size()-1)select+=String(", ");
|
||||
}
|
||||
select+=String(" from ")+tableName+String("\";");
|
||||
outFile.writeLine(select);
|
||||
outFile.writeLine(String(" sqlConnection=createSqlConnection(")+databaseName+String(",")+tableName+String(",\"sa\",\"\");"));
|
||||
outFile.writeLine(" sqlCommand=new SqlCommand(strQuery,sqlConnection);");
|
||||
outFile.writeLine(" sqlDataReader=sqlCommand.ExecuteReader();");
|
||||
outFile.writeLine(" while(sqlDataReader.Read())");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" ")+className+String(" ")+instanceName+String("=new ")+className+String("();"));
|
||||
for(index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &original=originals[index];
|
||||
NameValuePair &variable=variables[index];
|
||||
outFile.writeLine(String(" ")+instanceName+String(".")+makeFirstUpper(variable.getName())+String("=sqlDataReader.get")+makeFirstUpper(variable.getValue())+String("(")+String().fromInt(index)+String(");"));
|
||||
}
|
||||
outFile.writeLine(String(" arrayList.add(")+instanceName+String(");"));
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" return arrayList;");
|
||||
outFile.writeLine(" }");
|
||||
|
||||
outFile.writeLine(" finally");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" if(null!=sqlDataReader)sqlDataReader.Close();");
|
||||
outFile.writeLine(" if(null!=sqlConnection)sqlConnection.Close();");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" }");
|
||||
|
||||
String connectionString=" string connectionString=\"Data Source="+databaseName+";User ID="+"sa;password=\";";
|
||||
outFile.writeLine(" private static SqlConnection createSqlConnection(string datssource,string database,string username,string password)");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" try");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(connectionString);
|
||||
|
||||
outFile.writeLine(" SqlConnection connection=new SqlConnection(connectionString);");
|
||||
outFile.writeLine(" connection.Open();");
|
||||
outFile.writeLine(" return connection;");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" catch(SqlException exception)");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" Console.WriteLine(exception.ToString());");
|
||||
outFile.writeLine(" return null;");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" }");
|
||||
if(closeNameSpace)outFile.writeLine("}");
|
||||
outFile.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClassMapper::createJAVAClass(const String &packageName,const String &className,Block<NameValuePair> &variables)
|
||||
{
|
||||
File outFile;
|
||||
|
||||
if(!outFile.open(className+String(".java"),"wb"))return false;
|
||||
if(!packageName.isNull())outFile.writeLine(String("package ")+packageName);
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine(String("public class ")+className);
|
||||
outFile.writeLine("{");
|
||||
for(int index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=variables[index];
|
||||
outFile.writeLine(String(" private ")+nameValuePair.getValue()+String(" ")+nameValuePair.getName()+String(";"));
|
||||
}
|
||||
for(index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=variables[index];
|
||||
outFile.writeLine(String(" public ")+nameValuePair.getValue()+String(" ")+makeAccessor(nameValuePair.getName())+String("()"));
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" return ")+nameValuePair.getName()+String(";"));
|
||||
outFile.writeLine(" }");
|
||||
|
||||
outFile.writeLine(String(" public void ")+makeMutator(nameValuePair.getName())+String("(")+nameValuePair.getValue()+String(" ")+nameValuePair.getName()+String(")"));
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" this.")+nameValuePair.getName()+String("=")+nameValuePair.getName()+String(";"));
|
||||
outFile.writeLine(" }");
|
||||
}
|
||||
outFile.writeLine("};");
|
||||
outFile.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClassMapper::createJAVADataAccess(const String &packageName,const String &className,const String &instanceName,const String &databaseName,const String &tableName,Block<NameValuePair> &variables,Block<NameValuePair> &originals)
|
||||
{
|
||||
File outFile;
|
||||
String select;
|
||||
|
||||
if(!outFile.open(className+String("DA")+String(".java"),"wb"))return false;
|
||||
if(!packageName.isNull())outFile.writeLine(String("package ")+packageName);
|
||||
outFile.writeLine("import java.util.*;");
|
||||
outFile.writeLine("import javax.naming.*;");
|
||||
outFile.writeLine("import java.sql.*;");
|
||||
outFile.writeLine("import javax.sql.*;");
|
||||
outFile.writeLine("import javax.ejb.*");
|
||||
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("\t");
|
||||
|
||||
outFile.writeLine(String("public class ")+className+String("DA"));
|
||||
outFile.writeLine("{");
|
||||
outFile.writeLine(" public List readAll()throws SQLException");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" Statement statement=null;");
|
||||
outFile.writeLine(" ResultSet rs=null;");
|
||||
outFile.writeLine(" Connection connection=null;");
|
||||
outFile.writeLine(" String strQuery=null;");
|
||||
outFile.writeLine(" List list=null;");
|
||||
outFile.writeLine("\t");
|
||||
|
||||
outFile.writeLine(" try");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" ")+className+String(" ")+instanceName+String(" = new ")+className+String("();"));
|
||||
outFile.writeLine(" connection=getConnection();");
|
||||
outFile.writeLine(" statement=connection.createStatement();");
|
||||
outFile.writeLine(" list=new ArrayList();");
|
||||
select=" strQuery=\"select ";
|
||||
for(int index=0;index<originals.size();index++)
|
||||
{
|
||||
select+=originals[index].getName();
|
||||
if(index<originals.size()-1)select+=String(", ");
|
||||
}
|
||||
select+=String(" from ")+tableName+String("\";");
|
||||
outFile.writeLine(select);
|
||||
outFile.writeLine(" rs=statement.executeQuery(strQuery);");
|
||||
outFile.writeLine(" while(rs.next())");
|
||||
outFile.writeLine(" {");
|
||||
for(index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &original=originals[index];
|
||||
NameValuePair &variable=variables[index];
|
||||
outFile.writeLine(String(" ")+instanceName+String(".")+makeMutator(variable.getName())+String("(rs.get")+makeFirstUpper(variable.getValue())+String("(\"")+original.getName()+String("\"));"));
|
||||
}
|
||||
outFile.writeLine(String(" list.add(")+instanceName+String(");"));
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" return list;");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" finally");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" if(null!=rs)rs.close();");
|
||||
outFile.writeLine(" if(null!=statement)statement.close();");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" }");
|
||||
|
||||
|
||||
outFile.writeLine(" private Connection getConnection()throws SQLException");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" try");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" InitialContext jndiCntx=new InitialContext();");
|
||||
outFile.writeLine(String(" DataSource ds=(DataSource)jndiCntx.lookup(\"java:") +databaseName+String("\")"));
|
||||
outFile.writeLine(" jndiCntx.close();");
|
||||
outFile.writeLine(" return ds.getConnection();");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" catch(NamingException exception)");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" message(\"[getConnection] Object not found\");");
|
||||
outFile.writeLine(" throw new EJBException(exception);");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" }");
|
||||
|
||||
outFile.writeLine("};");
|
||||
outFile.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClassMapper::mapType(const String &type,String &mapped)
|
||||
{
|
||||
for(int index=0;index<mNameValuePairs.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=mNameValuePairs[index];
|
||||
if(nameValuePair.getName()==type)return mapped=nameValuePair.getValue(),true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ClassMapper::loadMapping(const String &strPathMapFile)
|
||||
{
|
||||
File inFile;
|
||||
String strLine;
|
||||
String key;
|
||||
String value;
|
||||
|
||||
mNameValuePairs.remove();
|
||||
if(!inFile.open(strPathMapFile,"rb"))return false;
|
||||
while(true)
|
||||
{
|
||||
inFile.readLine(strLine);
|
||||
if(strLine.isNull())break;
|
||||
key=strLine.betweenString(0,'=');
|
||||
value=strLine.betweenString('=',0);
|
||||
mNameValuePairs.insert(&NameValuePair(key,value));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
String ClassMapper::makeHungarian(const String &name)
|
||||
{
|
||||
String hungarianName;
|
||||
|
||||
int length=name.length();
|
||||
for(int index=0;index<length;index++)
|
||||
{
|
||||
char ch=name.charAt(index);
|
||||
if(ch=='_')
|
||||
{
|
||||
if(index+1>=length)break;
|
||||
index++;
|
||||
ch=toupper(name.charAt(index));
|
||||
hungarianName+=ch;
|
||||
}
|
||||
else hungarianName+=ch;
|
||||
}
|
||||
return hungarianName;
|
||||
}
|
||||
|
||||
String ClassMapper::makeAccessor(const String &name)
|
||||
{
|
||||
String str;
|
||||
|
||||
str+="get";
|
||||
str+=toupper(name.charAt(0));
|
||||
str+=name.substr(1);
|
||||
return str;
|
||||
}
|
||||
|
||||
String ClassMapper::makeMutator(const String &name)
|
||||
{
|
||||
String str;
|
||||
|
||||
str+="set";
|
||||
str+=toupper(name.charAt(0));
|
||||
str+=name.substr(1);
|
||||
return str;
|
||||
}
|
||||
|
||||
String ClassMapper::makeFirstUpper(const String &name)
|
||||
{
|
||||
String str;
|
||||
str+=toupper(name.charAt(0));
|
||||
str+=name.substr(1);
|
||||
return str;
|
||||
}
|
||||
|
||||
String ClassMapper::makeFirstLower(const String &name)
|
||||
{
|
||||
String str;
|
||||
str+=tolower(name.charAt(0));
|
||||
str+=name.substr(1);
|
||||
return str;
|
||||
}
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
if(8!=argc)
|
||||
{
|
||||
printf("USAGE: mapclass <java{c#}><packagename><classname><databasename><tablename><pathtomappingtable><pathtotable>\n");
|
||||
printf("(ie) mapclass c# zbi.risk.server.vhi.mapped Historic DRMS dt_main_positions c:\\work\\classgen\\mapping.txt c:\\work\\classgen\\table.txt\n");
|
||||
printf("where 'table.txt' contains lines of pairs...\n");
|
||||
printf("trade_date smalldatetime 4 0\n\n");
|
||||
printf("and 'mapping.txt' contains lines of pairs...\n");
|
||||
printf("nvarchar=string\n");
|
||||
printf("decimal=decimal\n");
|
||||
return 0;
|
||||
}
|
||||
ClassMapper classMapper;
|
||||
if(!classMapper.createClass(argv[1],argv[2],argv[3],argv[4],argv[5],argv[6],argv[7]))return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
72
ClassGen/NameValuePair.hpp
Normal file
72
ClassGen/NameValuePair.hpp
Normal file
@@ -0,0 +1,72 @@
|
||||
#ifndef _PROTO_NAMEVALUE_HPP_
|
||||
#define _PROTO_NAMEVALUE_HPP_
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
|
||||
class NameValuePair
|
||||
{
|
||||
public:
|
||||
NameValuePair();
|
||||
NameValuePair(const String &name,const String &value);
|
||||
const String &getName(void)const;
|
||||
void setName(const String &name);
|
||||
const String &getValue(void)const;
|
||||
void setValue(const String &value);
|
||||
bool fromString(const String &string);
|
||||
String toString(void)const;
|
||||
private:
|
||||
String mName;
|
||||
String mValue;
|
||||
};
|
||||
|
||||
inline
|
||||
NameValuePair::NameValuePair()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
NameValuePair::NameValuePair(const String &name,const String &value)
|
||||
: mName(name), mValue(value)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
const String &NameValuePair::getName(void)const
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
inline
|
||||
void NameValuePair::setName(const String &name)
|
||||
{
|
||||
mName=name;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &NameValuePair::getValue(void)const
|
||||
{
|
||||
return mValue;
|
||||
}
|
||||
|
||||
inline
|
||||
void NameValuePair::setValue(const String &value)
|
||||
{
|
||||
mValue=value;
|
||||
}
|
||||
|
||||
inline
|
||||
bool NameValuePair::fromString(const String &string)
|
||||
{
|
||||
if(string.isNull())return false;
|
||||
mName=string.betweenString(0,'=');
|
||||
mValue=string.betweenString('=',0);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
String NameValuePair::toString(void)const
|
||||
{
|
||||
return mName+String("=")+mValue;
|
||||
}
|
||||
#endif
|
||||
101
ClassGen/classgen.dsp
Normal file
101
ClassGen/classgen.dsp
Normal file
@@ -0,0 +1,101 @@
|
||||
# Microsoft Developer Studio Project File - Name="classgen" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=classgen - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "classgen.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "classgen.mak" CFG="classgen - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "classgen - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "classgen - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "classgen - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "classgen - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /Gz /MTd /W1 /Gm /GX /ZI /Od /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32" /D "STRICT" /D "__FLAT__" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "classgen - Win32 Release"
|
||||
# Name "classgen - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
44
ClassGen/classgen.dsw
Normal file
44
ClassGen/classgen.dsw
Normal file
@@ -0,0 +1,44 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "classgen"=.\classgen.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=..\common\common.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
ClassGen/classgen.opt
Normal file
BIN
ClassGen/classgen.opt
Normal file
Binary file not shown.
33
ClassGen/classgen.plg
Normal file
33
ClassGen/classgen.plg
Normal file
@@ -0,0 +1,33 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: classgen - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP17B.tmp" with contents
|
||||
[
|
||||
/nologo /Gz /MTd /Gm /GX /ZI /Od /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WIN32" /D "STRICT" /D "__FLAT__" /Fp"Debug/classgen.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
|
||||
"D:\work\ClassGen\Main.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP17B.tmp"
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP17C.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/classgen.pdb" /debug /machine:I386 /out:"Debug/classgen.exe" /pdbtype:sept
|
||||
.\Debug\Main.obj
|
||||
\work\exe\mscommon.lib
|
||||
]
|
||||
Creating command line "link.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP17C.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
Main.cpp
|
||||
Linking...
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
classgen.exe - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
103
ClassGen/historic.txt
Normal file
103
ClassGen/historic.txt
Normal file
@@ -0,0 +1,103 @@
|
||||
trade_date smalldatetime 4 0
|
||||
trade_date_txt varchar 10 1
|
||||
portfolio varchar 30 0
|
||||
sub_portfolio varchar 30 0
|
||||
ticker varchar 25 0
|
||||
ticker_desc varchar 60 1
|
||||
uticker varchar 25 0
|
||||
instrument varchar 3 0
|
||||
contract_size decimal 9 1
|
||||
hedge_index varchar 4 1
|
||||
hedge_sector varchar 4 1
|
||||
area varchar 6 1
|
||||
area_sector varchar 6 1
|
||||
y_close decimal 9 1
|
||||
uticker_close decimal 9 1
|
||||
y_uticker_close decimal 9 1
|
||||
delta decimal 9 1
|
||||
y_delta decimal 9 1
|
||||
hedge_beta decimal 5 1
|
||||
area_beta decimal 5 1
|
||||
sector_beta decimal 5 1
|
||||
group_beta decimal 5 1
|
||||
qty decimal 9 0
|
||||
y_qty decimal 9 0
|
||||
qty_change decimal 9 1
|
||||
hedge_close decimal 9 1
|
||||
hedge_perc decimal 9 1
|
||||
area_close decimal 9 1
|
||||
area_perc decimal 9 1
|
||||
sector_close decimal 9 1
|
||||
sector_perc decimal 9 1
|
||||
mkt_value decimal 13 1
|
||||
y_mkt_value decimal 13 1
|
||||
exposure decimal 13 1
|
||||
y_exposure decimal 13 1
|
||||
hb_exposure decimal 13 1
|
||||
y_hb_exposure decimal 13 1
|
||||
ab_exposure decimal 13 1
|
||||
y_ab_exposure decimal 13 1
|
||||
sb_exposure decimal 13 1
|
||||
y_sb_exposure decimal 13 1
|
||||
pnl decimal 13 1
|
||||
pnl_perc decimal 13 1
|
||||
price_change decimal 13 1
|
||||
price_change_perc decimal 13 1
|
||||
price_change_amt decimal 13 1
|
||||
sector_alpha_perc decimal 13 1
|
||||
group_alpha_perc decimal 13 1
|
||||
area_alpha_perc decimal 13 1
|
||||
hedge_alpha_perc decimal 13 1
|
||||
area_pnl_amt decimal 13 1
|
||||
sector_pnl_amt decimal 13 1
|
||||
sector_alpha_amt decimal 13 1
|
||||
group_alpha_amt decimal 13 1
|
||||
area_alpha_amt decimal 13 1
|
||||
hedge_alpha_amt decimal 13 1
|
||||
ab_return_amt decimal 13 1
|
||||
ab_return_perc decimal 13 1
|
||||
alt_index_return_perc decimal 13 1
|
||||
alt_index_return_amt decimal 13 1
|
||||
index_beta_adj_perc decimal 13 1
|
||||
index_beta_adj_amt decimal 13 1
|
||||
intraday_perc decimal 13 1
|
||||
intraday_amt decimal 13 1
|
||||
optionality_perc decimal 13 1
|
||||
optionality_amt decimal 13 1
|
||||
currency varchar 5 1
|
||||
base_close decimal 9 1
|
||||
y_base_close decimal 9 1
|
||||
fx_perc decimal 9 1
|
||||
fx_amt decimal 9 1
|
||||
fx_rate decimal 9 1
|
||||
y_fx_rate decimal 9 1
|
||||
exposure_view varchar 5 1
|
||||
market_view varchar 5 0
|
||||
call_put varchar 4 1
|
||||
days_expire int 4 1
|
||||
strike_price decimal 9 1
|
||||
associate nvarchar 30 1
|
||||
ipo bit 1 1
|
||||
ratio decimal 9 1
|
||||
exported bit 1 0
|
||||
source varchar 10 1
|
||||
vwap decimal 13 1
|
||||
vwap_pnl decimal 13 1
|
||||
adh decimal 13 1
|
||||
aac decimal 13 1
|
||||
azap decimal 13 1
|
||||
go_around smalldatetime 4 1
|
||||
alpha_go_around decimal 13 1
|
||||
alpha_real decimal 13 1
|
||||
alpha_unreal decimal 13 1
|
||||
pnl_real decimal 13 1
|
||||
pnl_unreal decimal 13 1
|
||||
cash_flow decimal 13 1
|
||||
beta_cash_flow decimal 13 1
|
||||
last_trade_date smalldatetime 4 1
|
||||
last_trade_qty decimal 9 1
|
||||
enterprise_value decimal 13 1
|
||||
mkt_cap decimal 13 1
|
||||
wgt_ave decimal 9 1
|
||||
volume decimal 13 1
|
||||
RowID bigint 8 0
|
||||
8
ClassGen/mapping.txt
Normal file
8
ClassGen/mapping.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
nvarchar=string
|
||||
decimal=decimal
|
||||
float=float
|
||||
varchar=string
|
||||
smalldatetime=DateTime
|
||||
int=int
|
||||
bit=bool
|
||||
bigint=long
|
||||
25
ClassGen/scraps.txt
Normal file
25
ClassGen/scraps.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
bool ClassMapper::createResultClass(const String &packageName,const String &className,const String &instanceName,Block<NameValuePair> &variables,Block<NameValuePair> &originals)
|
||||
{
|
||||
File outFile;
|
||||
|
||||
if(!outFile.open(className+String("RS")+String(".java"),"wb"))return false;
|
||||
if(!packageName.isNull())outFile.writeLine(String("package ")+packageName);
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("public void processResult()");
|
||||
outFile.writeLine("{");
|
||||
outFile.writeLine(String(" ")+className+String(" ")+instanceName+String(";"));
|
||||
outFile.writeLine(" ResultSet rs;");
|
||||
outFile.writeLine("// fill in the blanks");
|
||||
for(int index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &original=originals[index];
|
||||
NameValuePair &variable=variables[index];
|
||||
outFile.writeLine(String(" ")+instanceName+String(".")+makeMutator(variable.getName())+String("(rs.get")+makeFirstUpper(variable.getValue())+String("(\"")+original.getName()+String("\"));"));
|
||||
}
|
||||
outFile.writeLine("}");
|
||||
outFile.close();
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user