Examples of LobHandler


Examples of org.springframework.jdbc.support.lob.LobHandler

    when(incrementerFactory.getIncrementer("ORACLE", tablePrefix + "JOB_SEQ")).thenReturn(new StubIncrementer());
    when(incrementerFactory.getIncrementer("ORACLE", tablePrefix + "JOB_EXECUTION_SEQ")).thenReturn(new StubIncrementer());
    when(incrementerFactory.getIncrementer("ORACLE", tablePrefix + "STEP_EXECUTION_SEQ")).thenReturn(new StubIncrementer());
    factory.setIncrementerFactory(incrementerFactory);

    LobHandler lobHandler = new DefaultLobHandler();
    factory.setLobHandler(lobHandler);

    factory.afterPropertiesSet();
    assertEquals(lobHandler, ReflectionTestUtils.getField(factory, "lobHandler"));
View Full Code Here

Examples of org.springframework.jdbc.support.lob.LobHandler

    _version1Instant = now.minusSeconds(100);
    _version2Instant = now.minusSeconds(50);
    s_logger.debug("test data now:   {}", _version1Instant);
    s_logger.debug("test data later: {}", _version2Instant);
    FudgeContext fudgeContext = OpenGammaFudgeContext.getInstance();
    LobHandler lobHandler = new DefaultLobHandler();
    final JdbcOperations template = _exgMaster.getDbConnector().getJdbcOperations();
    ManageableExchange exchange = new ManageableExchange();
    exchange.setUniqueId(UniqueId.of("DbExg", "101", "0"));
    exchange.setExternalIdBundle(ExternalIdBundle.of(ExternalId.of("A", "B"), ExternalId.of("C", "D"), ExternalId.of("E", "F")));
    exchange.setName("TestExchange101");
View Full Code Here

Examples of org.springframework.jdbc.support.lob.LobHandler

      UniqueId uniqueId = createUniqueId(docOid, docId);
     
      ManageableMarketDataSnapshot marketDataSnapshot;
      //PLAT-1378
      if (_includeData) {
        LobHandler lob = getDialect().getLobHandler();
        byte[] bytes = lob.getBlobAsBytes(rs, "DETAIL");
        marketDataSnapshot = FUDGE_CONTEXT.readObject(ManageableMarketDataSnapshot.class,
            new ByteArrayInputStream(bytes));
        if (!_includeData) {
          marketDataSnapshot.setGlobalValues(null);
          marketDataSnapshot.setYieldCurves(null);
View Full Code Here

Examples of org.springframework.jdbc.support.lob.LobHandler

  private void addExternalIds() {
    FudgeMsgEnvelope env = s_fudgeContext.toFudgeMsg(ExternalId.of("A", "B"));
    byte[] bytes = s_fudgeContext.toByteArray(env.getMessage());
    String cls = ExternalId.class.getName();
    LobHandler lobHandler = new DefaultLobHandler();
    final JdbcOperations template = _cfgMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO cfg_config VALUES (?,?,?,?,?, ?,?,?,?)",
        101, 101, toSqlTimestamp(_version1aInstant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1aInstant), MAX_SQL_TIMESTAMP, "TestConfig101", cls,
        new SqlParameterValue(Types.BLOB, new SqlLobValue(bytes, lobHandler)));
    template.update("INSERT INTO cfg_config VALUES (?,?,?,?,?, ?,?,?,?)",
View Full Code Here

Examples of org.springframework.jdbc.support.lob.LobHandler

 
  private void addExternalIdBundles() {
    FudgeMsgEnvelope env = s_fudgeContext.toFudgeMsg(ExternalIdBundle.of(ExternalId.of("C", "D"), ExternalId.of("E", "F")));
    byte[] bytes = s_fudgeContext.toByteArray(env.getMessage());
    String cls = ExternalIdBundle.class.getName();
    LobHandler lobHandler = new DefaultLobHandler();
    final JdbcOperations template = _cfgMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO cfg_config VALUES (?,?,?,?,?, ?,?,?,?)",
        301, 301, toSqlTimestamp(_version1aInstant), MAX_SQL_TIMESTAMP, toSqlTimestamp(_version1aInstant), MAX_SQL_TIMESTAMP, "TestConfig301", cls,
        new SqlParameterValue(Types.BLOB, new SqlLobValue(bytes, lobHandler)));
    template.update("INSERT INTO cfg_config VALUES (?,?,?,?,?, ?,?,?,?)",
View Full Code Here

Examples of org.springframework.jdbc.support.lob.LobHandler

      final String name = rs.getString("NAME");
      final String type = rs.getString("SEC_TYPE");
      UniqueId uniqueId = createUniqueId(docOid, docId);
      String detailType = rs.getString("DETAIL_TYPE");
      if (detailType.equalsIgnoreCase("R")) {
        LobHandler lob = getDialect().getLobHandler();
        byte[] rawData = lob.getBlobAsBytes(rs, "RAW_DATA");
        _security = new RawSecurity(type, rawData);
        _security.setUniqueId(uniqueId);
        _security.setName(name)
      } else {
        _security = new ManageableSecurity(uniqueId, name, type, ExternalIdBundle.EMPTY);
View Full Code Here

Examples of org.springframework.jdbc.support.lob.LobHandler

      final Timestamp versionTo = rs.getTimestamp("VER_TO_INSTANT");
      final Timestamp correctionFrom = rs.getTimestamp("CORR_FROM_INSTANT");
      final Timestamp correctionTo = rs.getTimestamp("CORR_TO_INSTANT");
      final String name = rs.getString("NAME");
      final String configType = rs.getString("CONFIG_TYPE");
      LobHandler lob = getDialect().getLobHandler();
      byte[] bytes = lob.getBlobAsBytes(rs, "CONFIG");
      Class<?> reifiedType = null;
      try {
        reifiedType = ClassUtils.loadClass(configType);
      } catch (ClassNotFoundException ex) {
        s_logger.warn("ConfigType: {} class can not be found for docOid: {}", configType, docOid);
View Full Code Here

Examples of org.springframework.jdbc.support.lob.LobHandler

      final long docOid = rs.getLong("DOC_OID");
      final Timestamp versionFrom = rs.getTimestamp("VER_FROM_INSTANT");
      final Timestamp versionTo = rs.getTimestamp("VER_TO_INSTANT");
      final Timestamp correctionFrom = rs.getTimestamp("CORR_FROM_INSTANT");
      final Timestamp correctionTo = rs.getTimestamp("CORR_TO_INSTANT");
      LobHandler lob = getDialect().getLobHandler();
      byte[] bytes = lob.getBlobAsBytes(rs, "DETAIL");
      ManageableExchange exchange = FUDGE_CONTEXT.readObject(ManageableExchange.class, new ByteArrayInputStream(bytes));
     
      ExchangeDocument doc = new ExchangeDocument();
      doc.setUniqueId(createUniqueId(docOid, docId));
      doc.setVersionFromInstant(DbDateUtils.fromSqlTimestamp(versionFrom));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.