`

生成序列

 
阅读更多

IMetaDBQuery query = ctx.createSqlQuery( "select SEQ_AUCTION_FLOW.nextval as FLOWID from dual" );
Map row = ( Map ) query.getResult().get( 0 );
int seqValue = ( ( Number ) row.get( "FLOWID" ) ).intValue();
StringBuilder sb = new StringBuilder( "FL" );
DecimalFormat df = new DecimalFormat( "00000000" );
sb.append( df.format( seqValue ) );
String flowId = sb.toString();
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics