List of usage examples for java.util LinkedList iterator
Iterator<E> iterator();
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamRealProjectTable.java
public void deleteRealProjectByIdIdx(CFAstAuthorization Authorization, CFAstDomainBasePKey argKey) { final String S_ProcName = "deleteRealProjectByIdIdx"; CFAstRealProjectBuff cur;/*from ww w . j av a 2s . c o m*/ LinkedList<CFAstRealProjectBuff> matchSet = new LinkedList<CFAstRealProjectBuff>(); Iterator<CFAstRealProjectBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFAstRealProjectBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); String subClassCode = cur.getClassCode(); if ("RPRJ".equals(subClassCode)) { schema.getTableRealProject().deleteRealProject(Authorization, cur); } else if ("TPRJ".equals(subClassCode)) { schema.getTableTopProject().deleteTopProject(Authorization, (CFAstTopProjectBuff) cur); } else if ("SPRJ".equals(subClassCode)) { schema.getTableSubProject().deleteSubProject(Authorization, (CFAstSubProjectBuff) cur); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "subClassCode", cur, "Instance of or subclass of RealProject must not be \"" + subClassCode + "\""); } } }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamRealProjectTable.java
public void deleteRealProjectByTenantIdx(CFAccAuthorization Authorization, CFAccDomainBaseByTenantIdxKey argKey) { final String S_ProcName = "deleteRealProjectByTenantIdx"; CFAccRealProjectBuff cur;// ww w . ja va 2 s . co m LinkedList<CFAccRealProjectBuff> matchSet = new LinkedList<CFAccRealProjectBuff>(); Iterator<CFAccRealProjectBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFAccRealProjectBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); String subClassCode = cur.getClassCode(); if ("RPRJ".equals(subClassCode)) { schema.getTableRealProject().deleteRealProject(Authorization, cur); } else if ("TPRJ".equals(subClassCode)) { schema.getTableTopProject().deleteTopProject(Authorization, (CFAccTopProjectBuff) cur); } else if ("SPRJ".equals(subClassCode)) { schema.getTableSubProject().deleteSubProject(Authorization, (CFAccSubProjectBuff) cur); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "subClassCode", cur, "Instance of or subclass of RealProject must not be \"" + subClassCode + "\""); } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamRealProjectTable.java
public void deleteRealProjectByTenantIdx(CFAstAuthorization Authorization, CFAstDomainBaseByTenantIdxKey argKey) { final String S_ProcName = "deleteRealProjectByTenantIdx"; CFAstRealProjectBuff cur;/*www. ja v a 2 s. c om*/ LinkedList<CFAstRealProjectBuff> matchSet = new LinkedList<CFAstRealProjectBuff>(); Iterator<CFAstRealProjectBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFAstRealProjectBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); String subClassCode = cur.getClassCode(); if ("RPRJ".equals(subClassCode)) { schema.getTableRealProject().deleteRealProject(Authorization, cur); } else if ("TPRJ".equals(subClassCode)) { schema.getTableTopProject().deleteTopProject(Authorization, (CFAstTopProjectBuff) cur); } else if ("SPRJ".equals(subClassCode)) { schema.getTableSubProject().deleteSubProject(Authorization, (CFAstSubProjectBuff) cur); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "subClassCode", cur, "Instance of or subclass of RealProject must not be \"" + subClassCode + "\""); } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskRam.CFAsteriskRamSysClusterTable.java
public void deleteSysClusterByIdIdx(CFSecurityAuthorization Authorization, CFSecuritySysClusterPKey argKey) { CFSecuritySysClusterBuff cur;/* www . j a v a 2 s .c o m*/ LinkedList<CFSecuritySysClusterBuff> matchSet = new LinkedList<CFSecuritySysClusterBuff>(); Iterator<CFSecuritySysClusterBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFSecuritySysClusterBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); deleteSysCluster(Authorization, cur); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskRam.CFAsteriskRamSysClusterTable.java
public void deleteSysClusterByClusterIdx(CFSecurityAuthorization Authorization, CFSecuritySysClusterByClusterIdxKey argKey) { CFSecuritySysClusterBuff cur;// w ww . j av a 2 s.co m LinkedList<CFSecuritySysClusterBuff> matchSet = new LinkedList<CFSecuritySysClusterBuff>(); Iterator<CFSecuritySysClusterBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFSecuritySysClusterBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); deleteSysCluster(Authorization, cur); } }
From source file:m.c.m.proxyma.context.ProxymaContext.java
/** * Remove a ProxyFolder from the context * @param proxyFolder the proxyFolder to remove. * @throws IllegalArgumentException if the context doesn't exist * @throws NullArgumentException if the argument is null *///from w ww .j a va2 s .com public void removeProxyFolder(ProxyFolderBean proxyFolder) throws IllegalArgumentException, NullArgumentException { if (proxyFolder == null) { log.warning("Null ProxyFolderBean parameter.. Ignoring operation"); throw new NullArgumentException("Null ProxyFolderBean parameter.. Ignoring operation"); } else { boolean exists = proxyFoldersByURLEncodedName.containsKey(proxyFolder.getURLEncodedFolderName()); if (!exists) { log.warning("The Proxy foder doesn't exists.. nothing done."); throw new IllegalArgumentException("The Proxy foder doesn't exists.. nothing done."); } else { log.finer("Deleting existing Proxy folder " + proxyFolder.getFolderName()); proxyFoldersByURLEncodedName.remove(proxyFolder.getURLEncodedFolderName()); //Delete the proxy-folder from the second indexing map. String destinationHost = URLUtils.getDestinationHost(proxyFolder.getDestinationAsURL()); LinkedList<ProxyFolderBean> currentSlot = null; currentSlot = proxyFoldersByDestinationHost.get(destinationHost); if (currentSlot.size() == 1) { currentSlot.remove(proxyFolder); proxyFoldersByDestinationHost.remove(destinationHost); } else { Iterator<ProxyFolderBean> iterator = currentSlot.iterator(); while (iterator.hasNext()) { ProxyFolderBean curFolder = iterator.next(); if (curFolder == proxyFolder) iterator.remove(); } } } } }
From source file:net.sourceforge.msscodefactory.cfcrm.v2_1.CFCrmRam.CFCrmRamProjectBaseTable.java
public void deleteProjectBaseByTenantIdx(CFCrmAuthorization Authorization, CFCrmDomainBaseByTenantIdxKey argKey) { final String S_ProcName = "deleteProjectBaseByTenantIdx"; CFCrmProjectBaseBuff cur;/*from w w w. ja v a 2 s. com*/ LinkedList<CFCrmProjectBaseBuff> matchSet = new LinkedList<CFCrmProjectBaseBuff>(); Iterator<CFCrmProjectBaseBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFCrmProjectBaseBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); String subClassCode = cur.getClassCode(); if ("BPRJ".equals(subClassCode)) { schema.getTableProjectBase().deleteProjectBase(Authorization, cur); } else if ("RPRJ".equals(subClassCode)) { schema.getTableRealProject().deleteRealProject(Authorization, (CFCrmRealProjectBuff) cur); } else if ("TPRJ".equals(subClassCode)) { schema.getTableTopProject().deleteTopProject(Authorization, (CFCrmTopProjectBuff) cur); } else if ("SPRJ".equals(subClassCode)) { schema.getTableSubProject().deleteSubProject(Authorization, (CFCrmSubProjectBuff) cur); } else if ("VERN".equals(subClassCode)) { schema.getTableVersion().deleteVersion(Authorization, (CFCrmVersionBuff) cur); } else if ("MJVR".equals(subClassCode)) { schema.getTableMajorVersion().deleteMajorVersion(Authorization, (CFCrmMajorVersionBuff) cur); } else if ("MNVR".equals(subClassCode)) { schema.getTableMinorVersion().deleteMinorVersion(Authorization, (CFCrmMinorVersionBuff) cur); } else { throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName, "subClassCode", cur, "Instance of or subclass of ProjectBase must not be \"" + subClassCode + "\""); } } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskRam.CFAsteriskRamSecDeviceTable.java
public void deleteSecDeviceByIdIdx(CFSecurityAuthorization Authorization, CFSecuritySecDevicePKey argKey) { CFSecuritySecDeviceBuff cur;/*from w w w. j a va 2 s. co m*/ LinkedList<CFSecuritySecDeviceBuff> matchSet = new LinkedList<CFSecuritySecDeviceBuff>(); Iterator<CFSecuritySecDeviceBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFSecuritySecDeviceBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); deleteSecDevice(Authorization, cur); } }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskRam.CFAsteriskRamSecDeviceTable.java
public void deleteSecDeviceByUserIdx(CFSecurityAuthorization Authorization, CFSecuritySecDeviceByUserIdxKey argKey) { CFSecuritySecDeviceBuff cur;// ww w . ja va 2 s .c o m LinkedList<CFSecuritySecDeviceBuff> matchSet = new LinkedList<CFSecuritySecDeviceBuff>(); Iterator<CFSecuritySecDeviceBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFSecuritySecDeviceBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); deleteSecDevice(Authorization, cur); } }
From source file:com.ibm.research.rdf.store.jena.impl.DB2Dataset.java
@Override public Iterator<Quad> findNG(Node g, Node s, Node p, Node o) { if ((g == null) || g.equals(Node.ANY)) { // TODO: REVISIT: very inefficient way to get all the matching quads from named graphs only LinkedList<Quad> l = new LinkedList<Quad>(); Iterator<Quad> res = find(g, s, p, o); while (res.hasNext()) { Quad q = res.next();/* w w w.j a v a2 s .c om*/ if (q.getGraph() != null && (!q.getGraph().isURI() || !q.getGraph().getURI().equalsIgnoreCase(Constants.DEFAULT_GRAPH_MONIKER))) { l.add(q); } } return l.iterator(); } else if (g.getURI().equalsIgnoreCase(Constants.DEFAULT_GRAPH_MONIKER)) { return new LinkedList<Quad>().iterator(); } else { return find(g, s, p, o); } }