当前位置: 首页>>代码示例>>Java>>正文


Java Instant.minusSeconds方法代码示例

本文整理汇总了Java中org.threeten.bp.Instant.minusSeconds方法的典型用法代码示例。如果您正苦于以下问题:Java Instant.minusSeconds方法的具体用法?Java Instant.minusSeconds怎么用?Java Instant.minusSeconds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.threeten.bp.Instant的用法示例。


在下文中一共展示了Instant.minusSeconds方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: data_timeBounds

import org.threeten.bp.Instant; //导入方法依赖的package包/类
@DataProvider(name = "timeBounds")
Object[][] data_timeBounds() {
  Instant now = Instant.now();
  return new Object[][] {
      {null, null, null, true},
      {null, now.minusSeconds(20), null, true},
      {null, now.plusSeconds(20), null, false},
      {null, null, now.minusSeconds(20), false},
      {null, null, now.plusSeconds(20), true},
      {now, null, null, true},
      {now, now.minusSeconds(20), null, true},
      {now, now.plusSeconds(20), null, false},
      {now, null, now.minusSeconds(20), false},
      {now, null, now.plusSeconds(20), true},
      {now, now.minusSeconds(20), now.plusSeconds(20), true},
      {now, now.minusSeconds(40), now.minusSeconds(20), false},
      {now, now.minusSeconds(20), now.minusSeconds(40), false},
      {now, now.plusSeconds(20), now.plusSeconds(40), false},
      {now, now.plusSeconds(40), now.plusSeconds(20), false},
  };
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:22,代码来源:AbstractSearchRequestTest.java

示例2: init

import org.threeten.bp.Instant; //导入方法依赖的package包/类
private void init() {
  _cfgMaster = new DbConfigMaster(getDbConnector());
  Instant now = Instant.now();
  _cfgMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
  _version1aInstant = now.minusSeconds(102);
  _version1bInstant = now.minusSeconds(101);
  _version1cInstant = now.minusSeconds(100);
  _version2Instant = now.minusSeconds(50);
  addExternalIds();
  addExternalIdBundles();
  _totalConfigs = 6;
}
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:13,代码来源:AbstractDbConfigMasterWorkerTest.java

示例3: init

import org.threeten.bp.Instant; //导入方法依赖的package包/类
private void init() throws Exception {
    super.setUp();
    ConfigurableApplicationContext context = DbMasterTestUtils.getContext(getDatabaseType());
    _secMaster = (DbSecurityMaster) context.getBean(getDatabaseType() + "DbSecurityMaster");
    
//    id bigint not null,
//    oid bigint not null,
//    ver_from_instant timestamp not null,
//    ver_to_instant timestamp not null,
//    corr_from_instant timestamp not null,
//    corr_to_instant timestamp not null,
//    name varchar(255) not null,
//    sec_type varchar(255) not null,
    Instant now = Instant.now();
    _secMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final SimpleJdbcTemplate template = _secMaster.getDbConnector().getJdbcTemplate();
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        101, 101, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, "TestSecurity101", "EQUITY", "D");
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        102, 102, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, "TestSecurity102", "EQUITY", "D");
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        201, 201, toSqlTimestamp(_version1Instant), toSqlTimestamp(_version2Instant), toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, "TestSecurity201", "EQUITY", "D");
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        202, 201, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP, "TestSecurity202", "EQUITY", "D");
    _totalSecurities = 3;
//  id bigint not null,
//  key_scheme varchar(255) not null,
//  key_value varchar(255) not null,
    template.update("INSERT INTO sec_idkey VALUES (?,?,?)",
        1, "A", "B");
    template.update("INSERT INTO sec_idkey VALUES (?,?,?)",
        2, "C", "D");
    template.update("INSERT INTO sec_idkey VALUES (?,?,?)",
        3, "E", "F");
    template.update("INSERT INTO sec_idkey VALUES (?,?,?)",
        4, "GH", "HI");
//  security_id bigint not null,
//  idkey_id bigint not null,
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        101, 1);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        101, 2);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        101, 3);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        102, 1);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        102, 2);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        102, 4);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        201, 2);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        201, 3);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        202, 2);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        202, 3);
  }
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:64,代码来源:AbstractDbSecurityMasterWorkerBulkTest.java

示例4: init

