dorado平台支持下的删除

在dorado的平台下
第一种删除
public void allDeleteConinfoLog(ParameterSet parameters,
			ParameterSet outParameters) throws Exception {
		  // 获取页面数据集
		int count = 0;	

		Dataset dsConinfo = getDataset("dsConinfoLog");

		RecordIterator iter = dsConinfo.recordIterator();
		while (iter.hasNext()) {
			Record record = iter.nextRecord();
				if (record.getState() == Record.STATE_NEW) {
					record.setState(Record.STATE_NONE);
					count--;
				}
				dsConinfo.deleteRecord(record);
				count++;
			}
		MessageHelper.addMessage(DoradoContext.getContext(), "共有" + count
				+ "条记录被删除!");

		super.doUpdateData(parameters, outParameters);
	}

第二种删除
public void doDelMorningLog_FireProtection(ParameterSet parameters,ParameterSet outParameters)throws Exception{
		
		 int count = 0;
			Dataset dsMorningLog_FireProtection = getDataset("dsMorningLog_FireProtection");
			RecordIterator iter = dsMorningLog_FireProtection.recordIterator();
			while (iter.hasNext()) {
			Record record = iter.nextRecord();
			dsMorningLog_FireProtection.deleteRecord(record);
			count++;		
			}
			MessageHelper.addMessage(DoradoContext.getContext(), "共有" + count
					+ "条记录被删除!");
		
		super.doUpdateData(parameters, outParameters);
	}

你可能感兴趣的:(java)