String pkSequence = cghead.getJformPkSequence();
if(StringUtil.isNotEmpty(pkType)&&"UUID".equalsIgnoreCase(pkType)){
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");
try{
pkValue = incr.nextLongValue();
}catch (Exception e) {
logger.error(e,e);
}
}else{
pkValue = null;
}
}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);
try{
pkValue = incr.nextLongValue();
}catch (Exception e) {
logger.error(e,e);
}
}else{
pkValue = null;