Examples of nextLongValue()


Examples of org.springframework.jdbc.support.incrementer.MySQLMaxValueIncrementer.nextLongValue()

    incrementer.afterPropertiesSet();

    assertEquals(1, incrementer.nextIntValue());
    assertEquals(2, incrementer.nextLongValue());
    assertEquals("3", incrementer.nextStringValue());
    assertEquals(4, incrementer.nextLongValue());

    verify(statement, times(2)).executeUpdate("update myseq set seq = last_insert_id(seq + 2)");
    verify(resultSet, times(2)).close();
    verify(statement, times(2)).close();
    verify(connection, times(2)).close();
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer.nextLongValue()

    incrementer.setDataSource(ds);
    incrementer.setIncrementerName("myseq");
    incrementer.setPaddingLength(2);
    incrementer.afterPropertiesSet();

    assertEquals(10, incrementer.nextLongValue());
    assertEquals("12", incrementer.nextStringValue());

    dsControl.verify();
    conControl.verify();
    stmtControl.verify();
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer.nextLongValue()

      pkValue = UUIDGenerator.generate();
    }else if(StringUtil.isNotEmpty(pkType)&&"NATIVE".equalsIgnoreCase(pkType)){
      if(StringUtil.isNotEmpty(dbType)&&"oracle".equalsIgnoreCase(dbType)){
        OracleSequenceMaxValueIncrementer incr = new OracleSequenceMaxValueIncrementer(dataSource, "HIBERNATE_SEQUENCE")
        try{
          pkValue = incr.nextLongValue();
        }catch (Exception e) {
          logger.error(e,e);
        }
      }else if(StringUtil.isNotEmpty(dbType)&&"postgres".equalsIgnoreCase(dbType)){
        PostgreSQLSequenceMaxValueIncrementer incr = new PostgreSQLSequenceMaxValueIncrementer(dataSource, "HIBERNATE_SEQUENCE")
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer.nextLongValue()

          logger.error(e,e);
        }
      }else if(StringUtil.isNotEmpty(dbType)&&"postgres".equalsIgnoreCase(dbType)){
        PostgreSQLSequenceMaxValueIncrementer incr = new PostgreSQLSequenceMaxValueIncrementer(dataSource, "HIBERNATE_SEQUENCE")
        try{
          pkValue = incr.nextLongValue();
        }catch (Exception e) {
          logger.error(e,e);
        }
      }else{
        pkValue = null;
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer.nextLongValue()

      }
    }else if(StringUtil.isNotEmpty(pkType)&&"SEQUENCE".equalsIgnoreCase(pkType)){
      if(StringUtil.isNotEmpty(dbType)&&"oracle".equalsIgnoreCase(dbType)){
        OracleSequenceMaxValueIncrementer incr = new OracleSequenceMaxValueIncrementer(dataSource, pkSequence)
        try{
          pkValue = incr.nextLongValue();
        }catch (Exception e) {
          logger.error(e,e);
        }
      }else if(StringUtil.isNotEmpty(dbType)&&"postgres".equalsIgnoreCase(dbType)){
        PostgreSQLSequenceMaxValueIncrementer incr = new PostgreSQLSequenceMaxValueIncrementer(dataSource, pkSequence)
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer.nextLongValue()

          logger.error(e,e);
        }
      }else if(StringUtil.isNotEmpty(dbType)&&"postgres".equalsIgnoreCase(dbType)){
        PostgreSQLSequenceMaxValueIncrementer incr = new PostgreSQLSequenceMaxValueIncrementer(dataSource, pkSequence)
        try{
          pkValue = incr.nextLongValue();
        }catch (Exception e) {
          logger.error(e,e);
        }
      }else{
        pkValue = null;
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer.nextLongValue()

    incrementer.setDataSource(dataSource);
    incrementer.setIncrementerName("myseq");
    incrementer.setPaddingLength(2);
    incrementer.afterPropertiesSet();

    assertEquals(10, incrementer.nextLongValue());
    assertEquals("12", incrementer.nextStringValue());

    verify(resultSet, times(2)).close();
    verify(statement, times(2)).close();
    verify(connection, times(2)).close();
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer.nextLongValue()

          logger.error(e,e);
        }
      }else if(StringUtil.isNotEmpty(dbType)&&"postgres".equalsIgnoreCase(dbType)){
        PostgreSQLSequenceMaxValueIncrementer incr = new PostgreSQLSequenceMaxValueIncrementer(dataSource, "HIBERNATE_SEQUENCE")
        try{
          pkValue = incr.nextLongValue();
        }catch (Exception e) {
          logger.error(e,e);
        }
      }else{
        pkValue = null;
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer.nextLongValue()

      }
    }else if(StringUtil.isNotEmpty(pkType)&&"SEQUENCE".equalsIgnoreCase(pkType)){
      if(StringUtil.isNotEmpty(dbType)&&"oracle".equalsIgnoreCase(dbType)){
        OracleSequenceMaxValueIncrementer incr = new OracleSequenceMaxValueIncrementer(dataSource, pkSequence)
        try{
          pkValue = incr.nextLongValue();
        }catch (Exception e) {
          logger.error(e,e);
        }
      }else if(StringUtil.isNotEmpty(dbType)&&"postgres".equalsIgnoreCase(dbType)){
        PostgreSQLSequenceMaxValueIncrementer incr = new PostgreSQLSequenceMaxValueIncrementer(dataSource, pkSequence)
View Full Code Here

Examples of org.springframework.jdbc.support.incrementer.PostgreSQLSequenceMaxValueIncrementer.nextLongValue()

          logger.error(e,e);
        }
      }else if(StringUtil.isNotEmpty(dbType)&&"postgres".equalsIgnoreCase(dbType)){
        PostgreSQLSequenceMaxValueIncrementer incr = new PostgreSQLSequenceMaxValueIncrementer(dataSource, pkSequence)
        try{
          pkValue = incr.nextLongValue();
        }catch (Exception e) {
          logger.error(e,e);
        }
      }else{
        pkValue = null;
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.