public int compareTo(Object obj) {
   if (obj == null) {
     return (1);
   } else if (obj instanceof CFBamPopDepByRelationIdxKey) {
     CFBamPopDepByRelationIdxKey rhs = (CFBamPopDepByRelationIdxKey) obj;
     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);
     }
     return (0);
   } else if (obj instanceof CFBamPopDepBuff) {
     CFBamPopDepBuff rhs = (CFBamPopDepBuff) obj;
     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);
     }
     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 CFBamPopDepByRelationIdxKey) {
     CFBamPopDepByRelationIdxKey rhs = (CFBamPopDepByRelationIdxKey) obj;
     if (getRequiredRelationTenantId() != rhs.getRequiredRelationTenantId()) {
       return (false);
     }
     if (getRequiredRelationId() != rhs.getRequiredRelationId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamPopDepBuff) {
     CFBamPopDepBuff rhs = (CFBamPopDepBuff) obj;
     if (getRequiredRelationTenantId() != rhs.getRequiredRelationTenantId()) {
       return (false);
     }
     if (getRequiredRelationId() != rhs.getRequiredRelationId()) {
       return (false);
     }
     return (true);
   } else {
     return (false);
   }
 }
 public void setPopSubDep1Buff(CFBamPopSubDep1HBuff src) {
   super.setPopDepBuff(src);
   setRequiredContTenantId(src.getRequiredContTenantId());
   setRequiredContPopTopDepId(src.getRequiredContPopTopDepId());
   setRequiredName(src.getRequiredName());
 }