public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFBamSchemaDefByEAccSecIdxKey) {
     CFBamSchemaDefByEAccSecIdxKey rhs = (CFBamSchemaDefByEAccSecIdxKey) obj;
     if (getOptionalEditAccessSecurityId() != null) {
       if (rhs.getOptionalEditAccessSecurityId() != null) {
         if (!getOptionalEditAccessSecurityId().equals(rhs.getOptionalEditAccessSecurityId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalEditAccessSecurityId() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFBamSchemaDefBuff) {
     CFBamSchemaDefBuff rhs = (CFBamSchemaDefBuff) obj;
     if (getOptionalEditAccessSecurityId() != null) {
       if (rhs.getOptionalEditAccessSecurityId() != null) {
         if (!getOptionalEditAccessSecurityId().equals(rhs.getOptionalEditAccessSecurityId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalEditAccessSecurityId() != null) {
         return (false);
       }
     }
     return (true);
   } else {
     return (false);
   }
 }
 public int compareTo(Object obj) {
   if (obj == null) {
     return (1);
   } else if (obj instanceof CFBamSchemaDefByEAccSecIdxKey) {
     CFBamSchemaDefByEAccSecIdxKey rhs = (CFBamSchemaDefByEAccSecIdxKey) obj;
     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);
       }
     }
     return (0);
   } else if (obj instanceof CFBamSchemaDefBuff) {
     CFBamSchemaDefBuff rhs = (CFBamSchemaDefBuff) obj;
     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);
       }
     }
     return (0);
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
   }
 }