public class WordSearchScreenService {
WordDao wordDao = new WordDao();
BeanUtil beanUtil = new BeanUtil();
public Vector<Vector<Object>> getWordsByCondition(Map<String, Object> conditionMap, WordSearchScreen thisFrame){
String[] showColumns = new String[]{"FLDWORDID","FLDWORDEN","FLDWORDCN","FLDPRIORITY","FLDTESTTIMES","FLDLASTTESTDATE","FLDFROM","FLDCREATDATE","FLDERRORFAG","FLDERRORTIMES","FLDFORGETTAG","FLDCHANGETAG"};
thisFrame.searchWords = wordDao.getWordsByCondition(conditionMap);
Vector<Vector<Object>> dataVector = new Vector<Vector<Object>>();
for(Word w:thisFrame.searchWords){
Vector<Object> recordVector = new Vector<Object>(beanUtil.toFieldValueList(w,false,showColumns));
recordVector.insertElementAt("X", 0);
dataVector.add(recordVector);
}
return dataVector;
}
public String[] getJtableColumns(){
//[FLDWORDID, FLDWORDEN, FLDWORDCN, FLDSYMBOL, FLDATTR, FLDLASTTESTDATE, FLDPRIORITY, FLDTESTTIMES, FLDFROM, FLDERRORFAG, FLDCREATDATE, FLDREMARK, FLDRELEVANCE,FLDERRORTIMES]
String[] columnNames = new String[13];
columnNames[0] = "";
columnNames[1] = "ID";
columnNames[2] = "英文";
columnNames[3] = "中文";
columnNames[4] = "优先级";
columnNames[5] = "练习次数";
columnNames[6] = "练习日期";
columnNames[7] = "来源";
columnNames[8] = "创建日期";
columnNames[9] = "错误标记";
columnNames[10] = "错误次数";
columnNames[11] = "易忘";
columnNames[12] = "更新";
return columnNames;
}
public Object[][] getJtableTestDatas() {
return new Object[][]{
{"","1","test","adj. 测试",3,3,"20140501","CB","20140501","adj."},
{"","2","test","adj. 测试",3,3,"20140501","CB","20140501","adj."},
};
}
}
WordDao wordDao = new WordDao();
BeanUtil beanUtil = new BeanUtil();
public Vector<Vector<Object>> getWordsByCondition(Map<String, Object> conditionMap, WordSearchScreen thisFrame){
String[] showColumns = new String[]{"FLDWORDID","FLDWORDEN","FLDWORDCN","FLDPRIORITY","FLDTESTTIMES","FLDLASTTESTDATE","FLDFROM","FLDCREATDATE","FLDERRORFAG","FLDERRORTIMES","FLDFORGETTAG","FLDCHANGETAG"};
thisFrame.searchWords = wordDao.getWordsByCondition(conditionMap);
Vector<Vector<Object>> dataVector = new Vector<Vector<Object>>();
for(Word w:thisFrame.searchWords){
Vector<Object> recordVector = new Vector<Object>(beanUtil.toFieldValueList(w,false,showColumns));
recordVector.insertElementAt("X", 0);
dataVector.add(recordVector);
}
return dataVector;
}
public String[] getJtableColumns(){
//[FLDWORDID, FLDWORDEN, FLDWORDCN, FLDSYMBOL, FLDATTR, FLDLASTTESTDATE, FLDPRIORITY, FLDTESTTIMES, FLDFROM, FLDERRORFAG, FLDCREATDATE, FLDREMARK, FLDRELEVANCE,FLDERRORTIMES]
String[] columnNames = new String[13];
columnNames[0] = "";
columnNames[1] = "ID";
columnNames[2] = "英文";
columnNames[3] = "中文";
columnNames[4] = "优先级";
columnNames[5] = "练习次数";
columnNames[6] = "练习日期";
columnNames[7] = "来源";
columnNames[8] = "创建日期";
columnNames[9] = "错误标记";
columnNames[10] = "错误次数";
columnNames[11] = "易忘";
columnNames[12] = "更新";
return columnNames;
}
public Object[][] getJtableTestDatas() {
return new Object[][]{
{"","1","test","adj. 测试",3,3,"20140501","CB","20140501","adj."},
{"","2","test","adj. 测试",3,3,"20140501","CB","20140501","adj."},
};
}
}