import org.threeten.bp.Instant; //导入方法依赖的package包/类
private void init() {
    _lenMaster = new DbLegalEntityBeanMaster(getDbConnector());

//    id bigint NOT NULL,
//    oid bigint NOT NULL,
//    ver_from_instant timestamp without time zone NOT NULL,
//    ver_to_instant timestamp without time zone NOT NULL,
//    corr_from_instant timestamp without time zone NOT NULL,
//    corr_to_instant timestamp without time zone NOT NULL,
//    name varchar(255) NOT NULL,
//    main_type char NOT NULL,
//    sub_type varchar(255) NOT NULL,
//    java_type varchar(255) NOT NULL,
//    packed_data blob NOT NULL,
    Instant now = Instant.now();
    _lenMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final JdbcOperations template = _lenMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO len_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        101, 101, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestLegalEntity101", "S", "MOCK", "MockLegalEntity", blob("TestLegalEntity101", BUNDLE_101));
    template.update("INSERT INTO len_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        102, 102, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestLegalEntity102", "S", "MOCK", "MockLegalEntity", blob("TestLegalEntity102", BUNDLE_102));
    template.update("INSERT INTO len_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        201, 201, toSqlTimestamp(_version1Instant), toSqlTimestamp(_version2Instant), toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestLegalEntity201", "S", "MOCK", "MockLegalEntity", blob("TestLegalEntity201", BUNDLE_201));
    template.update("INSERT INTO len_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        202, 201, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP,
        "TestLegalEntity202", "S", "MOCK", "MockLegalEntity", blob("TestLegalEntity202", BUNDLE_201));
    _totalSecurities = 3;
//  id bigint not null,
//  key_scheme varchar(255) not null,
//  key_value varchar(255) not null,
    template.update("INSERT INTO len_idkey VALUES (?,?,?)",
        1, "A", "B");
    template.update("INSERT INTO len_idkey VALUES (?,?,?)",
        2, "C", "D");
    template.update("INSERT INTO len_idkey VALUES (?,?,?)",
        3, "E", "F");
    template.update("INSERT INTO len_idkey VALUES (?,?,?)",
        4, "GH", "HI");
//  doc_id bigint not null,
//  idkey_id bigint not null,
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        101, 1);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        101, 2);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        101, 3);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        102, 1);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        102, 2);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        102, 4);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        201, 2);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        201, 3);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        202, 2);
    template.update("INSERT INTO len_doc2idkey VALUES (?,?)",
        202, 3);
  }
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:69,代码来源:AbstractDbLegalEntityBeanMasterTest.java

示例5: init

import org.threeten.bp.Instant; //导入方法依赖的package包/类
private void init() {
    DbConnector dbConnector = _dbConnectors.get(getDatabaseType());
    if (dbConnector == null) {
      dbConnector = getDbConnector();
      _dbConnectors.put(getDatabaseType(), dbConnector);
    }
    _secMaster = new DbSecurityMaster(dbConnector);
    _secMaster.setDetailProvider(new HibernateSecurityMasterDetailProvider());
    
//    id bigint not null,
//    oid bigint not null,
//    ver_from_instant timestamp not null,
//    ver_to_instant timestamp not null,
//    corr_from_instant timestamp not null,
//    corr_to_instant timestamp not null,
//    name varchar(255) not null,
//    sec_type varchar(255) not null,
    Instant now = Instant.now();
    _secMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final JdbcOperations template = _secMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        101, 101, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, "TestSecurity101", "EQUITY", "D");
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        102, 102, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, "TestSecurity102", "EQUITY", "D");
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        201, 201, toSqlTimestamp(_version1Instant), toSqlTimestamp(_version2Instant), toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, "TestSecurity201", "EQUITY", "D");
    template.update("INSERT INTO sec_security VALUES (?,?,?,?,?, ?,?,?,?)",
        202, 201, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP, "TestSecurity202", "EQUITY", "D");
    _totalSecurities = 3;
//  id bigint not null,
//  key_scheme varchar(255) not null,
//  key_value varchar(255) not null,
    template.update("INSERT INTO sec_idkey VALUES (?,?,?)",
        1, "A", "B");
    template.update("INSERT INTO sec_idkey VALUES (?,?,?)",
        2, "C", "D");
    template.update("INSERT INTO sec_idkey VALUES (?,?,?)",
        3, "E", "F");
    template.update("INSERT INTO sec_idkey VALUES (?,?,?)",
        4, "GH", "HI");
