List of usage examples for org.springframework.batch.support DatabaseType SYBASE
DatabaseType SYBASE
To view the source code for org.springframework.batch.support DatabaseType SYBASE.
Click Source Link
From source file:gemlite.core.internal.batch.ColumnRangePartitioner.java
/** * Partition a database table assuming that the data in the column specified * are uniformly distributed. The execution context values will have keys * <code>minValue</code> and <code>maxValue</code> specifying the range of * values to consider in each partition. * /*from w ww .jav a2 s. c o m*/ * @see Partitioner#partition(int) */ public Map<String, ExecutionContext> partition(int gridSize) { //? try { DatabaseType type = DatabaseType.fromMetaData(jdbcTemplate.getDataSource()); if (DatabaseType.SYBASE.equals(type)) { return partitionSybase(gridSize); } else return partitionCommon(gridSize); } catch (Exception e) { LogUtil.getLogger().error("DatabaseType error:", e); return partitionCommon(gridSize); } }
From source file:org.springframework.cloud.dataflow.server.batch.SimpleJobServiceFactoryBean.java
private int determineClobTypeToUse(String databaseType) { if (DatabaseType.SYBASE == DatabaseType.valueOf(databaseType.toUpperCase())) { return Types.LONGVARCHAR; } else {//from www . j av a2 s . co m return Types.CLOB; } }