Posted By:
Robert_Taylor
Posted On:
Monday, September 18, 2006 09:06 PM
I have a question about the mapping for my dataMap method, it works but it adds a new time control and flag ever iteration I need the data to go through this iteration, so I can get all the values,but I don't want the identical values being added to the dataMap hashtable. Any suggestions? here is my code Thanks List dList = new Vector(); List dpList = new Vector(); Vector procID = null; for (Iterator iter = getFirewallEntries().iterator(); iter.hasNext();) { PolicyFirewallEntries fw = (PolicyFirewallEntries)iter.next(); if (fw.getTimeCtrl() == null || fw.getFlags() == null) { continue; } Map dataMap = new Hashtable(); dataMap.put(TIMECTRL, fw.getTimeCtrlId(
More>>
I have a question about the mapping for my dataMap method, it works but it adds a new time control and flag ever iteration I need the data to go through this iteration, so I can get all the values,but I don't want the identical values being added to the dataMap hashtable. Any suggestions?
here is my code
Thanks
List dList = new Vector();
List dpList = new Vector();
Vector procID = null;
for (Iterator iter = getFirewallEntries().iterator(); iter.hasNext();) {
PolicyFirewallEntries fw = (PolicyFirewallEntries)iter.next();
if (fw.getTimeCtrl() == null || fw.getFlags() == null) {
continue;
}
Map dataMap = new Hashtable();
dataMap.put(TIMECTRL, fw.getTimeCtrlId());
dataMap.put(FLAGS, fw.getConnFlags());
dList.add(dataMap);
if (procID == null) {
procID = CwModelUtil.generateVec(fw.getProcId());
} else {
procID.add(fw.getProcId());
}
}
Map procMap = new Hashtable();
procMap.put(KNOWNRULES, CwModelUtil.safePut(new Hashtable(), DATA, procVec));
depsList.add(procMap);
Map map = new Hashtable();
map.put(DATA, dList);
map.put(DPS, dpList);
return map;
<<Less