//  security_id bigint not null,
//  idkey_id bigint not null,
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        101, 1);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        101, 2);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        101, 3);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        102, 1);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        102, 2);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        102, 4);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        201, 2);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        201, 3);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        202, 2);
    template.update("INSERT INTO sec_security2idkey VALUES (?,?)",
        202, 3);
  }
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:68,代码来源:AbstractDbSecurityMasterWorkerTest.java

示例6: init

import org.threeten.bp.Instant; //导入方法依赖的package包/类
private void init() {
    _holMaster = new DbHolidayMaster(getDbConnector());
    
//    id bigint NOT NULL,
//    oid bigint NOT NULL,
//    ver_from_instant timestamp without time zone NOT NULL,
//    ver_to_instant timestamp without time zone NOT NULL,
//    corr_from_instant timestamp without time zone NOT NULL,
//    corr_to_instant timestamp without time zone NOT NULL,
//    name varchar(255) NOT NULL,
//    provider_scheme varchar(255),
//    provider_value varchar(255),
//    hol_type varchar(255) NOT NULL,
//    region_scheme varchar(255),
//    region_value varchar(255),
//    exchange_scheme varchar(255),
//    exchange_value varchar(255),
//    custom_scheme varchar(255),
//    custom_value varchar(255),
//    currency_iso varchar(255),
    Instant now = Instant.now();
    _holMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final JdbcOperations template = _holMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO hol_holiday VALUES (?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?)",
        101, 101, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestHoliday101", "COPP_CLARK", "1", "CURRENCY", null, null, null, null, null, null, "GBP");
    template.update("INSERT INTO hol_holiday VALUES (?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?)",
        102, 102, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestHoliday102", "COPP_CLARK", "2", "CURRENCY", null, null, null, null, null, null, "EUR");
    template.update("INSERT INTO hol_holiday VALUES (?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?)",
        201, 201, toSqlTimestamp(_version1Instant), toSqlTimestamp(_version2Instant), toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestHoliday201", "COPP_CLARK", "3", "CURRENCY", null, null, null, null, null, null, "GBP");
    template.update("INSERT INTO hol_holiday VALUES (?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?)",
        202, 201, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP,
        "TestHoliday202", "COPP_CLARK", "3", "CURRENCY", null, null, null, null, null, null, "GBP");
    _totalHolidays = 3;
//    holiday_id bigint not null,
//    hol_date date not null,
    template.update("INSERT INTO hol_date VALUES (?,?)",
        101, toSqlDate(LocalDate.of(2010, 1, 1)));
    template.update("INSERT INTO hol_date VALUES (?,?)",
        102, toSqlDate(LocalDate.of(2010, 1, 2)));
    template.update("INSERT INTO hol_date VALUES (?,?)",
        102, toSqlDate(LocalDate.of(2010, 1, 3)));
    template.update("INSERT INTO hol_date VALUES (?,?)",
        201, toSqlDate(LocalDate.of(2010, 2, 1)));
    template.update("INSERT INTO hol_date VALUES (?,?)",
        202, toSqlDate(LocalDate.of(2010, 2, 1)));
  }
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:54,代码来源:AbstractDbHolidayMasterWorkerTest.java

示例7: init

import org.threeten.bp.Instant; //导入方法依赖的package包/类
private void init() {
    _cnvMaster = new DbConventionBeanMaster(getDbConnector());
    
//    id bigint NOT NULL,
//    oid bigint NOT NULL,
//    ver_from_instant timestamp without time zone NOT NULL,
//    ver_to_instant timestamp without time zone NOT NULL,
//    corr_from_instant timestamp without time zone NOT NULL,
//    corr_to_instant timestamp without time zone NOT NULL,
//    name varchar(255) NOT NULL,
//    main_type char NOT NULL,
//    sub_type varchar(255) NOT NULL,
//    java_type varchar(255) NOT NULL,
//    packed_data blob NOT NULL,
    Instant now = Instant.now();
    _cnvMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final JdbcOperations template = _cnvMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO cnv_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        101, 101, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestConvention101", "S", "MOCK", "MockConvention", blob("TestConvention101", BUNDLE_101));
    template.update("INSERT INTO cnv_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        102, 102, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestConvention102", "S", "MOCK", "MockConvention", blob("TestConvention102", BUNDLE_102));
    template.update("INSERT INTO cnv_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        201, 201, toSqlTimestamp(_version1Instant), toSqlTimestamp(_version2Instant), toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestConvention201", "S", "MOCK", "MockConvention", blob("TestConvention201", BUNDLE_201));
    template.update("INSERT INTO cnv_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        202, 201, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP,
        "TestConvention202", "S", "MOCK", "MockConvention", blob("TestConvention202", BUNDLE_201));
    _totalSecurities = 3;
//  id bigint not null,
//  key_scheme varchar(255) not null,
//  key_value varchar(255) not null,
    template.update("INSERT INTO cnv_idkey VALUES (?,?,?)",
        1, "A", "B");
    template.update("INSERT INTO cnv_idkey VALUES (?,?,?)",
        2, "C", "D");
    template.update("INSERT INTO cnv_idkey VALUES (?,?,?)",
        3, "E", "F");
    template.update("INSERT INTO cnv_idkey VALUES (?,?,?)",
        4, "GH", "HI");
//  doc_id bigint not null,
//  idkey_id bigint not null,
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        101, 1);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        101, 2);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        101, 3);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        102, 1);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        102, 2);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        102, 4);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        201, 2);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        201, 3);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        202, 2);
    template.update("INSERT INTO cnv_doc2idkey VALUES (?,?)",
        202, 3);
  }
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:69,代码来源:AbstractDbConventionBeanMasterTest.java

