public int compareTo(Object obj) {
   if (obj == null) {
     return (1);
   } else if (obj instanceof CFBamTSecGroupIncludeByIncludeIdxKey) {
     CFBamTSecGroupIncludeByIncludeIdxKey rhs = (CFBamTSecGroupIncludeByIncludeIdxKey) obj;
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredIncludeGroupId() < rhs.getRequiredIncludeGroupId()) {
       return (-1);
     } else if (getRequiredIncludeGroupId() > rhs.getRequiredIncludeGroupId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamTSecGroupIncludeBuff) {
     CFBamTSecGroupIncludeBuff rhs = (CFBamTSecGroupIncludeBuff) obj;
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredIncludeGroupId() < rhs.getRequiredIncludeGroupId()) {
       return (-1);
     } else if (getRequiredIncludeGroupId() > rhs.getRequiredIncludeGroupId()) {
       return (1);
     }
     return (0);
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
   }
 }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFBamTSecGroupIncludeByIncludeIdxKey) {
     CFBamTSecGroupIncludeByIncludeIdxKey rhs = (CFBamTSecGroupIncludeByIncludeIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredIncludeGroupId() != rhs.getRequiredIncludeGroupId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamTSecGroupIncludeBuff) {
     CFBamTSecGroupIncludeBuff rhs = (CFBamTSecGroupIncludeBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredIncludeGroupId() != rhs.getRequiredIncludeGroupId()) {
       return (false);
     }
     return (true);
   } else {
     return (false);
   }
 }