public CFSecurityClusterBuff lockDerived( CFSecurityAuthorization Authorization, CFSecurityClusterPKey PKey) { final String S_ProcName = "CFDbTestRamCluster.readDerived"; CFSecurityClusterPKey key = schema.getFactoryCluster().newPKey(); key.setRequiredId(PKey.getRequiredId()); CFSecurityClusterBuff buff; if (dictByPKey.containsKey(key)) { buff = dictByPKey.get(key); } else { buff = null; } return (buff); }
public void createCluster(CFSecurityAuthorization Authorization, CFSecurityClusterBuff Buff) { final String S_ProcName = "createCluster"; CFSecurityClusterPKey pkey = schema.getFactoryCluster().newPKey(); pkey.setRequiredId(schema.nextClusterIdGen()); Buff.setRequiredId(pkey.getRequiredId()); CFSecurityClusterByUDomainNameIdxKey keyUDomainNameIdx = schema.getFactoryCluster().newUDomainNameIdxKey(); keyUDomainNameIdx.setRequiredFullDomainName(Buff.getRequiredFullDomainName()); CFSecurityClusterByUDescrIdxKey keyUDescrIdx = schema.getFactoryCluster().newUDescrIdxKey(); keyUDescrIdx.setRequiredDescription(Buff.getRequiredDescription()); // Validate unique indexes if (dictByPKey.containsKey(pkey)) { throw CFLib.getDefaultExceptionFactory() .newPrimaryKeyNotNewException(getClass(), S_ProcName, pkey); } if (dictByUDomainNameIdx.containsKey(keyUDomainNameIdx)) { throw CFLib.getDefaultExceptionFactory() .newUniqueIndexViolationException( getClass(), S_ProcName, "ClusterUDomainNameIdx", keyUDomainNameIdx); } if (dictByUDescrIdx.containsKey(keyUDescrIdx)) { throw CFLib.getDefaultExceptionFactory() .newUniqueIndexViolationException( getClass(), S_ProcName, "ClusterUDescrNameIdx", keyUDescrIdx); } // Validate foreign keys // Proceed with adding the new record dictByPKey.put(pkey, Buff); dictByUDomainNameIdx.put(keyUDomainNameIdx, Buff); dictByUDescrIdx.put(keyUDescrIdx, Buff); }
public int nextSecFormIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey pkey) { int retval = nextSecFormIdGen(Authorization, pkey.getRequiredId()); return (retval); }
public long nextHostNodeIdGen(CFSecurityAuthorization Authorization, CFSecurityClusterPKey pkey) { long retval = nextHostNodeIdGen(Authorization, pkey.getRequiredId()); return (retval); }