You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
4 years ago
|
package com.tptj.demo.hg.ds.modify;
|
||
|
|
||
|
import com.fr.base.TableData;
|
||
|
import com.fr.general.data.DataModel;
|
||
|
import com.fr.intelli.record.Focus;
|
||
|
import com.fr.record.analyzer.EnableMetrics;
|
||
|
import com.fr.script.Calculator;
|
||
|
import com.fr.stable.fun.impl.AbstractDSModifyProvider;
|
||
|
/**
|
||
|
* @author 秃破天际
|
||
|
* @version 10.0
|
||
|
* Created by 秃破天际 on 2021-04-03
|
||
|
**/
|
||
|
@EnableMetrics
|
||
|
public class Demo extends AbstractDSModifyProvider {
|
||
|
|
||
|
public boolean accept(TableData data, Calculator cal, DataModel model) {
|
||
|
try{
|
||
|
//假设数据集中存在字段名为password的就对其进行修改
|
||
|
return -1 !=model.getColumnIndex("password");
|
||
|
}catch(Exception e){ }
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
@Focus(id="com.tptj.demo.hg.ds.modify.v10",text="数据集修改demo")
|
||
|
public DataModel modify(TableData data, Calculator cal, DataModel model) {
|
||
|
try{
|
||
|
return new ModifyModel( model,model.getColumnIndex("password") );
|
||
|
}catch(Exception e){ }
|
||
|
return model;
|
||
|
}
|
||
|
public int currentAPILevel() {
|
||
|
return 2;
|
||
|
}
|
||
|
}
|