public void deleteNumberDefByNextIdx( CFSecurityAuthorization Authorization, CFDbTestValueByNextIdxKey argKey) { final String S_ProcName = "deleteNumberDefByNextIdx"; CFDbTestNumberDefBuff cur; LinkedList<CFDbTestNumberDefBuff> matchSet = new LinkedList<CFDbTestNumberDefBuff>(); Iterator<CFDbTestNumberDefBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFDbTestNumberDefBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); String subClassCode = cur.getClassCode(); if ("NUMD".equals(subClassCode)) { schema.getTableNumberDef().deleteNumberDef(Authorization, cur); } else if ("NUMC".equals(subClassCode)) { schema.getTableNumberCol().deleteNumberCol(Authorization, (CFDbTestNumberColBuff) cur); } else if ("NUMT".equals(subClassCode)) { schema.getTableNumberType().deleteNumberType(Authorization, (CFDbTestNumberTypeBuff) cur); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "subClassCode", cur, "Instance of or subclass of NumberDef must not be \"" + subClassCode + "\""); } } }
public CFDbTestNumberDefBuff lockBuff( CFSecurityAuthorization Authorization, CFDbTestValuePKey PKey) { final String S_ProcName = "lockBuff"; CFDbTestNumberDefBuff buff = readDerived(Authorization, PKey); if ((buff != null) && (!buff.getClassCode().equals("NUMD"))) { buff = null; } return (buff); }
public CFDbTestNumberDefBuff readBuffByUNameIdx( CFSecurityAuthorization Authorization, long TenantId, long ScopeId, String Name) { final String S_ProcName = "CFDbTestRamValue.readBuffByUNameIdx() "; CFDbTestNumberDefBuff buff = readDerivedByUNameIdx(Authorization, TenantId, ScopeId, Name); if ((buff != null) && buff.getClassCode().equals("VALU")) { return ((CFDbTestNumberDefBuff) buff); } else { return (null); } }
public CFDbTestNumberDefBuff[] readAllBuff(CFSecurityAuthorization Authorization) { final String S_ProcName = "CFDbTestRamNumberDef.readAllBuff"; CFDbTestNumberDefBuff buff; ArrayList<CFDbTestNumberDefBuff> filteredList = new ArrayList<CFDbTestNumberDefBuff>(); CFDbTestNumberDefBuff[] buffList = readAllDerived(Authorization); for (int idx = 0; idx < buffList.length; idx++) { buff = buffList[idx]; if ((buff != null) && buff.getClassCode().equals("NUMD")) { filteredList.add(buff); } } return (filteredList.toArray(new CFDbTestNumberDefBuff[0])); }
public CFDbTestNumberDefBuff[] readBuffByNextIdx( CFSecurityAuthorization Authorization, Long NextTenantId, Long NextId) { final String S_ProcName = "CFDbTestRamValue.readBuffByNextIdx() "; CFDbTestNumberDefBuff buff; ArrayList<CFDbTestNumberDefBuff> filteredList = new ArrayList<CFDbTestNumberDefBuff>(); CFDbTestNumberDefBuff[] buffList = readDerivedByNextIdx(Authorization, NextTenantId, NextId); for (int idx = 0; idx < buffList.length; idx++) { buff = buffList[idx]; if ((buff != null) && buff.getClassCode().equals("VALU")) { filteredList.add((CFDbTestNumberDefBuff) buff); } } return (filteredList.toArray(new CFDbTestNumberDefBuff[0])); }
public void createNumberDef(CFSecurityAuthorization Authorization, CFDbTestNumberDefBuff Buff) { final String S_ProcName = "createNumberDef"; schema.getTableAtom().createAtom(Authorization, Buff); CFDbTestValuePKey pkey = schema.getFactoryValue().newPKey(); pkey.setClassCode(Buff.getClassCode()); pkey.setRequiredTenantId(Buff.getRequiredTenantId()); pkey.setRequiredId(Buff.getRequiredId()); // Validate unique indexes if (dictByPKey.containsKey(pkey)) { throw CFLib.getDefaultExceptionFactory() .newPrimaryKeyNotNewException(getClass(), S_ProcName, pkey); } // Validate foreign keys { boolean allNull = true; allNull = false; allNull = false; if (!allNull) { if (null == schema .getTableAtom() .readDerivedByIdIdx( Authorization, Buff.getRequiredTenantId(), Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory() .newUnresolvedRelationException( getClass(), S_ProcName, "Superclass", "SuperClass", "Atom", null); } } } // Proceed with adding the new record dictByPKey.put(pkey, Buff); }