public void logout() {
   if ((authorization == null) || (backingStore == null)) {
     return;
   }
   try {
     boolean transactionStarted = beginTransaction();
     if (!transactionStarted) {
       rollback();
       transactionStarted = beginTransaction();
       if (!transactionStarted) {
         setAuthorization(null);
         return;
       }
     }
     UUID secSessionId = authorization.getSecSessionId();
     if (secSessionId != null) {
       ICFSecuritySecSessionObj secSession =
           getSecSessionTableObj().readSecSessionByIdIdx(secSessionId);
       if (secSession != null) {
         if (secSession.getOptionalFinish() == null) {
           ICFSecuritySecSessionEditObj editSecSession = secSession.beginEdit();
           editSecSession.setOptionalFinish(Calendar.getInstance());
           editSecSession.update();
           editSecSession.endEdit();
         }
       }
     }
     commit();
   } finally {
     setAuthorization(null);
     minimizeMemory();
   }
 }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFFreeSwitchFSSFDirectoryHBuff) {
     CFFreeSwitchFSSFDirectoryHBuff rhs = (CFFreeSwitchFSSFDirectoryHBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredFSSFDirectoryId() != rhs.getRequiredFSSFDirectoryId()) {
       return (false);
     }
     if (getRequiredFSSofiaId() != rhs.getRequiredFSSofiaId()) {
       return (false);
     }
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     if (!getRequiredDialString().equals(rhs.getRequiredDialString())) {
       return (false);
     }
     if (getRequiredRecordStereo() != rhs.getRequiredRecordStereo()) {
       return (false);
     }
     if (!getRequiredDefaultGateway().equals(rhs.getRequiredDefaultGateway())) {
       return (false);
     }
     if (!getRequiredDefaultAreacode().equals(rhs.getRequiredDefaultAreacode())) {
       return (false);
     }
     if (!getRequiredTransferFallbackExtension()
         .equals(rhs.getRequiredTransferFallbackExtension())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchFSSFDirectoryBuff) {
     CFFreeSwitchFSSFDirectoryBuff rhs = (CFFreeSwitchFSSFDirectoryBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredFSSFDirectoryId() != rhs.getRequiredFSSFDirectoryId()) {
       return (false);
     }
     if (getRequiredFSSofiaId() != rhs.getRequiredFSSofiaId()) {
       return (false);
     }
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     if (!getRequiredDialString().equals(rhs.getRequiredDialString())) {
       return (false);
     }
     if (getRequiredRecordStereo() != rhs.getRequiredRecordStereo()) {
       return (false);
     }
     if (!getRequiredDefaultGateway().equals(rhs.getRequiredDefaultGateway())) {
       return (false);
     }
     if (!getRequiredDefaultAreacode().equals(rhs.getRequiredDefaultAreacode())) {
       return (false);
     }
     if (!getRequiredTransferFallbackExtension()
         .equals(rhs.getRequiredTransferFallbackExtension())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchFSSFDirectoryByTenantIdxKey) {
     CFFreeSwitchFSSFDirectoryByTenantIdxKey rhs = (CFFreeSwitchFSSFDirectoryByTenantIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchFSSFDirectoryBySofiaIdxKey) {
     CFFreeSwitchFSSFDirectoryBySofiaIdxKey rhs = (CFFreeSwitchFSSFDirectoryBySofiaIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredFSSofiaId() != rhs.getRequiredFSSofiaId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchFSSFDirectoryByUNameIdxKey) {
     CFFreeSwitchFSSFDirectoryByUNameIdxKey rhs = (CFFreeSwitchFSSFDirectoryByUNameIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredFSSofiaId() != rhs.getRequiredFSSofiaId()) {
       return (false);
     }
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchFSSFDirectoryHPKey) {
     CFFreeSwitchFSSFDirectoryHPKey rhs = (CFFreeSwitchFSSFDirectoryHPKey) 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 (getRequiredFSSFDirectoryId() != rhs.getRequiredFSSFDirectoryId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchHPKey) {
     CFFreeSwitchHPKey rhs = (CFFreeSwitchHPKey) 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 CFFreeSwitchFSSFDirectoryPKey) {
     CFFreeSwitchFSSFDirectoryPKey rhs = (CFFreeSwitchFSSFDirectoryPKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredFSSFDirectoryId() != rhs.getRequiredFSSFDirectoryId()) {
       return (false);
     }
     return (true);
   } else {
     return (super.equals(obj));
   }
 }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamEnumTagBuff) {
      CFBamEnumTagBuff rhs = (CFBamEnumTagBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFBamEnumTagByEnumTagTenantIdxKey) {
      CFBamEnumTagByEnumTagTenantIdxKey rhs = (CFBamEnumTagByEnumTagTenantIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamEnumTagByEnumIdxKey) {
      CFBamEnumTagByEnumIdxKey rhs = (CFBamEnumTagByEnumIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredEnumId() < rhs.getRequiredEnumId()) {
        return (-1);
      } else if (getRequiredEnumId() > rhs.getRequiredEnumId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamEnumTagByDefSchemaIdxKey) {
      CFBamEnumTagByDefSchemaIdxKey rhs = (CFBamEnumTagByDefSchemaIdxKey) obj;

      if (getOptionalDefSchemaTenantId() != null) {
        Long lhsDefSchemaTenantId = getOptionalDefSchemaTenantId();
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          Long rhsDefSchemaTenantId = rhs.getOptionalDefSchemaTenantId();
          int cmp = lhsDefSchemaTenantId.compareTo(rhsDefSchemaTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalDefSchemaId() != null) {
        Long lhsDefSchemaId = getOptionalDefSchemaId();
        if (rhs.getOptionalDefSchemaId() != null) {
          Long rhsDefSchemaId = rhs.getOptionalDefSchemaId();
          int cmp = lhsDefSchemaId.compareTo(rhsDefSchemaId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaId() != null) {
          return (-1);
        }
      }
      return (0);
    } else if (obj instanceof CFBamEnumTagByEnumNameIdxKey) {
      CFBamEnumTagByEnumNameIdxKey rhs = (CFBamEnumTagByEnumNameIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredEnumId() < rhs.getRequiredEnumId()) {
        return (-1);
      } else if (getRequiredEnumId() > rhs.getRequiredEnumId()) {
        return (1);
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamEnumTagByPrevIdxKey) {
      CFBamEnumTagByPrevIdxKey rhs = (CFBamEnumTagByPrevIdxKey) obj;

      if (getOptionalPrevTenantId() != null) {
        Long lhsPrevTenantId = getOptionalPrevTenantId();
        if (rhs.getOptionalPrevTenantId() != null) {
          Long rhsPrevTenantId = rhs.getOptionalPrevTenantId();
          int cmp = lhsPrevTenantId.compareTo(rhsPrevTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalPrevId() != null) {
        Long lhsPrevId = getOptionalPrevId();
        if (rhs.getOptionalPrevId() != null) {
          Long rhsPrevId = rhs.getOptionalPrevId();
          int cmp = lhsPrevId.compareTo(rhsPrevId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevId() != null) {
          return (-1);
        }
      }
      return (0);
    } else if (obj instanceof CFBamEnumTagByNextIdxKey) {
      CFBamEnumTagByNextIdxKey rhs = (CFBamEnumTagByNextIdxKey) obj;

      if (getOptionalNextTenantId() != null) {
        Long lhsNextTenantId = getOptionalNextTenantId();
        if (rhs.getOptionalNextTenantId() != null) {
          Long rhsNextTenantId = rhs.getOptionalNextTenantId();
          int cmp = lhsNextTenantId.compareTo(rhsNextTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextId() != null) {
        Long lhsNextId = getOptionalNextId();
        if (rhs.getOptionalNextId() != null) {
          Long rhsNextId = rhs.getOptionalNextId();
          int cmp = lhsNextId.compareTo(rhsNextId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextId() != null) {
          return (-1);
        }
      }
      return (0);
    } else if (obj instanceof CFBamEnumTagHBuff) {
      CFBamEnumTagHBuff rhs = (CFBamEnumTagHBuff) 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 (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);
      }
      if (getOptionalDefSchemaTenantId() != null) {
        Long lhsDefSchemaTenantId = getOptionalDefSchemaTenantId();
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          Long rhsDefSchemaTenantId = rhs.getOptionalDefSchemaTenantId();
          int cmp = lhsDefSchemaTenantId.compareTo(rhsDefSchemaTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalDefSchemaId() != null) {
        Long lhsDefSchemaId = getOptionalDefSchemaId();
        if (rhs.getOptionalDefSchemaId() != null) {
          Long rhsDefSchemaId = rhs.getOptionalDefSchemaId();
          int cmp = lhsDefSchemaId.compareTo(rhsDefSchemaId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaId() != null) {
          return (-1);
        }
      }
      if (getRequiredEnumId() < rhs.getRequiredEnumId()) {
        return (-1);
      } else if (getRequiredEnumId() > rhs.getRequiredEnumId()) {
        return (1);
      }
      if (getOptionalEnumCode() != null) {
        Short lhsEnumCode = getOptionalEnumCode();
        if (rhs.getOptionalEnumCode() != null) {
          Short rhsEnumCode = rhs.getOptionalEnumCode();
          int cmp = lhsEnumCode.compareTo(rhsEnumCode);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalEnumCode() != null) {
          return (-1);
        }
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getOptionalPrevTenantId() != null) {
        Long lhsPrevTenantId = getOptionalPrevTenantId();
        if (rhs.getOptionalPrevTenantId() != null) {
          Long rhsPrevTenantId = rhs.getOptionalPrevTenantId();
          int cmp = lhsPrevTenantId.compareTo(rhsPrevTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalPrevId() != null) {
        Long lhsPrevId = getOptionalPrevId();
        if (rhs.getOptionalPrevId() != null) {
          Long rhsPrevId = rhs.getOptionalPrevId();
          int cmp = lhsPrevId.compareTo(rhsPrevId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextTenantId() != null) {
        Long lhsNextTenantId = getOptionalNextTenantId();
        if (rhs.getOptionalNextTenantId() != null) {
          Long rhsNextTenantId = rhs.getOptionalNextTenantId();
          int cmp = lhsNextTenantId.compareTo(rhsNextTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextId() != null) {
        Long lhsNextId = getOptionalNextId();
        if (rhs.getOptionalNextId() != null) {
          Long rhsNextId = rhs.getOptionalNextId();
          int cmp = lhsNextId.compareTo(rhsNextId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextId() != null) {
          return (-1);
        }
      }
      return (0);
    } else if (obj instanceof CFBamEnumTagHPKey) {
      CFBamEnumTagHPKey rhs = (CFBamEnumTagHPKey) 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 CFBamEnumTagPKey) {
      CFBamEnumTagPKey rhs = (CFBamEnumTagPKey) 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 CFBamHPKey) {
      CFBamHPKey rhs = (CFBamHPKey) 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 CFBamEnumTagHBuff) {
     CFBamEnumTagHBuff rhs = (CFBamEnumTagHBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getOptionalDefSchemaTenantId() != null) {
       if (rhs.getOptionalDefSchemaTenantId() != null) {
         if (!getOptionalDefSchemaTenantId().equals(rhs.getOptionalDefSchemaTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalDefSchemaTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalDefSchemaId() != null) {
       if (rhs.getOptionalDefSchemaId() != null) {
         if (!getOptionalDefSchemaId().equals(rhs.getOptionalDefSchemaId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalDefSchemaId() != null) {
         return (false);
       }
     }
     if (getRequiredEnumId() != rhs.getRequiredEnumId()) {
       return (false);
     }
     if (getOptionalEnumCode() != null) {
       if (rhs.getOptionalEnumCode() != null) {
         if (!getOptionalEnumCode().equals(rhs.getOptionalEnumCode())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalEnumCode() != null) {
         return (false);
       }
     }
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     if (getOptionalPrevTenantId() != null) {
       if (rhs.getOptionalPrevTenantId() != null) {
         if (!getOptionalPrevTenantId().equals(rhs.getOptionalPrevTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalPrevTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalPrevId() != null) {
       if (rhs.getOptionalPrevId() != null) {
         if (!getOptionalPrevId().equals(rhs.getOptionalPrevId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalPrevId() != null) {
         return (false);
       }
     }
     if (getOptionalNextTenantId() != null) {
       if (rhs.getOptionalNextTenantId() != null) {
         if (!getOptionalNextTenantId().equals(rhs.getOptionalNextTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalNextTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalNextId() != null) {
       if (rhs.getOptionalNextId() != null) {
         if (!getOptionalNextId().equals(rhs.getOptionalNextId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalNextId() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFBamEnumTagBuff) {
     CFBamEnumTagBuff rhs = (CFBamEnumTagBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (getOptionalDefSchemaTenantId() != null) {
       if (rhs.getOptionalDefSchemaTenantId() != null) {
         if (!getOptionalDefSchemaTenantId().equals(rhs.getOptionalDefSchemaTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalDefSchemaTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalDefSchemaId() != null) {
       if (rhs.getOptionalDefSchemaId() != null) {
         if (!getOptionalDefSchemaId().equals(rhs.getOptionalDefSchemaId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalDefSchemaId() != null) {
         return (false);
       }
     }
     if (getRequiredEnumId() != rhs.getRequiredEnumId()) {
       return (false);
     }
     if (getOptionalEnumCode() != null) {
       if (rhs.getOptionalEnumCode() != null) {
         if (!getOptionalEnumCode().equals(rhs.getOptionalEnumCode())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalEnumCode() != null) {
         return (false);
       }
     }
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     if (getOptionalPrevTenantId() != null) {
       if (rhs.getOptionalPrevTenantId() != null) {
         if (!getOptionalPrevTenantId().equals(rhs.getOptionalPrevTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalPrevTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalPrevId() != null) {
       if (rhs.getOptionalPrevId() != null) {
         if (!getOptionalPrevId().equals(rhs.getOptionalPrevId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalPrevId() != null) {
         return (false);
       }
     }
     if (getOptionalNextTenantId() != null) {
       if (rhs.getOptionalNextTenantId() != null) {
         if (!getOptionalNextTenantId().equals(rhs.getOptionalNextTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalNextTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalNextId() != null) {
       if (rhs.getOptionalNextId() != null) {
         if (!getOptionalNextId().equals(rhs.getOptionalNextId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalNextId() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFBamEnumTagByEnumTagTenantIdxKey) {
     CFBamEnumTagByEnumTagTenantIdxKey rhs = (CFBamEnumTagByEnumTagTenantIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamEnumTagByEnumIdxKey) {
     CFBamEnumTagByEnumIdxKey rhs = (CFBamEnumTagByEnumIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredEnumId() != rhs.getRequiredEnumId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamEnumTagByDefSchemaIdxKey) {
     CFBamEnumTagByDefSchemaIdxKey rhs = (CFBamEnumTagByDefSchemaIdxKey) obj;
     if (getOptionalDefSchemaTenantId() != null) {
       if (rhs.getOptionalDefSchemaTenantId() != null) {
         if (!getOptionalDefSchemaTenantId().equals(rhs.getOptionalDefSchemaTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalDefSchemaTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalDefSchemaId() != null) {
       if (rhs.getOptionalDefSchemaId() != null) {
         if (!getOptionalDefSchemaId().equals(rhs.getOptionalDefSchemaId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalDefSchemaId() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFBamEnumTagByEnumNameIdxKey) {
     CFBamEnumTagByEnumNameIdxKey rhs = (CFBamEnumTagByEnumNameIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredEnumId() != rhs.getRequiredEnumId()) {
       return (false);
     }
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamEnumTagByPrevIdxKey) {
     CFBamEnumTagByPrevIdxKey rhs = (CFBamEnumTagByPrevIdxKey) obj;
     if (getOptionalPrevTenantId() != null) {
       if (rhs.getOptionalPrevTenantId() != null) {
         if (!getOptionalPrevTenantId().equals(rhs.getOptionalPrevTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalPrevTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalPrevId() != null) {
       if (rhs.getOptionalPrevId() != null) {
         if (!getOptionalPrevId().equals(rhs.getOptionalPrevId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalPrevId() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFBamEnumTagByNextIdxKey) {
     CFBamEnumTagByNextIdxKey rhs = (CFBamEnumTagByNextIdxKey) obj;
     if (getOptionalNextTenantId() != null) {
       if (rhs.getOptionalNextTenantId() != null) {
         if (!getOptionalNextTenantId().equals(rhs.getOptionalNextTenantId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalNextTenantId() != null) {
         return (false);
       }
     }
     if (getOptionalNextId() != null) {
       if (rhs.getOptionalNextId() != null) {
         if (!getOptionalNextId().equals(rhs.getOptionalNextId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalNextId() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFBamEnumTagHPKey) {
     CFBamEnumTagHPKey rhs = (CFBamEnumTagHPKey) 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 CFBamEnumTagPKey) {
     CFBamEnumTagPKey rhs = (CFBamEnumTagPKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else {
     return (super.equals(obj));
   }
 }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFAsteriskExtensionsConfBuff) {
      CFAsteriskExtensionsConfBuff rhs = (CFAsteriskExtensionsConfBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFAsteriskExtensionsConfByExtClusterIdxKey) {
      CFAsteriskExtensionsConfByExtClusterIdxKey rhs =
          (CFAsteriskExtensionsConfByExtClusterIdxKey) obj;

      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFAsteriskExtensionsConfHBuff) {
      CFAsteriskExtensionsConfHBuff rhs = (CFAsteriskExtensionsConfHBuff) obj;

      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      {
        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 (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      {
        int cmp = getRequiredFileFullName().compareTo(rhs.getRequiredFileFullName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredFileContents().compareTo(rhs.getRequiredFileContents());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else {
      return (super.compareTo(obj));
    }
  }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamBoolTypeBuff) {
      CFBamBoolTypeBuff rhs = (CFBamBoolTypeBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFBamBoolTypeBySchemaIdxKey) {
      CFBamBoolTypeBySchemaIdxKey rhs = (CFBamBoolTypeBySchemaIdxKey) 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 if (obj instanceof CFBamBoolTypeHBuff) {
      CFBamBoolTypeHBuff rhs = (CFBamBoolTypeHBuff) obj;

      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      {
        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 (getRequiredScopeId() < rhs.getRequiredScopeId()) {
        return (-1);
      } else if (getRequiredScopeId() > rhs.getRequiredScopeId()) {
        return (1);
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      if (getOptionalDefSchemaTenantId() != null) {
        Long lhsDefSchemaTenantId = getOptionalDefSchemaTenantId();
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          Long rhsDefSchemaTenantId = rhs.getOptionalDefSchemaTenantId();
          int cmp = lhsDefSchemaTenantId.compareTo(rhsDefSchemaTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalDefSchemaId() != null) {
        Long lhsDefSchemaId = getOptionalDefSchemaId();
        if (rhs.getOptionalDefSchemaId() != null) {
          Long rhsDefSchemaId = rhs.getOptionalDefSchemaId();
          int cmp = lhsDefSchemaId.compareTo(rhsDefSchemaId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaId() != null) {
          return (-1);
        }
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getOptionalShortName() != null) {
        if (rhs.getOptionalShortName() != null) {
          int cmp = getOptionalShortName().compareTo(rhs.getOptionalShortName());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalShortName() != null) {
          return (-1);
        }
      }
      if (getOptionalLabel() != null) {
        if (rhs.getOptionalLabel() != null) {
          int cmp = getOptionalLabel().compareTo(rhs.getOptionalLabel());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalLabel() != null) {
          return (-1);
        }
      }
      if (getOptionalShortDescription() != null) {
        if (rhs.getOptionalShortDescription() != null) {
          int cmp = getOptionalShortDescription().compareTo(rhs.getOptionalShortDescription());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalShortDescription() != null) {
          return (-1);
        }
      }
      if (getOptionalDescription() != null) {
        if (rhs.getOptionalDescription() != null) {
          int cmp = getOptionalDescription().compareTo(rhs.getOptionalDescription());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDescription() != null) {
          return (-1);
        }
      }
      if (getRequiredIsNullable()) {
        if (!rhs.getRequiredIsNullable()) {
          return (1);
        }
      } else {
        if (rhs.getRequiredIsNullable()) {
          return (-1);
        }
      }
      if (getOptionalGenerateId() != null) {
        Boolean lhsGenerateId = getOptionalGenerateId();
        if (rhs.getOptionalGenerateId()) {
          Boolean rhsGenerateId = rhs.getOptionalGenerateId();
          if (lhsGenerateId) {
            if (!rhsGenerateId) {
              return (1);
            }
          } else {
            if (rhsGenerateId) {
              return (-1);
            }
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalGenerateId() != null) {
          return (-1);
        }
      }
      if (getOptionalDataScopeId() != null) {
        Short lhsDataScopeId = getOptionalDataScopeId();
        if (rhs.getOptionalDataScopeId() != null) {
          Short rhsDataScopeId = rhs.getOptionalDataScopeId();
          int cmp = lhsDataScopeId.compareTo(rhsDataScopeId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDataScopeId() != null) {
          return (-1);
        }
      }
      if (getOptionalViewAccessSecurityId() != null) {
        Short lhsViewAccessSecurityId = getOptionalViewAccessSecurityId();
        if (rhs.getOptionalViewAccessSecurityId() != null) {
          Short rhsViewAccessSecurityId = rhs.getOptionalViewAccessSecurityId();
          int cmp = lhsViewAccessSecurityId.compareTo(rhsViewAccessSecurityId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalViewAccessSecurityId() != null) {
          return (-1);
        }
      }
      if (getOptionalEditAccessSecurityId() != null) {
        Short lhsEditAccessSecurityId = getOptionalEditAccessSecurityId();
        if (rhs.getOptionalEditAccessSecurityId() != null) {
          Short rhsEditAccessSecurityId = rhs.getOptionalEditAccessSecurityId();
          int cmp = lhsEditAccessSecurityId.compareTo(rhsEditAccessSecurityId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalEditAccessSecurityId() != null) {
          return (-1);
        }
      }
      if (getOptionalViewAccessFrequencyId() != null) {
        Short lhsViewAccessFrequencyId = getOptionalViewAccessFrequencyId();
        if (rhs.getOptionalViewAccessFrequencyId() != null) {
          Short rhsViewAccessFrequencyId = rhs.getOptionalViewAccessFrequencyId();
          int cmp = lhsViewAccessFrequencyId.compareTo(rhsViewAccessFrequencyId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalViewAccessFrequencyId() != null) {
          return (-1);
        }
      }
      if (getOptionalEditAccessFrequencyId() != null) {
        Short lhsEditAccessFrequencyId = getOptionalEditAccessFrequencyId();
        if (rhs.getOptionalEditAccessFrequencyId() != null) {
          Short rhsEditAccessFrequencyId = rhs.getOptionalEditAccessFrequencyId();
          int cmp = lhsEditAccessFrequencyId.compareTo(rhsEditAccessFrequencyId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalEditAccessFrequencyId() != null) {
          return (-1);
        }
      }
      if (getOptionalPrevTenantId() != null) {
        Long lhsPrevTenantId = getOptionalPrevTenantId();
        if (rhs.getOptionalPrevTenantId() != null) {
          Long rhsPrevTenantId = rhs.getOptionalPrevTenantId();
          int cmp = lhsPrevTenantId.compareTo(rhsPrevTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalPrevId() != null) {
        Long lhsPrevId = getOptionalPrevId();
        if (rhs.getOptionalPrevId() != null) {
          Long rhsPrevId = rhs.getOptionalPrevId();
          int cmp = lhsPrevId.compareTo(rhsPrevId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextTenantId() != null) {
        Long lhsNextTenantId = getOptionalNextTenantId();
        if (rhs.getOptionalNextTenantId() != null) {
          Long rhsNextTenantId = rhs.getOptionalNextTenantId();
          int cmp = lhsNextTenantId.compareTo(rhsNextTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextId() != null) {
        Long lhsNextId = getOptionalNextId();
        if (rhs.getOptionalNextId() != null) {
          Long rhsNextId = rhs.getOptionalNextId();
          int cmp = lhsNextId.compareTo(rhsNextId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextId() != null) {
          return (-1);
        }
      }
      if (getRequiredDefaultVisibility()) {
        if (!rhs.getRequiredDefaultVisibility()) {
          return (1);
        }
      } else {
        if (rhs.getRequiredDefaultVisibility()) {
          return (-1);
        }
      }
      if (getOptionalDbName() != null) {
        if (rhs.getOptionalDbName() != null) {
          int cmp = getOptionalDbName().compareTo(rhs.getOptionalDbName());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDbName() != null) {
          return (-1);
        }
      }
      if (getOptionalInitValue() != null) {
        Boolean lhsInitValue = getOptionalInitValue();
        if (rhs.getOptionalInitValue()) {
          Boolean rhsInitValue = rhs.getOptionalInitValue();
          if (lhsInitValue) {
            if (!rhsInitValue) {
              return (1);
            }
          } else {
            if (rhsInitValue) {
              return (-1);
            }
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalInitValue() != null) {
          return (-1);
        }
      }
      if (getOptionalDefaultValue() != null) {
        Boolean lhsDefaultValue = getOptionalDefaultValue();
        if (rhs.getOptionalDefaultValue()) {
          Boolean rhsDefaultValue = rhs.getOptionalDefaultValue();
          if (lhsDefaultValue) {
            if (!rhsDefaultValue) {
              return (1);
            }
          } else {
            if (rhsDefaultValue) {
              return (-1);
            }
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefaultValue() != null) {
          return (-1);
        }
      }
      if (getOptionalFalseString() != null) {
        if (rhs.getOptionalFalseString() != null) {
          int cmp = getOptionalFalseString().compareTo(rhs.getOptionalFalseString());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalFalseString() != null) {
          return (-1);
        }
      }
      if (getOptionalTrueString() != null) {
        if (rhs.getOptionalTrueString() != null) {
          int cmp = getOptionalTrueString().compareTo(rhs.getOptionalTrueString());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalTrueString() != null) {
          return (-1);
        }
      }
      if (getOptionalNullString() != null) {
        if (rhs.getOptionalNullString() != null) {
          int cmp = getOptionalNullString().compareTo(rhs.getOptionalNullString());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNullString() != null) {
          return (-1);
        }
      }
      if (getRequiredSchemaDefId() < rhs.getRequiredSchemaDefId()) {
        return (-1);
      } else if (getRequiredSchemaDefId() > rhs.getRequiredSchemaDefId()) {
        return (1);
      }
      return (0);
    } else {
      return (super.compareTo(obj));
    }
  }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamPopSubDep3Buff) {
      CFBamPopSubDep3Buff rhs = (CFBamPopSubDep3Buff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFBamPopSubDep3ByContPopDep2IdxKey) {
      CFBamPopSubDep3ByContPopDep2IdxKey rhs = (CFBamPopSubDep3ByContPopDep2IdxKey) obj;

      if (getRequiredContTenantId() < rhs.getRequiredContTenantId()) {
        return (-1);
      } else if (getRequiredContTenantId() > rhs.getRequiredContTenantId()) {
        return (1);
      }
      if (getRequiredContPopDep2Id() < rhs.getRequiredContPopDep2Id()) {
        return (-1);
      } else if (getRequiredContPopDep2Id() > rhs.getRequiredContPopDep2Id()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamPopSubDep3ByUNameIdxKey) {
      CFBamPopSubDep3ByUNameIdxKey rhs = (CFBamPopSubDep3ByUNameIdxKey) obj;

      if (getRequiredContTenantId() < rhs.getRequiredContTenantId()) {
        return (-1);
      } else if (getRequiredContTenantId() > rhs.getRequiredContTenantId()) {
        return (1);
      }
      if (getRequiredContPopDep2Id() < rhs.getRequiredContPopDep2Id()) {
        return (-1);
      } else if (getRequiredContPopDep2Id() > rhs.getRequiredContPopDep2Id()) {
        return (1);
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamPopSubDep3HBuff) {
      CFBamPopSubDep3HBuff rhs = (CFBamPopSubDep3HBuff) obj;

      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      {
        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);
      }
      if (getOptionalDefSchemaTenantId() != null) {
        Long lhsDefSchemaTenantId = getOptionalDefSchemaTenantId();
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          Long rhsDefSchemaTenantId = rhs.getOptionalDefSchemaTenantId();
          int cmp = lhsDefSchemaTenantId.compareTo(rhsDefSchemaTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalDefSchemaId() != null) {
        Long lhsDefSchemaId = getOptionalDefSchemaId();
        if (rhs.getOptionalDefSchemaId() != null) {
          Long rhsDefSchemaId = rhs.getOptionalDefSchemaId();
          int cmp = lhsDefSchemaId.compareTo(rhsDefSchemaId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaId() != null) {
          return (-1);
        }
      }
      if (getRequiredRelationTenantId() < rhs.getRequiredRelationTenantId()) {
        return (-1);
      } else if (getRequiredRelationTenantId() > rhs.getRequiredRelationTenantId()) {
        return (1);
      }
      if (getRequiredRelationId() < rhs.getRequiredRelationId()) {
        return (-1);
      } else if (getRequiredRelationId() > rhs.getRequiredRelationId()) {
        return (1);
      }
      if (getRequiredContTenantId() < rhs.getRequiredContTenantId()) {
        return (-1);
      } else if (getRequiredContTenantId() > rhs.getRequiredContTenantId()) {
        return (1);
      }
      if (getRequiredContPopDep2Id() < rhs.getRequiredContPopDep2Id()) {
        return (-1);
      } else if (getRequiredContPopDep2Id() > rhs.getRequiredContPopDep2Id()) {
        return (1);
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else {
      return (super.compareTo(obj));
    }
  }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFBamSecurityScopeHBuff) {
     CFBamSecurityScopeHBuff rhs = (CFBamSecurityScopeHBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamSecurityScopeBuff) {
     CFBamSecurityScopeBuff rhs = (CFBamSecurityScopeBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamSecurityScopeByUNameIdxKey) {
     CFBamSecurityScopeByUNameIdxKey rhs = (CFBamSecurityScopeByUNameIdxKey) obj;
     if (!getRequiredName().equals(rhs.getRequiredName())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamSecurityScopeHPKey) {
     CFBamSecurityScopeHPKey rhs = (CFBamSecurityScopeHPKey) 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 (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 CFBamSecurityScopePKey) {
     CFBamSecurityScopePKey rhs = (CFBamSecurityScopePKey) obj;
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else {
     return (super.equals(obj));
   }
 }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFDbTestInt64DefBuff) {
      CFDbTestInt64DefBuff rhs = (CFDbTestInt64DefBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFDbTestInt64DefHBuff) {
      CFDbTestInt64DefHBuff rhs = (CFDbTestInt64DefHBuff) obj;

      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      {
        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 (getRequiredScopeId() < rhs.getRequiredScopeId()) {
        return (-1);
      } else if (getRequiredScopeId() > rhs.getRequiredScopeId()) {
        return (1);
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getRequiredDefaultVisibility()) {
        if (!rhs.getRequiredDefaultVisibility()) {
          return (1);
        }
      } else {
        if (rhs.getRequiredDefaultVisibility()) {
          return (-1);
        }
      }
      if (getOptionalPrevTenantId() != null) {
        Long lhsPrevTenantId = getOptionalPrevTenantId();
        if (rhs.getOptionalPrevTenantId() != null) {
          Long rhsPrevTenantId = rhs.getOptionalPrevTenantId();
          int cmp = lhsPrevTenantId.compareTo(rhsPrevTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalPrevId() != null) {
        Long lhsPrevId = getOptionalPrevId();
        if (rhs.getOptionalPrevId() != null) {
          Long rhsPrevId = rhs.getOptionalPrevId();
          int cmp = lhsPrevId.compareTo(rhsPrevId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextTenantId() != null) {
        Long lhsNextTenantId = getOptionalNextTenantId();
        if (rhs.getOptionalNextTenantId() != null) {
          Long rhsNextTenantId = rhs.getOptionalNextTenantId();
          int cmp = lhsNextTenantId.compareTo(rhsNextTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextId() != null) {
        Long lhsNextId = getOptionalNextId();
        if (rhs.getOptionalNextId() != null) {
          Long rhsNextId = rhs.getOptionalNextId();
          int cmp = lhsNextId.compareTo(rhsNextId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextId() != null) {
          return (-1);
        }
      }
      return (0);
    } else {
      return (super.compareTo(obj));
    }
  }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamSecurityScopeBuff) {
      CFBamSecurityScopeBuff rhs = (CFBamSecurityScopeBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFBamSecurityScopeByUNameIdxKey) {
      CFBamSecurityScopeByUNameIdxKey rhs = (CFBamSecurityScopeByUNameIdxKey) obj;

      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamSecurityScopeHBuff) {
      CFBamSecurityScopeHBuff rhs = (CFBamSecurityScopeHBuff) 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 (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamSecurityScopeHPKey) {
      CFBamSecurityScopeHPKey rhs = (CFBamSecurityScopeHPKey) 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 (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamSecurityScopePKey) {
      CFBamSecurityScopePKey rhs = (CFBamSecurityScopePKey) obj;
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamHPKey) {
      CFBamHPKey rhs = (CFBamHPKey) 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 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 void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFFreeSwitchXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      // Request Attributes
      String attrSecSessionId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstLogOut");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

      ICFFreeSwitchSchemaObj 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("SecSessionId")) {
          if (attrSecSessionId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecSessionId = 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 ((attrSecSessionId == null) || (attrSecSessionId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SecSessionId");
      }

      UUID secSessionId = UUID.fromString(attrSecSessionId);
      if (secSessionId == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "converted-secSessionId");
      }
      if (schemaObj.getAuthorization() == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newRuntimeException(getClass(), S_ProcName, "Already disconnected from the database");
      }
      ICFSecuritySecSessionObj secSession = schemaObj.getSecSession();
      if (secSession == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newRuntimeException(
                getClass(), S_ProcName, "Security session does not exist for this schema");
      }
      if (!secSessionId.equals(secSession.getRequiredSecSessionId())) {
        throw CFLib.getDefaultExceptionFactory()
            .newRuntimeException(
                getClass(),
                S_ProcName,
                "Security session id does not match the one established by this schema");
      }
      if (secSession.getOptionalFinish() == null) {
        schemaObj.rollback();
        schemaObj.beginTransaction();
        ICFSecuritySecSessionEditObj editSecSession = secSession.beginEdit();
        editSecSession.setOptionalFinish(Calendar.getInstance());
        editSecSession.update();
        editSecSession.endEdit();
        schemaObj.commit();
      }
      schemaObj.disconnect(false);
      schemaObj.setAuthorization(null);
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFFreeSwitchXMsgSchemaMessageFormatter.formatRspnLoggedOut("\n\t\t\t", secSessionId)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      ((CFFreeSwitchXMsgRqstHandler) getParser()).appendResponse(response);
    } catch (RuntimeException e) {
      CFFreeSwitchXMsgRqstHandler xmsgRqstHandler = ((CFFreeSwitchXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFFreeSwitchXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFFreeSwitchXMsgRqstHandler xmsgRqstHandler = ((CFFreeSwitchXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFFreeSwitchXMsgSchemaMessageFormatter.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 CFBamBlobColBuff) {
      CFBamBlobColBuff rhs = (CFBamBlobColBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFBamBlobColByTableIdxKey) {
      CFBamBlobColByTableIdxKey rhs = (CFBamBlobColByTableIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredTableId() < rhs.getRequiredTableId()) {
        return (-1);
      } else if (getRequiredTableId() > rhs.getRequiredTableId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamBlobColHBuff) {
      CFBamBlobColHBuff rhs = (CFBamBlobColHBuff) obj;

      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      {
        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 (getRequiredScopeId() < rhs.getRequiredScopeId()) {
        return (-1);
      } else if (getRequiredScopeId() > rhs.getRequiredScopeId()) {
        return (1);
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      if (getOptionalDefSchemaTenantId() != null) {
        Long lhsDefSchemaTenantId = getOptionalDefSchemaTenantId();
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          Long rhsDefSchemaTenantId = rhs.getOptionalDefSchemaTenantId();
          int cmp = lhsDefSchemaTenantId.compareTo(rhsDefSchemaTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalDefSchemaId() != null) {
        Long lhsDefSchemaId = getOptionalDefSchemaId();
        if (rhs.getOptionalDefSchemaId() != null) {
          Long rhsDefSchemaId = rhs.getOptionalDefSchemaId();
          int cmp = lhsDefSchemaId.compareTo(rhsDefSchemaId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefSchemaId() != null) {
          return (-1);
        }
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getOptionalShortName() != null) {
        if (rhs.getOptionalShortName() != null) {
          int cmp = getOptionalShortName().compareTo(rhs.getOptionalShortName());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalShortName() != null) {
          return (-1);
        }
      }
      if (getOptionalLabel() != null) {
        if (rhs.getOptionalLabel() != null) {
          int cmp = getOptionalLabel().compareTo(rhs.getOptionalLabel());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalLabel() != null) {
          return (-1);
        }
      }
      if (getOptionalShortDescription() != null) {
        if (rhs.getOptionalShortDescription() != null) {
          int cmp = getOptionalShortDescription().compareTo(rhs.getOptionalShortDescription());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalShortDescription() != null) {
          return (-1);
        }
      }
      if (getOptionalDescription() != null) {
        if (rhs.getOptionalDescription() != null) {
          int cmp = getOptionalDescription().compareTo(rhs.getOptionalDescription());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDescription() != null) {
          return (-1);
        }
      }
      if (getRequiredIsNullable()) {
        if (!rhs.getRequiredIsNullable()) {
          return (1);
        }
      } else {
        if (rhs.getRequiredIsNullable()) {
          return (-1);
        }
      }
      if (getOptionalGenerateId() != null) {
        Boolean lhsGenerateId = getOptionalGenerateId();
        if (rhs.getOptionalGenerateId()) {
          Boolean rhsGenerateId = rhs.getOptionalGenerateId();
          if (lhsGenerateId) {
            if (!rhsGenerateId) {
              return (1);
            }
          } else {
            if (rhsGenerateId) {
              return (-1);
            }
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalGenerateId() != null) {
          return (-1);
        }
      }
      if (getOptionalDataScopeId() != null) {
        Short lhsDataScopeId = getOptionalDataScopeId();
        if (rhs.getOptionalDataScopeId() != null) {
          Short rhsDataScopeId = rhs.getOptionalDataScopeId();
          int cmp = lhsDataScopeId.compareTo(rhsDataScopeId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDataScopeId() != null) {
          return (-1);
        }
      }
      if (getOptionalViewAccessSecurityId() != null) {
        Short lhsViewAccessSecurityId = getOptionalViewAccessSecurityId();
        if (rhs.getOptionalViewAccessSecurityId() != null) {
          Short rhsViewAccessSecurityId = rhs.getOptionalViewAccessSecurityId();
          int cmp = lhsViewAccessSecurityId.compareTo(rhsViewAccessSecurityId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalViewAccessSecurityId() != null) {
          return (-1);
        }
      }
      if (getOptionalEditAccessSecurityId() != null) {
        Short lhsEditAccessSecurityId = getOptionalEditAccessSecurityId();
        if (rhs.getOptionalEditAccessSecurityId() != null) {
          Short rhsEditAccessSecurityId = rhs.getOptionalEditAccessSecurityId();
          int cmp = lhsEditAccessSecurityId.compareTo(rhsEditAccessSecurityId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalEditAccessSecurityId() != null) {
          return (-1);
        }
      }
      if (getOptionalViewAccessFrequencyId() != null) {
        Short lhsViewAccessFrequencyId = getOptionalViewAccessFrequencyId();
        if (rhs.getOptionalViewAccessFrequencyId() != null) {
          Short rhsViewAccessFrequencyId = rhs.getOptionalViewAccessFrequencyId();
          int cmp = lhsViewAccessFrequencyId.compareTo(rhsViewAccessFrequencyId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalViewAccessFrequencyId() != null) {
          return (-1);
        }
      }
      if (getOptionalEditAccessFrequencyId() != null) {
        Short lhsEditAccessFrequencyId = getOptionalEditAccessFrequencyId();
        if (rhs.getOptionalEditAccessFrequencyId() != null) {
          Short rhsEditAccessFrequencyId = rhs.getOptionalEditAccessFrequencyId();
          int cmp = lhsEditAccessFrequencyId.compareTo(rhsEditAccessFrequencyId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalEditAccessFrequencyId() != null) {
          return (-1);
        }
      }
      if (getOptionalPrevTenantId() != null) {
        Long lhsPrevTenantId = getOptionalPrevTenantId();
        if (rhs.getOptionalPrevTenantId() != null) {
          Long rhsPrevTenantId = rhs.getOptionalPrevTenantId();
          int cmp = lhsPrevTenantId.compareTo(rhsPrevTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalPrevId() != null) {
        Long lhsPrevId = getOptionalPrevId();
        if (rhs.getOptionalPrevId() != null) {
          Long rhsPrevId = rhs.getOptionalPrevId();
          int cmp = lhsPrevId.compareTo(rhsPrevId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalPrevId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextTenantId() != null) {
        Long lhsNextTenantId = getOptionalNextTenantId();
        if (rhs.getOptionalNextTenantId() != null) {
          Long rhsNextTenantId = rhs.getOptionalNextTenantId();
          int cmp = lhsNextTenantId.compareTo(rhsNextTenantId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextTenantId() != null) {
          return (-1);
        }
      }
      if (getOptionalNextId() != null) {
        Long lhsNextId = getOptionalNextId();
        if (rhs.getOptionalNextId() != null) {
          Long rhsNextId = rhs.getOptionalNextId();
          int cmp = lhsNextId.compareTo(rhsNextId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNextId() != null) {
          return (-1);
        }
      }
      if (getRequiredDefaultVisibility()) {
        if (!rhs.getRequiredDefaultVisibility()) {
          return (1);
        }
      } else {
        if (rhs.getRequiredDefaultVisibility()) {
          return (-1);
        }
      }
      if (getOptionalDbName() != null) {
        if (rhs.getOptionalDbName() != null) {
          int cmp = getOptionalDbName().compareTo(rhs.getOptionalDbName());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDbName() != null) {
          return (-1);
        }
      }
      if (getRequiredMaxLen() < rhs.getRequiredMaxLen()) {
        return (-1);
      } else if (getRequiredMaxLen() > rhs.getRequiredMaxLen()) {
        return (1);
      }
      if (getOptionalInitValue() != null) {
        if (rhs.getOptionalInitValue() != null) {
          byte[] larr = getOptionalInitValue();
          byte[] rarr = rhs.getOptionalInitValue();
          int llen = larr.length;
          int rlen = rarr.length;
          int idx = 0;
          byte lval;
          byte rval;
          while ((idx < llen) && (idx < rlen)) {
            lval = larr[idx];
            rval = rarr[idx];
            if (lval < rval) {
              return (-1);
            } else if (lval > rval) {
              return (1);
            }
            idx++;
          }
          if (llen < rlen) {
            return (-1);
          } else if (llen > rlen) {
            return (1);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalInitValue() != null) {
          return (-1);
        }
      }
      if (getOptionalDefaultValue() != null) {
        if (rhs.getOptionalDefaultValue() != null) {
          byte[] larr = getOptionalDefaultValue();
          byte[] rarr = rhs.getOptionalDefaultValue();
          int llen = larr.length;
          int rlen = rarr.length;
          int idx = 0;
          byte lval;
          byte rval;
          while ((idx < llen) && (idx < rlen)) {
            lval = larr[idx];
            rval = rarr[idx];
            if (lval < rval) {
              return (-1);
            } else if (lval > rval) {
              return (1);
            }
            idx++;
          }
          if (llen < rlen) {
            return (-1);
          } else if (llen > rlen) {
            return (1);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalDefaultValue() != null) {
          return (-1);
        }
      }
      if (getOptionalNullValue() != null) {
        if (rhs.getOptionalNullValue() != null) {
          byte[] larr = getOptionalNullValue();
          byte[] rarr = rhs.getOptionalNullValue();
          int llen = larr.length;
          int rlen = rarr.length;
          int idx = 0;
          byte lval;
          byte rval;
          while ((idx < llen) && (idx < rlen)) {
            lval = larr[idx];
            rval = rarr[idx];
            if (lval < rval) {
              return (-1);
            } else if (lval > rval) {
              return (1);
            }
            idx++;
          }
          if (llen < rlen) {
            return (-1);
          } else if (llen > rlen) {
            return (1);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalNullValue() != null) {
          return (-1);
        }
      }
      if (getOptionalUnknownValue() != null) {
        if (rhs.getOptionalUnknownValue() != null) {
          byte[] larr = getOptionalUnknownValue();
          byte[] rarr = rhs.getOptionalUnknownValue();
          int llen = larr.length;
          int rlen = rarr.length;
          int idx = 0;
          byte lval;
          byte rval;
          while ((idx < llen) && (idx < rlen)) {
            lval = larr[idx];
            rval = rarr[idx];
            if (lval < rval) {
              return (-1);
            } else if (lval > rval) {
              return (1);
            }
            idx++;
          }
          if (llen < rlen) {
            return (-1);
          } else if (llen > rlen) {
            return (1);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalUnknownValue() != null) {
          return (-1);
        }
      }
      if (getRequiredTableId() < rhs.getRequiredTableId()) {
        return (-1);
      } else if (getRequiredTableId() > rhs.getRequiredTableId()) {
        return (1);
      }
      return (0);
    } else {
      return (super.compareTo(obj));
    }
  }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFFreeSwitchFSSFDialerHPKey) {
     CFFreeSwitchFSSFDialerHPKey rhs = (CFFreeSwitchFSSFDialerHPKey) 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 (getRequiredFSSFDialerId() != rhs.getRequiredFSSFDialerId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchHPKey) {
     CFFreeSwitchHPKey rhs = (CFFreeSwitchHPKey) 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 CFFreeSwitchFSSFDialerPKey) {
     CFFreeSwitchFSSFDialerPKey rhs = (CFFreeSwitchFSSFDialerPKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredFSSFDialerId() != rhs.getRequiredFSSFDialerId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchFSSFDialerHBuff) {
     CFFreeSwitchFSSFDialerHBuff rhs = (CFFreeSwitchFSSFDialerHBuff) 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 (getRequiredFSSFDialerId() != rhs.getRequiredFSSFDialerId()) {
       return (false);
     }
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredFSSFDialerId() != rhs.getRequiredFSSFDialerId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFFreeSwitchFSSFDialerBuff) {
     CFFreeSwitchFSSFDialerBuff rhs = (CFFreeSwitchFSSFDialerBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredFSSFDialerId() != rhs.getRequiredFSSFDialerId()) {
       return (false);
     }
     return (true);
   } else {
     return (false);
   }
 }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFFreeSwitchFSSFDirectoryBuff) {
      CFFreeSwitchFSSFDirectoryBuff rhs = (CFFreeSwitchFSSFDirectoryBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFFreeSwitchFSSFDirectoryByTenantIdxKey) {
      CFFreeSwitchFSSFDirectoryByTenantIdxKey rhs = (CFFreeSwitchFSSFDirectoryByTenantIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFFreeSwitchFSSFDirectoryBySofiaIdxKey) {
      CFFreeSwitchFSSFDirectoryBySofiaIdxKey rhs = (CFFreeSwitchFSSFDirectoryBySofiaIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredFSSofiaId() < rhs.getRequiredFSSofiaId()) {
        return (-1);
      } else if (getRequiredFSSofiaId() > rhs.getRequiredFSSofiaId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFFreeSwitchFSSFDirectoryByUNameIdxKey) {
      CFFreeSwitchFSSFDirectoryByUNameIdxKey rhs = (CFFreeSwitchFSSFDirectoryByUNameIdxKey) obj;

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredFSSofiaId() < rhs.getRequiredFSSofiaId()) {
        return (-1);
      } else if (getRequiredFSSofiaId() > rhs.getRequiredFSSofiaId()) {
        return (1);
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFFreeSwitchFSSFDirectoryHBuff) {
      CFFreeSwitchFSSFDirectoryHBuff rhs = (CFFreeSwitchFSSFDirectoryHBuff) 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 (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredFSSFDirectoryId() < rhs.getRequiredFSSFDirectoryId()) {
        return (-1);
      } else if (getRequiredFSSFDirectoryId() > rhs.getRequiredFSSFDirectoryId()) {
        return (1);
      }
      if (getRequiredFSSofiaId() < rhs.getRequiredFSSofiaId()) {
        return (-1);
      } else if (getRequiredFSSofiaId() > rhs.getRequiredFSSofiaId()) {
        return (1);
      }
      {
        int cmp = getRequiredName().compareTo(rhs.getRequiredName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredDialString().compareTo(rhs.getRequiredDialString());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getRequiredRecordStereo()) {
        if (!rhs.getRequiredRecordStereo()) {
          return (1);
        }
      } else {
        if (rhs.getRequiredRecordStereo()) {
          return (-1);
        }
      }
      {
        int cmp = getRequiredDefaultGateway().compareTo(rhs.getRequiredDefaultGateway());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredDefaultAreacode().compareTo(rhs.getRequiredDefaultAreacode());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp =
            getRequiredTransferFallbackExtension()
                .compareTo(rhs.getRequiredTransferFallbackExtension());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFFreeSwitchFSSFDirectoryHPKey) {
      CFFreeSwitchFSSFDirectoryHPKey rhs = (CFFreeSwitchFSSFDirectoryHPKey) 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 (getRequiredFSSFDirectoryId() < rhs.getRequiredFSSFDirectoryId()) {
        return (-1);
      } else if (getRequiredFSSFDirectoryId() > rhs.getRequiredFSSFDirectoryId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFFreeSwitchFSSFDirectoryPKey) {
      CFFreeSwitchFSSFDirectoryPKey rhs = (CFFreeSwitchFSSFDirectoryPKey) obj;
      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredFSSFDirectoryId() < rhs.getRequiredFSSFDirectoryId()) {
        return (-1);
      } else if (getRequiredFSSFDirectoryId() > rhs.getRequiredFSSFDirectoryId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFFreeSwitchHPKey) {
      CFFreeSwitchHPKey rhs = (CFFreeSwitchHPKey) 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));
    }
  }