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