public ICFInternetDomainObj readDomainByNameIdx( long TenantId, long SubDomainOfId, String Name, boolean forceRead) { if (indexByNameIdx == null) { indexByNameIdx = new HashMap<CFInternetDomainByNameIdxKey, ICFInternetDomainObj>(); } CFInternetDomainByNameIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryDomain().newNameIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredSubDomainOfId(SubDomainOfId); key.setRequiredName(Name); ICFInternetDomainObj obj = null; if ((!forceRead) && indexByNameIdx.containsKey(key)) { obj = indexByNameIdx.get(key); } else { CFInternetDomainBuff buff = ((ICFBamSchema) schema.getBackingStore()) .getTableDomain() .readDerivedByNameIdx(schema.getAuthorization(), TenantId, SubDomainOfId, Name); if (buff != null) { obj = (ICFInternetDomainObj) schema.getDomainBaseTableObj().constructByClassCode(buff.getClassCode()); obj.setPKey(((ICFBamSchema) schema.getBackingStore()).getFactoryDomainBase().newPKey()); obj.setBuff(buff); obj = (ICFInternetDomainObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByNameIdx.put(key, null); } } return (obj); }
public ICFInternetDomainObj readDomain(CFInternetDomainBasePKey pkey, boolean forceRead) { ICFInternetDomainObj obj = null; if ((!forceRead) && members.containsKey(pkey)) { obj = members.get(pkey); } else { CFInternetDomainBuff readBuff = ((ICFBamSchema) schema.getBackingStore()) .getTableDomain() .readDerivedByIdIdx( schema.getAuthorization(), pkey.getRequiredTenantId(), pkey.getRequiredId()); if (readBuff != null) { obj = (ICFInternetDomainObj) schema.getDomainBaseTableObj().constructByClassCode(readBuff.getClassCode()); obj.setPKey(((ICFBamSchema) schema.getBackingStore()).getFactoryDomainBase().newPKey()); obj.setBuff(readBuff); obj = (ICFInternetDomainObj) obj.realize(); } else if (schema.getCacheMisses()) { members.put(pkey, null); } } return (obj); }