转载需注明:

事件,是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)的更多相关文章

  1. 程序猿的量化交易之路(13)--Cointrader类图(1)

    转载须注明出处:http://blog.csdn.net/minimicall? viewmode=contents, htpp://cloudtrader.top 今天開始正式切入到Cointrad ...

  2. 程序猿的量化交易之路(20)--Cointrader之Assert实体(8)

    转载需说明出处:http://blog.csdn.net/minimicall, http://cloudtrade.top 不论什么可交易的都能够称之为Assert,资产.其类代码例如以下: pac ...

  3. 程序猿的量化交易之路(29)--Cointrader之Tick实体(16)

    转载需注明出处:http://blog.csdn.net/minimicall,http://cloudtrade.top Tick:什么是Tick,在交易平台中很常见,事实上就 单笔交易时某仅仅证券 ...

  4. 程序猿的量化交易之路(24)--Cointrader之RemoteEvent远程事件实体(11)

    转载需注明出处:http://blog.csdn.net/minimicall,http://cloudtrader.top/ 在量化交易系统中.有些事件是远端传来的,比方股票的价格数据等.所以,在这 ...

  5. 程序猿的量化交易之路(30)--Cointrader之ConfigUtil(17)

    转载须注明出处:viewmode=contents">http://blog.csdn.net/minimicall?viewmode=contents.http://cloudtra ...

  6. 程序猿的量化交易之路(26)--Cointrader之Listing挂牌实体(13)

    转载须注明出处:http://blog.csdn.net/minimicall? viewmode=contents,http://cloudtrade.top Listing:挂牌. 比方某仅仅股票 ...

  7. 程序猿的量化交易之路(32)--Cointrade之Portfolio组合(19)

    转载须注明出处:http://blog.csdn.net/minimicall?viewmode=contents,http://cloudtrade.top/ Portfolio:组合,代表的是多个 ...

  8. 程序猿的量化交易之路(27)--Cointrader之PriceData价格数据(14)

    转载须注明出处:http://blog.csdn.net/minimicall?viewmode=contents,http://cloudtrade.top/ PriceData:价格数据.价格数据 ...

  9. 程序猿的量化交易之路(21)--Cointrader之Currency货币实体(9)

    转载须注明出自:http://blog.csdn.net/minimicall? viewmode=contents,http://cloudtrader.top 货币,Cointrader中基本实体 ...

随机推荐

  1. spark 按照key 分组 然后统计每个key对应的最大、最小、平均值思路——使用groupby,或者reduceby

    What you're getting back is an object which allows you to iterate over the results. You can turn the ...

  2. Springboot 之 引入Thymeleaf

    转自:https://segmentfault.com/a/1190000011149325 前言 Spring-boot-starter-web集成了Tomcat以及Spring MVC,会自动配置 ...

  3. 前端(小程序)项目Aes.js/Md5.js加密的处理方法

    做项目中需要对前端数据加密传输这个时候需要用到前端加密的算法主要是:Aes.js,Md5.js 一.Vue项目用到的aes.js加密. 1.直接在index.html引入aes.js或者在npm in ...

  4. C# txt文件操作

    //打开文件到流 FileStream fs=new FileStream(path,FileMode.Open,FileAccess.ReadWrite); //写文件流的方法 StreamWrit ...

  5. 判断输入的值是否为Double

    using System; using System.Collections.Generic; using System.Text; namespace TDRFactory { public cla ...

  6. 多线程之HttpClient

    在程序用调用 Http 接口.请求 http 资源.编写 http 爬虫等的时候都需要在程序集中进行 Http 请求. 很多人习惯的 WebClient.HttpWebRequest 在 TPL 下很 ...

  7. TensorFlow-mnist

    训练代码: from __future__ import absolute_import from __future__ import division from __future__ import ...

  8. 【Oracle】数据库热备

    1. 创建脚本 注:脚本第三行中的DB_NAME,需要改为自己的数据库名(show parameter name;): oracle用户下新建目录:/home/oracle/DB_NAME/hot_b ...

  9. 06《UML大战需求分析》之六

    不知不觉中,大多数课程的学习已经接近了尾声,<UML大战需求分析>这本书也陪伴了我们很久.在学习的过程中,我发现很多课程中其实都离不开UML.足以证明,UML在需求分析中的重大作用和在我们 ...

  10. Java中的常量

    常量的概念 是指在Java程序中固定不变的数据.我们可以理解为是一种特殊的变量,它的值被设定后,在程序运行过程中不允许改变. 常量的分类 整数常量:  所有的整数   例如 100 -100 123 ...