程序猿的量化交易之路(18)--Cointrader之Event实体(6)
转载需注明:
事件,是Esper的重要概念。
这里我们定义个事件类。它是Temporal实体的派生类。
不过对Temporal简单的包装。其代码例如以下:
package org.cryptocoinpartners.schema; import org.joda.time.Instant; import javax.persistence.MappedSuperclass; /**
* Subclasses of Event may be posted to Context
*
* @author Tim Olson
*/
//是一个基类,在数据库中不创建表格。 @MappedSuperclass
public abstract class Event extends Temporal { /**
* If the Event's time has not been set when it is being published, it will be set to the current time of the
* publishing Context
*/
public void publishedAt(Instant instant) {
if( getTime() == null )
setTime(instant);
} /** Most events should use this constructor to provide the time of the original happening, not the time of
* object creation */
protected Event(Instant time) {
super(time);
} protected Event() {} }
程序猿的量化交易之路(18)--Cointrader之Event实体(6)的更多相关文章
- 程序猿的量化交易之路(13)--Cointrader类图(1)
转载须注明出处:http://blog.csdn.net/minimicall? viewmode=contents, htpp://cloudtrader.top 今天開始正式切入到Cointrad ...
- 程序猿的量化交易之路(20)--Cointrader之Assert实体(8)
转载需说明出处:http://blog.csdn.net/minimicall, http://cloudtrade.top 不论什么可交易的都能够称之为Assert,资产.其类代码例如以下: pac ...
- 程序猿的量化交易之路(29)--Cointrader之Tick实体(16)
转载需注明出处:http://blog.csdn.net/minimicall,http://cloudtrade.top Tick:什么是Tick,在交易平台中很常见,事实上就 单笔交易时某仅仅证券 ...
- 程序猿的量化交易之路(24)--Cointrader之RemoteEvent远程事件实体(11)
转载需注明出处:http://blog.csdn.net/minimicall,http://cloudtrader.top/ 在量化交易系统中.有些事件是远端传来的,比方股票的价格数据等.所以,在这 ...
- 程序猿的量化交易之路(30)--Cointrader之ConfigUtil(17)
转载须注明出处:viewmode=contents">http://blog.csdn.net/minimicall?viewmode=contents.http://cloudtra ...
- 程序猿的量化交易之路(26)--Cointrader之Listing挂牌实体(13)
转载须注明出处:http://blog.csdn.net/minimicall? viewmode=contents,http://cloudtrade.top Listing:挂牌. 比方某仅仅股票 ...
- 程序猿的量化交易之路(32)--Cointrade之Portfolio组合(19)
转载须注明出处:http://blog.csdn.net/minimicall?viewmode=contents,http://cloudtrade.top/ Portfolio:组合,代表的是多个 ...
- 程序猿的量化交易之路(27)--Cointrader之PriceData价格数据(14)
转载须注明出处:http://blog.csdn.net/minimicall?viewmode=contents,http://cloudtrade.top/ PriceData:价格数据.价格数据 ...
- 程序猿的量化交易之路(21)--Cointrader之Currency货币实体(9)
转载须注明出自:http://blog.csdn.net/minimicall? viewmode=contents,http://cloudtrader.top 货币,Cointrader中基本实体 ...
随机推荐
- PDOHelper (原创)
class PDOHelper{ public static $db =null;// new PDO('mysql:host=192.168.1.68;dbname=test','root','12 ...
- BZOJ 2794 DP
思路: 考虑把询问离线 按照m排序 物品按照a排序 f[i]表示c[j]的和到i b的最大值 背包就好 O(nk)竟然能过-- //By SiriusRen #include <cstdio&g ...
- BZOJ 3522 DFS+DP
思路: f[]表示选1个点的 g[]表示选2个点的 dp一下 ans+=(ll)g[k]*deep[k]; g[k]+=(ll)f[k]*deep[k]; f[k]+=deep[k]; 听说有O(n) ...
- 2-SAT 小结
PS:今天(2014.10.27)准备PPT,明天在组合数学课上与大家一起分享一下2-SAT.我以为是一件简单的事情.但是,当我看了自己这篇博客以后,发现居然还是不懂.很多资料不全,也没仔细讲.整理了 ...
- 推荐10个超棒的jQuery工具 提示插件
脚本之家 http://www.jb51.net/article/28525.htm
- smarty 3 + codeigniter 2 + hmvc
参考资料 https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/src/fecd39ccdf56?at=defau ...
- WCF - NetCtP 双工错误列表
1. 在服务 Transfer 实现的协定列表中找不到协定名称 "IMetadataExchange" 将 ServiceMetadataBehavior 添加到配置文件或直接添加 ...
- 配置notepad++编程环境
1. 到 https://sourceforge.net/projects/mingw-w64/files/ 下载MinGW64,解压并移动到C盘根目录 2. 将 C:\MinGW64\bin 加入系 ...
- 我的C++笔记(函数部分)
#include <iostream> #include <cmath>//C++的数学函数库 using namespace std; class Point{ public ...
- 引用css样式的书写格式
css的书写格式一共有三种 行内样式:意思是在行内中写样式 例如说<p style="color:red">用行内样式编写我的颜色</p> 只适用于< ...