public ICFBamDataScopeObj readDataScopeByUNameIdx(String Name, boolean forceRead) { if (indexByUNameIdx == null) { indexByUNameIdx = new HashMap<CFBamDataScopeByUNameIdxKey, ICFBamDataScopeObj>(); } CFBamDataScopeByUNameIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newUNameIdxKey(); key.setRequiredName(Name); ICFBamDataScopeObj obj = null; if ((!forceRead) && indexByUNameIdx.containsKey(key)) { obj = indexByUNameIdx.get(key); } else { CFBamDataScopeBuff buff = ((ICFBamSchema) schema.getBackingStore()) .getTableDataScope() .readDerivedByUNameIdx(schema.getAuthorization(), Name); if (buff != null) { obj = schema.getDataScopeTableObj().newInstance(); obj.setPKey(((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newPKey()); obj.setBuff(buff); obj = (ICFBamDataScopeObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByUNameIdx.put(key, null); } } return (obj); }
public ICFBamDataScopeObj readDataScope(CFBamDataScopePKey pkey, boolean forceRead) { ICFBamDataScopeObj obj = null; if ((!forceRead) && members.containsKey(pkey)) { obj = members.get(pkey); } else { CFBamDataScopeBuff readBuff = ((ICFBamSchema) schema.getBackingStore()) .getTableDataScope() .readDerivedByIdIdx(schema.getAuthorization(), pkey.getRequiredId()); if (readBuff != null) { obj = schema.getDataScopeTableObj().newInstance(); obj.setPKey(((ICFBamSchema) schema.getBackingStore()).getFactoryDataScope().newPKey()); obj.setBuff(readBuff); obj = (ICFBamDataScopeObj) obj.realize(); } else if (schema.getCacheMisses()) { members.put(pkey, null); } } return (obj); }