public ICFSecuritySecUserObj getUpdatedBy() {
   if (updatedBy == null) {
     CFSecurityClusterBuff buff = getBuff();
     updatedBy =
         ((ICFDbTestSchemaObj) getSchema())
             .getSecUserTableObj()
             .readSecUserByIdIdx(buff.getUpdatedByUserId());
   }
   return (updatedBy);
 }
 public void setClusterBuff(CFSecurityClusterBuff src) {
   setRequiredId(src.getRequiredId());
   setCreatedByUserId(src.getCreatedByUserId());
   setCreatedAt(src.getCreatedAt());
   setUpdatedByUserId(src.getUpdatedByUserId());
   setUpdatedAt(src.getUpdatedAt());
   setRequiredFullDomainName(src.getRequiredFullDomainName());
   setRequiredDescription(src.getRequiredDescription());
   setRequiredRevision(src.getRequiredRevision());
 }
 public CFSecurityClusterBuff getBuff() {
   if (buff == null) {
     buff =
         ((ICFInternetSchema) getOrigAsCluster().getSchema().getBackingStore())
             .getFactoryCluster()
             .newBuff();
     buff.set(orig.getBuff());
   }
   return (buff);
 }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Cluster Attributes
      String attrFullDomainName = null;
      String attrDescription = null;
      String attrCreatedAt = null;
      String attrCreatedBy = null;
      String attrUpdatedAt = null;
      String attrUpdatedBy = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RspnClusterLocked");

      CFSecurityXMsgRspnHandler xmsgRspnHandler = (CFSecurityXMsgRspnHandler) getParser();
      if (xmsgRspnHandler == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "getParser()");
      }

      ICFSecuritySchemaObj schemaObj = xmsgRspnHandler.getSchemaObj();
      if (schemaObj == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()");
      }

      // Extract Attributes
      numAttrs = attrs.getLength();
      for (idxAttr = 0; idxAttr < numAttrs; idxAttr++) {
        attrLocalName = attrs.getLocalName(idxAttr);
        if (attrLocalName.equals("Id")) {
          if (attrId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Revision")) {
          if (attrRevision != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrRevision = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("CreatedAt")) {
          if (attrCreatedAt != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrCreatedAt = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("CreatedBy")) {
          if (attrCreatedBy != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrCreatedBy = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("UpdatedAt")) {
          if (attrUpdatedAt != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrUpdatedAt = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("UpdatedBy")) {
          if (attrUpdatedBy != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrUpdatedBy = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("FullDomainName")) {
          if (attrFullDomainName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrFullDomainName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Description")) {
          if (attrDescription != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDescription = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("schemaLocation")) {
          // ignored
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUnrecognizedAttributeException(
                  getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName);
        }
      }

      // Ensure that required attributes have values
      if ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if (attrFullDomainName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "FullDomainName");
      }
      if (attrDescription == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Description");
      }
      if ((attrRevision == null) || (attrRevision.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Revision");
      }

      // Save named attributes to context
      CFLibXmlCoreContext curContext = getParser().getCurContext();

      // Convert string attributes to native Java types

      long natId = Long.parseLong(attrId);

      String natFullDomainName = attrFullDomainName;

      String natDescription = attrDescription;

      int natRevision = Integer.parseInt(attrRevision);
      UUID createdBy = null;
      if (attrCreatedBy != null) {
        createdBy = UUID.fromString(attrCreatedBy);
      }
      Calendar createdAt = null;
      if (attrCreatedAt != null) {
        createdAt = CFLibXmlUtil.parseTimestamp(attrCreatedAt);
      }
      UUID updatedBy = null;
      if (attrUpdatedBy != null) {
        updatedBy = UUID.fromString(attrUpdatedBy);
      }
      Calendar updatedAt = null;
      if (attrUpdatedAt != null) {
        updatedAt = CFLibXmlUtil.parseTimestamp(attrUpdatedAt);
      }
      // Instantiate a buffer for the parsed information
      ICFSecurityClusterObj obj =
          (ICFSecurityClusterObj) schemaObj.getClusterTableObj().newInstance();
      CFSecurityClusterBuff dataBuff = obj.getClusterBuff();
      dataBuff.setRequiredId(natId);
      dataBuff.setRequiredFullDomainName(natFullDomainName);
      dataBuff.setRequiredDescription(natDescription);
      dataBuff.setRequiredRevision(natRevision);
      if (createdBy != null) {
        dataBuff.setCreatedByUserId(createdBy);
      }
      if (createdAt != null) {
        dataBuff.setCreatedAt(createdAt);
      }
      if (updatedBy != null) {
        dataBuff.setUpdatedByUserId(updatedBy);
      }
      if (updatedAt != null) {
        dataBuff.setUpdatedAt(updatedAt);
      }
      obj.copyBuffToPKey();
      ICFSecurityClusterObj realized = (ICFSecurityClusterObj) obj.realize();
      xmsgRspnHandler.setLastObjectProcessed(realized);
    } catch (RuntimeException e) {
      throw new RuntimeException(
          "Near "
              + getParser().getLocationInfo()
              + ": Caught and rethrew "
              + e.getClass().getName()
              + " - "
              + e.getMessage(),
          e);
    } catch (Error e) {
      throw new Error(
          "Near "
              + getParser().getLocationInfo()
              + ": Caught and rethrew "
              + e.getClass().getName()
              + " - "
              + e.getMessage(),
          e);
    }
  }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFSecurityClusterBuff) {
      CFSecurityClusterBuff rhs = (CFSecurityClusterBuff) obj;
      int retval = 0;
      {
        int cmp = getCreatedByUserId().compareTo(rhs.getCreatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getCreatedAt().compareTo(rhs.getCreatedAt());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedByUserId().compareTo(rhs.getUpdatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedAt().compareTo(rhs.getUpdatedAt());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFSecurityClusterPKey) {
      CFSecurityClusterPKey rhs = (CFSecurityClusterPKey) obj;
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityClusterHPKey) {
      CFSecurityClusterHPKey rhs = (CFSecurityClusterHPKey) obj;
      {
        int lhsRequiredRevision = getRequiredRevision();
        int rhsRequiredRevision = rhs.getRequiredRevision();
        if (lhsRequiredRevision < rhsRequiredRevision) {
          return (-1);
        } else if (lhsRequiredRevision > rhsRequiredRevision) {
          return (1);
        }
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityClusterHBuff) {
      CFSecurityClusterHBuff rhs = (CFSecurityClusterHBuff) obj;
      int retval = 0;
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFSecurityClusterByUDomainNameIdxKey) {
      CFSecurityClusterByUDomainNameIdxKey rhs = (CFSecurityClusterByUDomainNameIdxKey) obj;

      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFSecurityClusterByUDescrIdxKey) {
      CFSecurityClusterByUDescrIdxKey rhs = (CFSecurityClusterByUDescrIdxKey) obj;

      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
    }
  }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFSecurityClusterBuff) {
     CFSecurityClusterBuff rhs = (CFSecurityClusterBuff) obj;
     if (!getCreatedByUserId().equals(rhs.getCreatedByUserId())) {
       return (false);
     }
     if (!getCreatedAt().equals(rhs.getCreatedAt())) {
       return (false);
     }
     if (!getUpdatedByUserId().equals(rhs.getUpdatedByUserId())) {
       return (false);
     }
     if (!getUpdatedAt().equals(rhs.getUpdatedAt())) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
       return (false);
     }
     if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecurityClusterPKey) {
     CFSecurityClusterPKey rhs = (CFSecurityClusterPKey) obj;
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecurityClusterHBuff) {
     CFSecurityClusterHBuff rhs = (CFSecurityClusterHBuff) obj;
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
       return (false);
     }
     if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecurityClusterHPKey) {
     CFSecurityClusterHPKey rhs = (CFSecurityClusterHPKey) obj;
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecurityClusterByUDomainNameIdxKey) {
     CFSecurityClusterByUDomainNameIdxKey rhs = (CFSecurityClusterByUDomainNameIdxKey) obj;
     if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecurityClusterByUDescrIdxKey) {
     CFSecurityClusterByUDescrIdxKey rhs = (CFSecurityClusterByUDescrIdxKey) obj;
     if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
       return (false);
     }
     return (true);
   } else {
     boolean retval = super.equals(obj);
     return (retval);
   }
 }
 public void updateCluster(CFSecurityAuthorization Authorization, CFSecurityClusterBuff Buff) {
   final String S_ProcName = "updateCluster";
   String rqst =
       CFBamXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
           + "\n"
           + "\t"
           + CFBamXMsgClusterMessageFormatter.formatClusterRqstUpdate("\n\t\t\t", Buff)
           + "\n"
           + CFBamXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
   try {
     schema.getCFTipClientHandler().issueAppRequest(rqst);
   } catch (BadPaddingException e) {
     throw CFLib.getDefaultExceptionFactory()
         .newRuntimeException(
             getClass(), S_ProcName, "Caught BadPaddingException - " + e.getMessage(), e);
   } catch (IllegalBlockSizeException e) {
     throw CFLib.getDefaultExceptionFactory()
         .newRuntimeException(
             getClass(), S_ProcName, "Caught IllegalBlockSizeException - " + e.getMessage(), e);
   } catch (InvalidKeyException e) {
     throw CFLib.getDefaultExceptionFactory()
         .newRuntimeException(
             getClass(), S_ProcName, "Caught InvalidKeyException - " + e.getMessage(), e);
   } catch (NoSuchAlgorithmException e) {
     throw CFLib.getDefaultExceptionFactory()
         .newRuntimeException(
             getClass(), S_ProcName, "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
   } catch (InvalidAlgorithmParameterException e) {
     throw CFLib.getDefaultExceptionFactory()
         .newRuntimeException(
             getClass(),
             S_ProcName,
             "Caught InvalidAlgorithmParameterException - " + e.getMessage(),
             e);
   } catch (NoSuchPaddingException e) {
     throw CFLib.getDefaultExceptionFactory()
         .newRuntimeException(
             getClass(), S_ProcName, "Caught NoSuchPaddingException - " + e.getMessage(), e);
   }
   ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
   CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
   if (exceptionRaised != null) {
     throw exceptionRaised;
   }
   CFSecurityClusterBuff buff = null;
   Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
   if (lastObjectProcessed != null) {
     ICFBamClusterObj realized = null;
     if (lastObjectProcessed instanceof ICFBamClusterObj) {
       realized = (ICFBamClusterObj) lastObjectProcessed;
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUnsupportedClassException(
               getClass(),
               S_ProcName,
               "lastObjectProcessed",
               lastObjectProcessed,
               "ICFBamClusterObj");
     }
     if (realized != null) {
       buff = realized.getClusterBuff();
     }
   }
   if (buff != null) {
     Buff.set(buff);
   }
 }
 public void copyOrigToBuff() {
   CFSecurityClusterBuff origBuff = getOrigAsCluster().getClusterBuff();
   CFSecurityClusterBuff myBuff = getClusterBuff();
   myBuff.set(origBuff);
 }
 public void copyBuffToOrig() {
   CFSecurityClusterBuff origBuff = getOrigAsCluster().getClusterBuff();
   CFSecurityClusterBuff myBuff = getClusterBuff();
   origBuff.set(myBuff);
 }
 public void copyBuffToPKey() {
   getPKey().setRequiredId(buff.getRequiredId());
 }
 public void copyPKeyToBuff() {
   buff.setRequiredId(getPKey().getRequiredId());
 }
 public CFInternetClusterEditObj(ICFSecurityClusterObj argOrig) {
   orig = argOrig;
   getBuff();
   CFSecurityClusterBuff origBuff = orig.getBuff();
   buff.set(origBuff);
 }