// fieldtype,recordtype as recordtype from customfield where customfieldid=?
// ");
// ALLSQL.put( "admin.getCustomFieldvalues","select value as value from
// customfieldvalue where customfieldid=? ");
CVDal cvdl = new CVDal(dataSource);
CustomFieldVO cfVO = new CustomFieldVO();
try {
cvdl.setSql("admin.getCustomField");
cvdl.setInt(1, customFieldID);
Collection colList = cvdl.executeQuery();
cvdl.clearParameters();
if ((colList != null) && (colList.size() > 0)) {
Iterator iter = colList.iterator();
while (iter.hasNext()) {
HashMap hm = (HashMap) iter.next();
cfVO.setFieldID(customFieldID);
if (hm.get("fieldtype") != null) {
cfVO.setFieldType((String) hm.get("fieldtype"));
Vector vecFieldValues = new Vector();
HashMap vecFieldValueIds = new HashMap();
if (((String) hm.get("fieldtype")).equals(CustomFieldVO.MULTIPLE)) {
cvdl.setSql("admin.getCustomFieldvalues");
cvdl.setInt(1, customFieldID);
Collection valueList = cvdl.executeQuery();
if ((valueList != null) && (valueList.size() > 0)) {
Iterator valueIter = valueList.iterator();
while (valueIter.hasNext()) {
HashMap hmValue = (HashMap) valueIter.next();
vecFieldValues.addElement(hmValue.get("value"));
vecFieldValueIds.put(hmValue.get("value"), hmValue.get("ValueID"));
}
}
}
cfVO.setOptionValues(vecFieldValues);
cfVO.setOptionValuesIds(vecFieldValueIds);
}
if (hm.get("name") != null) {
cfVO.setLabel((String) hm.get("name"));
}
if (hm.get("recordtype") != null) {
cfVO.setRecordTypeID(((Long) hm.get("recordtype")).intValue());
}
}
}
} catch (Exception e) {