示例8: init

import org.threeten.bp.Instant; //导入方法依赖的package包/类
private void init() {
    _secMaster = new DbSecurityBeanMaster(getDbConnector());
    
//    id bigint NOT NULL,
//    oid bigint NOT NULL,
//    ver_from_instant timestamp without time zone NOT NULL,
//    ver_to_instant timestamp without time zone NOT NULL,
//    corr_from_instant timestamp without time zone NOT NULL,
//    corr_to_instant timestamp without time zone NOT NULL,
//    name varchar(255) NOT NULL,
//    main_type char NOT NULL,
//    sub_type varchar(255) NOT NULL,
//    java_type varchar(255) NOT NULL,
//    packed_data blob NOT NULL,
    Instant now = Instant.now();
    _secMaster.setClock(Clock.fixed(now, ZoneOffset.UTC));
    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    final JdbcOperations template = _secMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO secb_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        101, 101, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestSecurity101", "S", "EQUITY", "EquitySecurity", blob("TestSecurity101", BUNDLE_101));
    template.update("INSERT INTO secb_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        102, 102, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestSecurity102", "S", "EQUITY", "EquitySecurity", blob("TestSecurity102", BUNDLE_102));
    template.update("INSERT INTO secb_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        201, 201, toSqlTimestamp(_version1Instant), toSqlTimestamp(_version2Instant), toSqlTimestamp(_version1Instant), MAX_SQL_TIMESTAMP,
        "TestSecurity201", "S", "EQUITY", "EquitySecurity", blob("TestSecurity201", BUNDLE_201));
    template.update("INSERT INTO secb_document VALUES (?,?,?,?,?, ?,?,?,?,?, ?)",
        202, 201, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version2Instant), MAX_SQL_TIMESTAMP,
        "TestSecurity202", "S", "EQUITY", "EquitySecurity", blob("TestSecurity202", BUNDLE_201));
    _totalSecurities = 3;
//  id bigint not null,
//  key_scheme varchar(255) not null,
//  key_value varchar(255) not null,
    template.update("INSERT INTO secb_idkey VALUES (?,?,?)",
        1, "A", "B");
    template.update("INSERT INTO secb_idkey VALUES (?,?,?)",
        2, "C", "D");
    template.update("INSERT INTO secb_idkey VALUES (?,?,?)",
        3, "E", "F");
    template.update("INSERT INTO secb_idkey VALUES (?,?,?)",
        4, "GH", "HI");
//  security_id bigint not null,
//  idkey_id bigint not null,
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        101, 1);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        101, 2);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        101, 3);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        102, 1);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        102, 2);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        102, 4);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        201, 2);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        201, 3);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        202, 2);
    template.update("INSERT INTO secb_doc2idkey VALUES (?,?)",
        202, 3);
  }
 
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:69,代码来源:AbstractDbSecurityBeanMasterTest.java


注:本文中的org.threeten.bp.Instant.minusSeconds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。