生成序列

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();
 

你可能感兴趣的:(序列)