public Sequence nextSequence(String key,int step ){
if( key == null )
throw new ApplicationException("获取序列的参数KEY为空!");
boolean inserted = false;
Sequence seq = dao.read( key );
if( seq == null ){
seq = new Sequence( key );
inserted =true;
}
seq.incLastNumber( step );
if( inserted )
dao.create( seq );
else
dao.update( seq );