public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFBamInt32ColBuff) {
     CFBamInt32ColBuff rhs = (CFBamInt32ColBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredTableId() != rhs.getRequiredTableId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValuePKey) {
     CFBamValuePKey rhs = (CFBamValuePKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamInt32ColHBuff) {
     CFBamInt32ColHBuff rhs = (CFBamInt32ColHBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredTableId() != rhs.getRequiredTableId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValueHPKey) {
     CFBamValueHPKey rhs = (CFBamValueHPKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamInt32ColByTableIdxKey) {
     CFBamInt32ColByTableIdxKey rhs = (CFBamInt32ColByTableIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredTableId() != rhs.getRequiredTableId()) {
       return (false);
     }
     return (true);
   } else {
     boolean retval = super.equals(obj);
     return (retval);
   }
 }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFBamTokenTypeBuff) {
     CFBamTokenTypeBuff rhs = (CFBamTokenTypeBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredSchemaDefId() != rhs.getRequiredSchemaDefId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValuePKey) {
     CFBamValuePKey rhs = (CFBamValuePKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamTokenTypeHBuff) {
     CFBamTokenTypeHBuff rhs = (CFBamTokenTypeHBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredSchemaDefId() != rhs.getRequiredSchemaDefId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValueHPKey) {
     CFBamValueHPKey rhs = (CFBamValueHPKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamTokenTypeBySchemaIdxKey) {
     CFBamTokenTypeBySchemaIdxKey rhs = (CFBamTokenTypeBySchemaIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredSchemaDefId() != rhs.getRequiredSchemaDefId()) {
       return (false);
     }
     return (true);
   } else {
     boolean retval = super.equals(obj);
     return (retval);
   }
 }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamTokenTypeBuff) {
      CFBamTokenTypeBuff rhs = (CFBamTokenTypeBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      if (getRequiredSchemaDefId() < rhs.getRequiredSchemaDefId()) {
        return (-1);
      } else if (getRequiredSchemaDefId() > rhs.getRequiredSchemaDefId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamValuePKey) {
      CFBamValuePKey rhs = (CFBamValuePKey) obj;
      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamValueHPKey) {
      CFBamValueHPKey rhs = (CFBamValueHPKey) obj;
      {
        int lhsRequiredRevision = getRequiredRevision();
        int rhsRequiredRevision = rhs.getRequiredRevision();
        if (lhsRequiredRevision < rhsRequiredRevision) {
          return (-1);
        } else if (lhsRequiredRevision > rhsRequiredRevision) {
          return (1);
        }
      }
      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamTokenTypeHBuff) {
      CFBamTokenTypeHBuff rhs = (CFBamTokenTypeHBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      if (getRequiredSchemaDefId() < rhs.getRequiredSchemaDefId()) {
        return (-1);
      } else if (getRequiredSchemaDefId() > rhs.getRequiredSchemaDefId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamTokenTypeBySchemaIdxKey) {
      CFBamTokenTypeBySchemaIdxKey rhs = (CFBamTokenTypeBySchemaIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredSchemaDefId() < rhs.getRequiredSchemaDefId()) {
        return (-1);
      } else if (getRequiredSchemaDefId() > rhs.getRequiredSchemaDefId()) {
        return (1);
      }
      return (0);
    } else {
      int retval = super.compareTo(obj);
      return (retval);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFBamXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Primary Key Attributes for Constant Enum support
      String attrTenantId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstInt64ColDelete");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

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

      // Instantiate a PKey buffer for the parsed information
      CFBamValuePKey pkey = schemaObj.getBackingStore().getFactoryValue().newPKey();

      // 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("TenantId")) {
          if (attrTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTenantId = 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 ((attrTenantId == null) || (attrTenantId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TenantId");
      }
      if ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if ((attrRevision == null) || (attrRevision.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Revision");
      }

      // Get current context
      CFLibXmlCoreContext curContext = getParser().getCurContext();
      // Convert string attributes to native Java types
      // and apply the converted attributes to the editBuff.

      long natTenantId;
      natTenantId = Long.parseLong(attrTenantId);
      pkey.setRequiredTenantId(natTenantId);

      pkey.setRequiredTenantId(natTenantId);
      long natId;
      natId = Long.parseLong(attrId);
      pkey.setRequiredId(natId);

      pkey.setRequiredId(natId);
      int natRevision = Integer.parseInt(attrRevision);
      // Delete the object
      ICFBamInt64ColObj read = schemaObj.getInt64ColTableObj().readInt64Col(pkey);
      if (read != null) {
        if (read.getInt64ColBuff().getRequiredRevision() > natRevision) {
          throw CFLib.getDefaultExceptionFactory()
              .newCollisionDetectedException(
                  getClass(), S_ProcName, "Collision detected preparing to delete Int64Col");
        } else {
          ICFBamInt64ColEditObj editBuff = (ICFBamInt64ColEditObj) read.beginEdit();
          if (editBuff != null) {
            editBuff.delete();
            editBuff.endEdit();
            String response =
                schemaFormatter.formatRspnXmlPreamble()
                    + "\n"
                    + "\t"
                    + CFBamXMsgInt64ColMessageFormatter.formatInt64ColRspnDeleted()
                    + "\n"
                    + schemaFormatter.formatRspnXmlPostamble();
            ((CFBamXMsgRqstHandler) getParser()).appendResponse(response);
          } else {
            throw CFLib.getDefaultExceptionFactory()
                .newNullArgumentException(getClass(), S_ProcName, 0, "read.beginEdit()");
          }
        }
      } else {
        String response =
            schemaFormatter.formatRspnXmlPreamble()
                + "\n"
                + "\t"
                + CFBamXMsgSchemaMessageFormatter.formatRspnNoDataFound()
                + "\n"
                + schemaFormatter.formatRspnXmlPostamble();
        ((CFBamXMsgRqstHandler) getParser()).appendResponse(response);
      }
    } catch (RuntimeException e) {
      CFBamXMsgRqstHandler xmsgRqstHandler = ((CFBamXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFBamXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFBamXMsgRqstHandler xmsgRqstHandler = ((CFBamXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFBamXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFBamXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Value Attributes
      String attrTenantId = null;
      String attrScopeId = null;
      String attrDefSchemaTenantId = null;
      String attrDefSchemaId = null;
      String attrName = null;
      String attrShortName = null;
      String attrLabel = null;
      String attrShortDescription = null;
      String attrDescription = null;
      String attrIsNullable = null;
      String attrGenerateId = null;
      String attrDataScopeId = null;
      String attrViewAccessSecurityId = null;
      String attrEditAccessSecurityId = null;
      String attrViewAccessFrequencyId = null;
      String attrEditAccessFrequencyId = null;
      String attrPrevTenantId = null;
      String attrPrevId = null;
      String attrNextTenantId = null;
      String attrNextId = null;
      String attrDefaultVisibility = null;
      String attrCreatedAt = null;
      String attrCreatedBy = null;
      String attrUpdatedAt = null;
      String attrUpdatedBy = null;
      // Atom Attributes
      String attrDbName = null;
      // TZTimestampDef Attributes
      String attrInitValue = null;
      String attrDefaultValue = null;
      String attrMinValue = null;
      String attrMaxValue = null;
      String attrNullValue = null;
      String attrUnknownValue = null;
      // TZTimestampCol Attributes
      String attrTableId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstTZTimestampColUpdate");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

      ICFBamSchemaObj schemaObj = xmsgRqstHandler.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("TenantId")) {
          if (attrTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ScopeId")) {
          if (attrScopeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrScopeId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefSchemaTenantId")) {
          if (attrDefSchemaTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefSchemaTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefSchemaId")) {
          if (attrDefSchemaId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefSchemaId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ShortName")) {
          if (attrShortName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrShortName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Label")) {
          if (attrLabel != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrLabel = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ShortDescription")) {
          if (attrShortDescription != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrShortDescription = 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("IsNullable")) {
          if (attrIsNullable != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrIsNullable = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("GenerateId")) {
          if (attrGenerateId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrGenerateId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DataScopeId")) {
          if (attrDataScopeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDataScopeId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ViewAccessSecurityId")) {
          if (attrViewAccessSecurityId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrViewAccessSecurityId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("EditAccessSecurityId")) {
          if (attrEditAccessSecurityId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrEditAccessSecurityId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ViewAccessFrequencyId")) {
          if (attrViewAccessFrequencyId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrViewAccessFrequencyId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("EditAccessFrequencyId")) {
          if (attrEditAccessFrequencyId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrEditAccessFrequencyId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevTenantId")) {
          if (attrPrevTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevId")) {
          if (attrPrevId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextTenantId")) {
          if (attrNextTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextId")) {
          if (attrNextId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefaultVisibility")) {
          if (attrDefaultVisibility != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefaultVisibility = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DbName")) {
          if (attrDbName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDbName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("InitValue")) {
          if (attrInitValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrInitValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefaultValue")) {
          if (attrDefaultValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefaultValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MinValue")) {
          if (attrMinValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMinValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MaxValue")) {
          if (attrMaxValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMaxValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NullValue")) {
          if (attrNullValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNullValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("UnknownValue")) {
          if (attrUnknownValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrUnknownValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TableId")) {
          if (attrTableId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTableId = 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 ((attrTenantId == null) || (attrTenantId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TenantId");
      }
      if ((attrScopeId == null) || (attrScopeId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ScopeId");
      }
      if ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }
      if ((attrIsNullable == null) || (attrIsNullable.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "IsNullable");
      }
      if ((attrDefaultVisibility == null) || (attrDefaultVisibility.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "DefaultVisibility");
      }
      if ((attrRevision == null) || (attrRevision.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Revision");
      }
      if ((attrCreatedAt == null) || (attrCreatedAt.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "CreatedAt");
      }
      if ((attrCreatedBy == null) || (attrCreatedBy.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "CreatedBy");
      }
      if ((attrUpdatedAt == null) || (attrUpdatedAt.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "UpdatedAt");
      }
      if ((attrUpdatedBy == null) || (attrUpdatedBy.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "UpdatedBy");
      }
      if ((attrTableId == null) || (attrTableId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TableId");
      }

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

      // Instantiate a PKey buffer for the parsed information
      CFBamValuePKey pkey =
          ((ICFBamSchema) schemaObj.getBackingStore()).getFactoryValue().newPKey();

      long natTenantId;
      natTenantId = Long.parseLong(attrTenantId);
      pkey.setRequiredTenantId(natTenantId);
      long natId;
      natId = Long.parseLong(attrId);
      pkey.setRequiredId(natId);
      // Read the instance
      ICFBamTZTimestampColObj origBuff =
          ((ICFBamTZTimestampColObj)
              schemaObj.getTZTimestampColTableObj().readTZTimestampCol(pkey));
      if (origBuff == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(
                getClass(), S_ProcName, 0, "getTZTimestampColTableObj().readTZTimestampCol()");
      } else {
        // Edit the instance
        ICFBamTZTimestampColEditObj editBuff = (ICFBamTZTimestampColEditObj) origBuff.beginEdit();
        CFBamTZTimestampColBuff dataBuff = editBuff.getTZTimestampColBuff();
        // Convert string attributes to native Java types
        // and apply the converted attributes to the editBuff.
        long natScopeId = Long.parseLong(attrScopeId);

        dataBuff.setRequiredScopeId(natScopeId);

        Long natDefSchemaTenantId;
        if ((attrDefSchemaTenantId == null) || (attrDefSchemaTenantId.length() <= 0)) {
          natDefSchemaTenantId = null;
        } else {
          natDefSchemaTenantId = new Long(Long.parseLong(attrDefSchemaTenantId));
        }

        dataBuff.setOptionalDefSchemaTenantId(natDefSchemaTenantId);

        Long natDefSchemaId;
        if ((attrDefSchemaId == null) || (attrDefSchemaId.length() <= 0)) {
          natDefSchemaId = null;
        } else {
          natDefSchemaId = new Long(Long.parseLong(attrDefSchemaId));
        }

        dataBuff.setOptionalDefSchemaId(natDefSchemaId);

        String natName = attrName;

        dataBuff.setRequiredName(natName);

        String natShortName = attrShortName;

        dataBuff.setOptionalShortName(natShortName);

        String natLabel = attrLabel;

        dataBuff.setOptionalLabel(natLabel);

        String natShortDescription = attrShortDescription;

        dataBuff.setOptionalShortDescription(natShortDescription);

        String natDescription = attrDescription;

        dataBuff.setOptionalDescription(natDescription);

        boolean natIsNullable;
        if (attrIsNullable.equals("true")
            || attrIsNullable.equals("yes")
            || attrIsNullable.equals("1")) {
          natIsNullable = true;
        } else if (attrIsNullable.equals("false")
            || attrIsNullable.equals("no")
            || attrIsNullable.equals("0")) {
          natIsNullable = false;
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUsageException(
                  getClass(),
                  S_ProcName,
                  "Unexpected IsNullable value, must be one of true, false, yes, no, 1, or 0, not \""
                      + attrIsNullable
                      + "\"");
        }

        dataBuff.setRequiredIsNullable(natIsNullable);

        Boolean natGenerateId;
        if ((attrGenerateId == null) || (attrGenerateId.length() <= 0)) {
          natGenerateId = null;
        } else if (attrGenerateId.equals("true")
            || attrGenerateId.equals("yes")
            || attrGenerateId.equals("1")) {
          natGenerateId = true;
        } else if (attrGenerateId.equals("false")
            || attrGenerateId.equals("no")
            || attrGenerateId.equals("0")) {
          natGenerateId = false;
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUsageException(
                  getClass(),
                  S_ProcName,
                  "Unexpected GenerateId value, must be one of true, false, yes, no, 1, or 0, not \""
                      + attrGenerateId
                      + "\"");
        }

        dataBuff.setOptionalGenerateId(natGenerateId);

        Short natDataScopeId;
        if ((attrDataScopeId == null) || (attrDataScopeId.length() <= 0)) {
          natDataScopeId = null;
        } else {
          natDataScopeId = new Short(Short.parseShort(attrDataScopeId));
        }

        dataBuff.setOptionalDataScopeId(natDataScopeId);

        Short natViewAccessSecurityId;
        if ((attrViewAccessSecurityId == null) || (attrViewAccessSecurityId.length() <= 0)) {
          natViewAccessSecurityId = null;
        } else {
          natViewAccessSecurityId = new Short(Short.parseShort(attrViewAccessSecurityId));
        }

        dataBuff.setOptionalViewAccessSecurityId(natViewAccessSecurityId);

        Short natEditAccessSecurityId;
        if ((attrEditAccessSecurityId == null) || (attrEditAccessSecurityId.length() <= 0)) {
          natEditAccessSecurityId = null;
        } else {
          natEditAccessSecurityId = new Short(Short.parseShort(attrEditAccessSecurityId));
        }

        dataBuff.setOptionalEditAccessSecurityId(natEditAccessSecurityId);

        Short natViewAccessFrequencyId;
        if ((attrViewAccessFrequencyId == null) || (attrViewAccessFrequencyId.length() <= 0)) {
          natViewAccessFrequencyId = null;
        } else {
          natViewAccessFrequencyId = new Short(Short.parseShort(attrViewAccessFrequencyId));
        }

        dataBuff.setOptionalViewAccessFrequencyId(natViewAccessFrequencyId);

        Short natEditAccessFrequencyId;
        if ((attrEditAccessFrequencyId == null) || (attrEditAccessFrequencyId.length() <= 0)) {
          natEditAccessFrequencyId = null;
        } else {
          natEditAccessFrequencyId = new Short(Short.parseShort(attrEditAccessFrequencyId));
        }

        dataBuff.setOptionalEditAccessFrequencyId(natEditAccessFrequencyId);

        Long natPrevTenantId;
        if ((attrPrevTenantId == null) || (attrPrevTenantId.length() <= 0)) {
          natPrevTenantId = null;
        } else {
          natPrevTenantId = new Long(Long.parseLong(attrPrevTenantId));
        }

        dataBuff.setOptionalPrevTenantId(natPrevTenantId);

        Long natPrevId;
        if ((attrPrevId == null) || (attrPrevId.length() <= 0)) {
          natPrevId = null;
        } else {
          natPrevId = new Long(Long.parseLong(attrPrevId));
        }

        dataBuff.setOptionalPrevId(natPrevId);

        Long natNextTenantId;
        if ((attrNextTenantId == null) || (attrNextTenantId.length() <= 0)) {
          natNextTenantId = null;
        } else {
          natNextTenantId = new Long(Long.parseLong(attrNextTenantId));
        }

        dataBuff.setOptionalNextTenantId(natNextTenantId);

        Long natNextId;
        if ((attrNextId == null) || (attrNextId.length() <= 0)) {
          natNextId = null;
        } else {
          natNextId = new Long(Long.parseLong(attrNextId));
        }

        dataBuff.setOptionalNextId(natNextId);

        boolean natDefaultVisibility;
        if (attrDefaultVisibility.equals("true")
            || attrDefaultVisibility.equals("yes")
            || attrDefaultVisibility.equals("1")) {
          natDefaultVisibility = true;
        } else if (attrDefaultVisibility.equals("false")
            || attrDefaultVisibility.equals("no")
            || attrDefaultVisibility.equals("0")) {
          natDefaultVisibility = false;
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUsageException(
                  getClass(),
                  S_ProcName,
                  "Unexpected DefaultVisibility value, must be one of true, false, yes, no, 1, or 0, not \""
                      + attrDefaultVisibility
                      + "\"");
        }

        dataBuff.setRequiredDefaultVisibility(natDefaultVisibility);

        int natRevision = Integer.parseInt(attrRevision);
        dataBuff.setRequiredRevision(natRevision);
        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);
        }
        if (createdBy != null) {
          dataBuff.setCreatedByUserId(createdBy);
        }
        if (createdAt != null) {
          dataBuff.setCreatedAt(createdAt);
        }
        if (updatedBy != null) {
          dataBuff.setUpdatedByUserId(updatedBy);
        }
        if (updatedAt != null) {
          dataBuff.setUpdatedAt(updatedAt);
        }
        String natDbName = attrDbName;

        dataBuff.setOptionalDbName(natDbName);

        Calendar natInitValue;
        if ((attrInitValue == null) || (attrInitValue.length() <= 0)) {
          natInitValue = null;
        } else {
          try {
            natInitValue = CFLibXmlUtil.parseTZTimestamp(attrInitValue);
          } catch (RuntimeException e) {
            throw CFLib.getDefaultExceptionFactory()
                .newInvalidArgumentException(
                    getClass(), S_ProcName, 0, "InitValue", attrInitValue, e);
          }
        }

        dataBuff.setOptionalInitValue(natInitValue);

        Calendar natDefaultValue;
        if ((attrDefaultValue == null) || (attrDefaultValue.length() <= 0)) {
          natDefaultValue = null;
        } else {
          try {
            natDefaultValue = CFLibXmlUtil.parseTZTimestamp(attrDefaultValue);
          } catch (RuntimeException e) {
            throw CFLib.getDefaultExceptionFactory()
                .newInvalidArgumentException(
                    getClass(), S_ProcName, 0, "DefaultValue", attrDefaultValue, e);
          }
        }

        dataBuff.setOptionalDefaultValue(natDefaultValue);

        Calendar natMinValue;
        if ((attrMinValue == null) || (attrMinValue.length() <= 0)) {
          natMinValue = null;
        } else {
          try {
            natMinValue = CFLibXmlUtil.parseTZTimestamp(attrMinValue);
          } catch (RuntimeException e) {
            throw CFLib.getDefaultExceptionFactory()
                .newInvalidArgumentException(
                    getClass(), S_ProcName, 0, "MinValue", attrMinValue, e);
          }
        }

        dataBuff.setOptionalMinValue(natMinValue);

        Calendar natMaxValue;
        if ((attrMaxValue == null) || (attrMaxValue.length() <= 0)) {
          natMaxValue = null;
        } else {
          try {
            natMaxValue = CFLibXmlUtil.parseTZTimestamp(attrMaxValue);
          } catch (RuntimeException e) {
            throw CFLib.getDefaultExceptionFactory()
                .newInvalidArgumentException(
                    getClass(), S_ProcName, 0, "MaxValue", attrMaxValue, e);
          }
        }

        dataBuff.setOptionalMaxValue(natMaxValue);

        Calendar natNullValue;
        if ((attrNullValue == null) || (attrNullValue.length() <= 0)) {
          natNullValue = null;
        } else {
          try {
            natNullValue = CFLibXmlUtil.parseTZTimestamp(attrNullValue);
          } catch (RuntimeException e) {
            throw CFLib.getDefaultExceptionFactory()
                .newInvalidArgumentException(
                    getClass(), S_ProcName, 0, "NullValue", attrNullValue, e);
          }
        }

        dataBuff.setOptionalNullValue(natNullValue);

        Calendar natUnknownValue;
        if ((attrUnknownValue == null) || (attrUnknownValue.length() <= 0)) {
          natUnknownValue = null;
        } else {
          try {
            natUnknownValue = CFLibXmlUtil.parseTZTimestamp(attrUnknownValue);
          } catch (RuntimeException e) {
            throw CFLib.getDefaultExceptionFactory()
                .newInvalidArgumentException(
                    getClass(), S_ProcName, 0, "UnknownValue", attrUnknownValue, e);
          }
        }

        dataBuff.setOptionalUnknownValue(natUnknownValue);

        long natTableId = Long.parseLong(attrTableId);

        dataBuff.setRequiredTableId(natTableId);

        //	Attempt the update
        editBuff.update();
        editBuff.endEdit();
        String response =
            schemaFormatter.formatRspnXmlPreamble()
                + "\n"
                + "\t"
                + CFBamXMsgTZTimestampColMessageFormatter.formatTZTimestampColRspnUpdated(
                    "\n\t\t\t", origBuff.getTZTimestampColBuff())
                + "\n"
                + schemaFormatter.formatRspnXmlPostamble();
        ((CFBamXMsgRqstHandler) getParser()).appendResponse(response);
      }
    } catch (RuntimeException e) {
      CFBamXMsgRqstHandler xmsgRqstHandler = ((CFBamXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFBamXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFBamXMsgRqstHandler xmsgRqstHandler = ((CFBamXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFBamXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
 public int compareTo(Object obj) {
   if (obj == null) {
     return (-1);
   } else if (obj instanceof CFBamNmTokensDefBuff) {
     CFBamNmTokensDefBuff rhs = (CFBamNmTokensDefBuff) obj;
     int retval = super.compareTo(rhs);
     if (retval != 0) {
       return (retval);
     }
     if (getRequiredMaxLen() < rhs.getRequiredMaxLen()) {
       return (-1);
     } else if (getRequiredMaxLen() > rhs.getRequiredMaxLen()) {
       return (1);
     }
     if (getOptionalInitValue() != null) {
       if (rhs.getOptionalInitValue() != null) {
         int cmp = getOptionalInitValue().compareTo(rhs.getOptionalInitValue());
         if (cmp != 0) {
           return (cmp);
         }
       } else {
         return (1);
       }
     } else {
       if (rhs.getOptionalInitValue() != null) {
         return (-1);
       }
     }
     if (getOptionalDefaultValue() != null) {
       if (rhs.getOptionalDefaultValue() != null) {
         int cmp = getOptionalDefaultValue().compareTo(rhs.getOptionalDefaultValue());
         if (cmp != 0) {
           return (cmp);
         }
       } else {
         return (1);
       }
     } else {
       if (rhs.getOptionalDefaultValue() != null) {
         return (-1);
       }
     }
     if (getOptionalNullValue() != null) {
       if (rhs.getOptionalNullValue() != null) {
         int cmp = getOptionalNullValue().compareTo(rhs.getOptionalNullValue());
         if (cmp != 0) {
           return (cmp);
         }
       } else {
         return (1);
       }
     } else {
       if (rhs.getOptionalNullValue() != null) {
         return (-1);
       }
     }
     if (getOptionalUnknownValue() != null) {
       if (rhs.getOptionalUnknownValue() != null) {
         int cmp = getOptionalUnknownValue().compareTo(rhs.getOptionalUnknownValue());
         if (cmp != 0) {
           return (cmp);
         }
       } else {
         return (1);
       }
     } else {
       if (rhs.getOptionalUnknownValue() != null) {
         return (-1);
       }
     }
     if (getRequiredShowLines() < rhs.getRequiredShowLines()) {
       return (-1);
     } else if (getRequiredShowLines() > rhs.getRequiredShowLines()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamValuePKey) {
     CFBamValuePKey rhs = (CFBamValuePKey) obj;
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamValueHPKey) {
     CFBamValueHPKey rhs = (CFBamValueHPKey) obj;
     {
       int lhsRequiredRevision = getRequiredRevision();
       int rhsRequiredRevision = rhs.getRequiredRevision();
       if (lhsRequiredRevision < rhsRequiredRevision) {
         return (-1);
       } else if (lhsRequiredRevision > rhsRequiredRevision) {
         return (1);
       }
     }
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamNmTokensDefHBuff) {
     CFBamNmTokensDefHBuff rhs = (CFBamNmTokensDefHBuff) obj;
     int retval = super.compareTo(rhs);
     if (retval != 0) {
       return (retval);
     }
     if (getRequiredMaxLen() < rhs.getRequiredMaxLen()) {
       return (-1);
     } else if (getRequiredMaxLen() > rhs.getRequiredMaxLen()) {
       return (1);
     }
     if (getOptionalInitValue() != null) {
       if (rhs.getOptionalInitValue() != null) {
         int cmp = getOptionalInitValue().compareTo(rhs.getOptionalInitValue());
         if (cmp != 0) {
           return (cmp);
         }
       } else {
         return (1);
       }
     } else {
       if (rhs.getOptionalInitValue() != null) {
         return (-1);
       }
     }
     if (getOptionalDefaultValue() != null) {
       if (rhs.getOptionalDefaultValue() != null) {
         int cmp = getOptionalDefaultValue().compareTo(rhs.getOptionalDefaultValue());
         if (cmp != 0) {
           return (cmp);
         }
       } else {
         return (1);
       }
     } else {
       if (rhs.getOptionalDefaultValue() != null) {
         return (-1);
       }
     }
     if (getOptionalNullValue() != null) {
       if (rhs.getOptionalNullValue() != null) {
         int cmp = getOptionalNullValue().compareTo(rhs.getOptionalNullValue());
         if (cmp != 0) {
           return (cmp);
         }
       } else {
         return (1);
       }
     } else {
       if (rhs.getOptionalNullValue() != null) {
         return (-1);
       }
     }
     if (getOptionalUnknownValue() != null) {
       if (rhs.getOptionalUnknownValue() != null) {
         int cmp = getOptionalUnknownValue().compareTo(rhs.getOptionalUnknownValue());
         if (cmp != 0) {
           return (cmp);
         }
       } else {
         return (1);
       }
     } else {
       if (rhs.getOptionalUnknownValue() != null) {
         return (-1);
       }
     }
     if (getRequiredShowLines() < rhs.getRequiredShowLines()) {
       return (-1);
     } else if (getRequiredShowLines() > rhs.getRequiredShowLines()) {
       return (1);
     }
     return (0);
   } else {
     int retval = super.compareTo(obj);
     return (retval);
   }
 }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFBamNmTokensDefBuff) {
     CFBamNmTokensDefBuff rhs = (CFBamNmTokensDefBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredMaxLen() != rhs.getRequiredMaxLen()) {
       return (false);
     }
     if (getOptionalInitValue() != null) {
       if (rhs.getOptionalInitValue() != null) {
         if (!getOptionalInitValue().equals(rhs.getOptionalInitValue())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalInitValue() != null) {
         return (false);
       }
     }
     if (getOptionalDefaultValue() != null) {
       if (rhs.getOptionalDefaultValue() != null) {
         if (!getOptionalDefaultValue().equals(rhs.getOptionalDefaultValue())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalDefaultValue() != null) {
         return (false);
       }
     }
     if (getOptionalNullValue() != null) {
       if (rhs.getOptionalNullValue() != null) {
         if (!getOptionalNullValue().equals(rhs.getOptionalNullValue())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalNullValue() != null) {
         return (false);
       }
     }
     if (getOptionalUnknownValue() != null) {
       if (rhs.getOptionalUnknownValue() != null) {
         if (!getOptionalUnknownValue().equals(rhs.getOptionalUnknownValue())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalUnknownValue() != null) {
         return (false);
       }
     }
     if (getRequiredShowLines() != rhs.getRequiredShowLines()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValuePKey) {
     CFBamValuePKey rhs = (CFBamValuePKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamNmTokensDefHBuff) {
     CFBamNmTokensDefHBuff rhs = (CFBamNmTokensDefHBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredMaxLen() != rhs.getRequiredMaxLen()) {
       return (false);
     }
     if (getOptionalInitValue() != null) {
       if (rhs.getOptionalInitValue() != null) {
         if (!getOptionalInitValue().equals(rhs.getOptionalInitValue())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalInitValue() != null) {
         return (false);
       }
     }
     if (getOptionalDefaultValue() != null) {
       if (rhs.getOptionalDefaultValue() != null) {
         if (!getOptionalDefaultValue().equals(rhs.getOptionalDefaultValue())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalDefaultValue() != null) {
         return (false);
       }
     }
     if (getOptionalNullValue() != null) {
       if (rhs.getOptionalNullValue() != null) {
         if (!getOptionalNullValue().equals(rhs.getOptionalNullValue())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalNullValue() != null) {
         return (false);
       }
     }
     if (getOptionalUnknownValue() != null) {
       if (rhs.getOptionalUnknownValue() != null) {
         if (!getOptionalUnknownValue().equals(rhs.getOptionalUnknownValue())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalUnknownValue() != null) {
         return (false);
       }
     }
     if (getRequiredShowLines() != rhs.getRequiredShowLines()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValueHPKey) {
     CFBamValueHPKey rhs = (CFBamValueHPKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else {
     boolean retval = super.equals(obj);
     return (retval);
   }
 }
 public static String formatValuePKeyAttributes(String separator, CFBamValuePKey pkey) {
   String retval =
       CFLibXmlUtil.formatRequiredInt64(null, "TenantId", pkey.getRequiredTenantId())
           + CFLibXmlUtil.formatRequiredInt64(separator, "Id", pkey.getRequiredId());
   return (retval);
 }
 public int compareTo(Object obj) {
   if (obj == null) {
     return (-1);
   } else if (obj instanceof CFBamValueHBuff) {
     CFBamValueHBuff rhs = (CFBamValueHBuff) 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);
         }
       }
     }
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamValueHPKey) {
     CFBamValueHPKey rhs = (CFBamValueHPKey) 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 (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamHPKey) {
     CFBamHPKey rhs = (CFBamHPKey) 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);
         }
       }
     }
     return (0);
   } else if (obj instanceof CFBamValuePKey) {
     CFBamValuePKey rhs = (CFBamValuePKey) obj;
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamValueBuff) {
     CFBamValueBuff rhs = (CFBamValueBuff) obj;
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(
             getClass(),
             "compareTo",
             "obj",
             obj,
             "CFBamValueHPKey, CFBamValuePKey, CFBamValueBuff");
   }
 }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFBamValueHPKey) {
     CFBamValueHPKey rhs = (CFBamValueHPKey) 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 (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamHPKey) {
     CFBamHPKey rhs = (CFBamHPKey) 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 CFBamValuePKey) {
     CFBamValuePKey rhs = (CFBamValuePKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValueHBuff) {
     CFBamValueHBuff rhs = (CFBamValueHBuff) 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 (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamValueBuff) {
     CFBamValueBuff rhs = (CFBamValueBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else {
     return (false);
   }
 }