public ICFSecuritySecAppObj readSecAppByUJEEMountIdx( long ClusterId, String JEEMountName, boolean forceRead) { if (indexByUJEEMountIdx == null) { indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>(); } CFSecuritySecAppByUJEEMountIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredJEEMountName(JEEMountName); ICFSecuritySecAppObj obj = null; if ((!forceRead) && indexByUJEEMountIdx.containsKey(key)) { obj = indexByUJEEMountIdx.get(key); } else { CFSecuritySecAppBuff buff = ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .readDerivedByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName); if (buff != null) { obj = schema.getSecAppTableObj().newInstance(); obj.setPKey(((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newPKey()); obj.setBuff(buff); obj = (ICFSecuritySecAppObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByUJEEMountIdx.put(key, null); } } return (obj); }
public void forgetSecAppByUJEEMountIdx(long ClusterId, String JEEMountName) { if (indexByUJEEMountIdx == null) { return; } CFSecuritySecAppByUJEEMountIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredJEEMountName(JEEMountName); if (indexByUJEEMountIdx.containsKey(key)) { ICFSecuritySecAppObj probed = indexByUJEEMountIdx.get(key); if (probed != null) { probed.forget(true); } indexByUJEEMountIdx.remove(key); } }
public void deleteSecAppByUJEEMountIdx(long ClusterId, String JEEMountName) { if (indexByUJEEMountIdx == null) { indexByUJEEMountIdx = new HashMap<CFSecuritySecAppByUJEEMountIdxKey, ICFSecuritySecAppObj>(); } CFSecuritySecAppByUJEEMountIdxKey key = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredJEEMountName(JEEMountName); ICFSecuritySecAppObj obj = null; if (indexByUJEEMountIdx.containsKey(key)) { obj = indexByUJEEMountIdx.get(key); ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecAppByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName); obj.forget(true); } else { ((ICFCrmSchema) schema.getBackingStore()) .getTableSecApp() .deleteSecAppByUJEEMountIdx(schema.getAuthorization(), ClusterId, JEEMountName); } }
public void forgetSecApp(ICFSecuritySecAppObj Obj, boolean forgetSubObjects) { ICFSecuritySecAppObj obj = Obj; CFSecuritySecAppPKey pkey = obj.getPKey(); if (members.containsKey(pkey)) { ICFSecuritySecAppObj keepObj = members.get(pkey); // Detach object from alternate, duplicate, all and PKey indexes if (indexByClusterIdx != null) { CFSecuritySecAppByClusterIdxKey keyClusterIdx = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx = indexByClusterIdx.get(keyClusterIdx); if (mapClusterIdx != null) { mapClusterIdx.remove(keepObj.getPKey()); } } if (indexByUJEEMountIdx != null) { CFSecuritySecAppByUJEEMountIdxKey keyUJEEMountIdx = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); keyUJEEMountIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); keyUJEEMountIdx.setRequiredJEEMountName(keepObj.getRequiredJEEMountName()); indexByUJEEMountIdx.remove(keyUJEEMountIdx); } if (allSecApp != null) { allSecApp.remove(keepObj.getPKey()); } members.remove(pkey); if (forgetSubObjects) { ((ICFSecuritySchemaObj) schema) .getSecFormTableObj() .forgetSecFormBySecAppIdx( keepObj.getRequiredClusterId(), keepObj.getRequiredSecAppId()); } } }
public void deleteSecAppByUJEEMountIdx( CFSecurityAuthorization Authorization, CFSecuritySecAppByUJEEMountIdxKey argKey) { deleteSecAppByUJEEMountIdx( Authorization, argKey.getRequiredClusterId(), argKey.getRequiredJEEMountName()); }
public int compareTo(Object obj) { if (obj == null) { return (-1); } else if (obj instanceof CFSecuritySecAppBuff) { CFSecuritySecAppBuff rhs = (CFSecuritySecAppBuff) obj; int retval = super.compareTo(rhs); if (retval != 0) { return (retval); } return (0); } else if (obj instanceof CFSecuritySecAppByClusterIdxKey) { CFSecuritySecAppByClusterIdxKey rhs = (CFSecuritySecAppByClusterIdxKey) obj; if (getRequiredClusterId() < rhs.getRequiredClusterId()) { return (-1); } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) { return (1); } return (0); } else if (obj instanceof CFSecuritySecAppByUJEEMountIdxKey) { CFSecuritySecAppByUJEEMountIdxKey rhs = (CFSecuritySecAppByUJEEMountIdxKey) obj; if (getRequiredClusterId() < rhs.getRequiredClusterId()) { return (-1); } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) { return (1); } { int cmp = getRequiredJEEMountName().compareTo(rhs.getRequiredJEEMountName()); if (cmp != 0) { return (cmp); } } return (0); } else if (obj instanceof CFSecuritySecAppHBuff) { CFSecuritySecAppHBuff rhs = (CFSecuritySecAppHBuff) obj; int retval = 0; { long lhsAuditClusterId = getAuditClusterId(); long rhsAuditClusterId = rhs.getAuditClusterId(); if (lhsAuditClusterId < rhsAuditClusterId) { return (-1); } else if (lhsAuditClusterId > rhsAuditClusterId) { return (1); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp == null) { if (rhsAuditStamp != null) { return (-1); } } else if (rhsAuditStamp == null) { return (1); } else { int cmpstat = lhsAuditStamp.compareTo(rhsAuditStamp); if (cmpstat != 0) { return (cmpstat); } } } { short lhsAuditActionId = getAuditActionId(); short rhsAuditActionId = rhs.getAuditActionId(); if (lhsAuditActionId < rhsAuditActionId) { return (-1); } else if (lhsAuditActionId > rhsAuditActionId) { return (1); } } { int lhsRequiredRevision = getRequiredRevision(); int rhsRequiredRevision = rhs.getRequiredRevision(); if (lhsRequiredRevision < rhsRequiredRevision) { return (-1); } else if (lhsRequiredRevision > rhsRequiredRevision) { return (1); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId == null) { if (rhsAuditSessionId != null) { return (-1); } } else if (rhsAuditSessionId == null) { return (1); } else { int cmpstat = lhsAuditSessionId.compareTo(rhsAuditSessionId); if (cmpstat != 0) { return (cmpstat); } } } { long lhsAuditClusterId = getAuditClusterId(); long rhsAuditClusterId = rhs.getAuditClusterId(); if (lhsAuditClusterId < rhsAuditClusterId) { return (-1); } else if (lhsAuditClusterId > rhsAuditClusterId) { return (1); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp == null) { if (rhsAuditStamp != null) { return (-1); } } else if (rhsAuditStamp == null) { return (1); } else { int cmpstat = lhsAuditStamp.compareTo(rhsAuditStamp); if (cmpstat != 0) { return (cmpstat); } } } { short lhsAuditActionId = getAuditActionId(); short rhsAuditActionId = rhs.getAuditActionId(); if (lhsAuditActionId < rhsAuditActionId) { return (-1); } else if (lhsAuditActionId > rhsAuditActionId) { return (1); } } { int lhsRequiredRevision = getRequiredRevision(); int rhsRequiredRevision = rhs.getRequiredRevision(); if (lhsRequiredRevision < rhsRequiredRevision) { return (-1); } else if (lhsRequiredRevision > rhsRequiredRevision) { return (1); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId == null) { if (rhsAuditSessionId != null) { return (-1); } } else if (rhsAuditSessionId == null) { return (1); } else { int cmpstat = lhsAuditSessionId.compareTo(rhsAuditSessionId); if (cmpstat != 0) { return (cmpstat); } } } if (getRequiredClusterId() < rhs.getRequiredClusterId()) { return (-1); } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) { return (1); } if (getRequiredSecAppId() < rhs.getRequiredSecAppId()) { return (-1); } else if (getRequiredSecAppId() > rhs.getRequiredSecAppId()) { return (1); } { int cmp = getRequiredJEEMountName().compareTo(rhs.getRequiredJEEMountName()); if (cmp != 0) { return (cmp); } } return (0); } else if (obj instanceof CFSecuritySecAppHPKey) { CFSecuritySecAppHPKey rhs = (CFSecuritySecAppHPKey) obj; { long lhsAuditClusterId = getAuditClusterId(); long rhsAuditClusterId = rhs.getAuditClusterId(); if (lhsAuditClusterId < rhsAuditClusterId) { return (-1); } else if (lhsAuditClusterId > rhsAuditClusterId) { return (1); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp == null) { if (rhsAuditStamp != null) { return (-1); } } else if (rhsAuditStamp == null) { return (1); } else { int cmpstat = lhsAuditStamp.compareTo(rhsAuditStamp); if (cmpstat != 0) { return (cmpstat); } } } { short lhsAuditActionId = getAuditActionId(); short rhsAuditActionId = rhs.getAuditActionId(); if (lhsAuditActionId < rhsAuditActionId) { return (-1); } else if (lhsAuditActionId > rhsAuditActionId) { return (1); } } { int lhsRequiredRevision = getRequiredRevision(); int rhsRequiredRevision = rhs.getRequiredRevision(); if (lhsRequiredRevision < rhsRequiredRevision) { return (-1); } else if (lhsRequiredRevision > rhsRequiredRevision) { return (1); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId == null) { if (rhsAuditSessionId != null) { return (-1); } } else if (rhsAuditSessionId == null) { return (1); } else { int cmpstat = lhsAuditSessionId.compareTo(rhsAuditSessionId); if (cmpstat != 0) { return (cmpstat); } } } if (getRequiredClusterId() < rhs.getRequiredClusterId()) { return (-1); } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) { return (1); } if (getRequiredSecAppId() < rhs.getRequiredSecAppId()) { return (-1); } else if (getRequiredSecAppId() > rhs.getRequiredSecAppId()) { return (1); } return (0); } else if (obj instanceof CFSecuritySecAppPKey) { CFSecuritySecAppPKey rhs = (CFSecuritySecAppPKey) obj; if (getRequiredClusterId() < rhs.getRequiredClusterId()) { return (-1); } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) { return (1); } if (getRequiredSecAppId() < rhs.getRequiredSecAppId()) { return (-1); } else if (getRequiredSecAppId() > rhs.getRequiredSecAppId()) { return (1); } return (0); } else if (obj instanceof CFSecurityHPKey) { CFSecurityHPKey rhs = (CFSecurityHPKey) obj; { int lhsRequiredRevision = getRequiredRevision(); int rhsRequiredRevision = rhs.getRequiredRevision(); if (lhsRequiredRevision < rhsRequiredRevision) { return (-1); } else if (lhsRequiredRevision > rhsRequiredRevision) { return (1); } } return (0); } else { return (super.compareTo(obj)); } }
public boolean equals(Object obj) { if (obj == null) { return (false); } else if (obj instanceof CFSecuritySecAppHBuff) { CFSecuritySecAppHBuff rhs = (CFSecuritySecAppHBuff) obj; if (!super.equals(obj)) { return (false); } if (getRequiredClusterId() != rhs.getRequiredClusterId()) { return (false); } if (getRequiredSecAppId() != rhs.getRequiredSecAppId()) { return (false); } if (!getRequiredJEEMountName().equals(rhs.getRequiredJEEMountName())) { return (false); } return (true); } else if (obj instanceof CFSecuritySecAppBuff) { CFSecuritySecAppBuff rhs = (CFSecuritySecAppBuff) obj; if (!super.equals(obj)) { return (false); } if (getRequiredClusterId() != rhs.getRequiredClusterId()) { return (false); } if (getRequiredSecAppId() != rhs.getRequiredSecAppId()) { return (false); } if (!getRequiredJEEMountName().equals(rhs.getRequiredJEEMountName())) { return (false); } return (true); } else if (obj instanceof CFSecuritySecAppByClusterIdxKey) { CFSecuritySecAppByClusterIdxKey rhs = (CFSecuritySecAppByClusterIdxKey) obj; if (getRequiredClusterId() != rhs.getRequiredClusterId()) { return (false); } return (true); } else if (obj instanceof CFSecuritySecAppByUJEEMountIdxKey) { CFSecuritySecAppByUJEEMountIdxKey rhs = (CFSecuritySecAppByUJEEMountIdxKey) obj; if (getRequiredClusterId() != rhs.getRequiredClusterId()) { return (false); } if (!getRequiredJEEMountName().equals(rhs.getRequiredJEEMountName())) { return (false); } return (true); } else if (obj instanceof CFSecuritySecAppHPKey) { CFSecuritySecAppHPKey rhs = (CFSecuritySecAppHPKey) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredClusterId() != rhs.getRequiredClusterId()) { return (false); } if (getRequiredSecAppId() != rhs.getRequiredSecAppId()) { return (false); } return (true); } else if (obj instanceof CFSecurityHPKey) { CFSecurityHPKey rhs = (CFSecurityHPKey) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } return (true); } else if (obj instanceof CFSecuritySecAppPKey) { CFSecuritySecAppPKey rhs = (CFSecuritySecAppPKey) obj; if (getRequiredClusterId() != rhs.getRequiredClusterId()) { return (false); } if (getRequiredSecAppId() != rhs.getRequiredSecAppId()) { return (false); } return (true); } else { return (super.equals(obj)); } }
public ICFSecuritySecAppObj realizeSecApp(ICFSecuritySecAppObj Obj) { ICFSecuritySecAppObj obj = Obj; CFSecuritySecAppPKey pkey = obj.getPKey(); ICFSecuritySecAppObj keepObj = null; if (members.containsKey(pkey) && (null != members.get(pkey))) { ICFSecuritySecAppObj existingObj = members.get(pkey); keepObj = existingObj; /* * We always rebind the data because if we're being called, some index has * been updated and is refreshing it's data, which may or may not have changed */ // Detach object from alternate and duplicate indexes, leave PKey alone if (indexByClusterIdx != null) { CFSecuritySecAppByClusterIdxKey keyClusterIdx = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx = indexByClusterIdx.get(keyClusterIdx); if (mapClusterIdx != null) { mapClusterIdx.remove(keepObj.getPKey()); } } if (indexByUJEEMountIdx != null) { CFSecuritySecAppByUJEEMountIdxKey keyUJEEMountIdx = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); keyUJEEMountIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); keyUJEEMountIdx.setRequiredJEEMountName(keepObj.getRequiredJEEMountName()); indexByUJEEMountIdx.remove(keyUJEEMountIdx); } keepObj.setBuff(Obj.getBuff()); // Attach new object to alternate and duplicate indexes -- PKey stay stable if (indexByClusterIdx != null) { CFSecuritySecAppByClusterIdxKey keyClusterIdx = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx = indexByClusterIdx.get(keyClusterIdx); if (mapClusterIdx != null) { mapClusterIdx.put(keepObj.getPKey(), keepObj); } } if (indexByUJEEMountIdx != null) { CFSecuritySecAppByUJEEMountIdxKey keyUJEEMountIdx = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); keyUJEEMountIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); keyUJEEMountIdx.setRequiredJEEMountName(keepObj.getRequiredJEEMountName()); indexByUJEEMountIdx.put(keyUJEEMountIdx, keepObj); } if (allSecApp != null) { allSecApp.put(keepObj.getPKey(), keepObj); } } else { keepObj = obj; keepObj.setIsNew(false); // Attach new object to PKey, all, alternate, and duplicate indexes members.put(keepObj.getPKey(), keepObj); if (allSecApp != null) { allSecApp.put(keepObj.getPKey(), keepObj); } if (indexByClusterIdx != null) { CFSecuritySecAppByClusterIdxKey keyClusterIdx = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); Map<CFSecuritySecAppPKey, ICFSecuritySecAppObj> mapClusterIdx = indexByClusterIdx.get(keyClusterIdx); if (mapClusterIdx != null) { mapClusterIdx.put(keepObj.getPKey(), keepObj); } } if (indexByUJEEMountIdx != null) { CFSecuritySecAppByUJEEMountIdxKey keyUJEEMountIdx = ((ICFCrmSchema) schema.getBackingStore()).getFactorySecApp().newUJEEMountIdxKey(); keyUJEEMountIdx.setRequiredClusterId(keepObj.getRequiredClusterId()); keyUJEEMountIdx.setRequiredJEEMountName(keepObj.getRequiredJEEMountName()); indexByUJEEMountIdx.put(keyUJEEMountIdx, keepObj); } } return (keepObj); }