Ejemplo n.º 1
1
 private String getDate(String timeStampStr, String format) {
   DateFormat formatter = new SimpleDateFormat(format);
   long timeStamp = Long.parseLong(timeStampStr);
   Calendar calendar = Calendar.getInstance();
   calendar.setTimeInMillis(timeStamp);
   return formatter.format(calendar.getTime());
 }
Ejemplo n.º 2
1
  private String getTime() {
    Calendar calendar = new GregorianCalendar();
    String time = (calendar.get(Calendar.MONTH) + 1) + "";
    time += "-" + calendar.get(Calendar.DAY_OF_MONTH);
    time += "-" + calendar.get(Calendar.YEAR);
    time += "-" + calendar.get(Calendar.HOUR_OF_DAY) + ":";
    if (calendar.get(Calendar.MINUTE) < 10) time += "0";
    time += calendar.get(Calendar.MINUTE) + ":";
    if (calendar.get(Calendar.MINUTE) < 10) time += "0";
    time += calendar.get(Calendar.SECOND);
    time += ":" + calendar.get(Calendar.MILLISECOND);

    return time;
  }
Ejemplo n.º 3
1
 public ReturnTuple<Integer> newCustomer(int id, Timestamp timestamp)
     throws RemoteException, TransactionAbortedException, InvalidTransactionException {
   if (!isMaster) {
     System.out.println("Slave retransmitting newCustomer to master");
     return this.getMaster().newCustomer(id, timestamp);
   } else {
     timestamp.stamp();
     int rid =
         Integer.parseInt(
             String.valueOf(id)
                 + String.valueOf(Calendar.getInstance().get(Calendar.MILLISECOND))
                 + String.valueOf(Math.round(Math.random() * 100 + 1)));
     NewCustomerWithIdRMICommand nc =
         new NewCustomerWithIdRMICommand(carGroup, flightGroup, roomGroup, id, rid);
     nc.setTimestampObject(timestamp);
     ReturnTuple<Integer> result = null;
     try {
       overseer.validTransaction(id);
       lm.Lock(id, Customer.getKey(rid), nc.getRequiredLock());
       nc.execute();
       result = new ReturnTuple<Integer>(rid, nc.success.timestamp);
       overseer.addCommandToTransaction(id, nc);
     } catch (DeadlockException d) {
       timestamp.stamp();
       overseer.abort(id);
       timestamp.stamp();
       throw new TransactionAbortedException(timestamp);
     } catch (TransactionAbortedException tae) {
       tae.t = timestamp;
       throw tae;
     } catch (InvalidTransactionException ite) {
       ite.t = timestamp;
       throw ite;
     }
     result.timestamp.stamp();
     return result;
   }
 }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamVersionBuff) {
      CFBamVersionBuff rhs = (CFBamVersionBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFBamVersionHBuff) {
      CFBamVersionHBuff rhs = (CFBamVersionHBuff) 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 (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);
        }
      }
      return (0);
    } else {
      return (super.compareTo(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 CFSecuritySysClusterHBuff) {
     CFSecuritySysClusterHBuff rhs = (CFSecuritySysClusterHBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredSingletonId() != rhs.getRequiredSingletonId()) {
       return (false);
     }
     if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecuritySysClusterBuff) {
     CFSecuritySysClusterBuff rhs = (CFSecuritySysClusterBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredSingletonId() != rhs.getRequiredSingletonId()) {
       return (false);
     }
     if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecuritySysClusterByClusterIdxKey) {
     CFSecuritySysClusterByClusterIdxKey rhs = (CFSecuritySysClusterByClusterIdxKey) obj;
     if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecuritySysClusterHPKey) {
     CFSecuritySysClusterHPKey rhs = (CFSecuritySysClusterHPKey) 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 (getRequiredSingletonId() != rhs.getRequiredSingletonId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecurityHPKey) {
     CFSecurityHPKey rhs = (CFSecurityHPKey) 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 CFSecuritySysClusterPKey) {
     CFSecuritySysClusterPKey rhs = (CFSecuritySysClusterPKey) obj;
     if (getRequiredSingletonId() != rhs.getRequiredSingletonId()) {
       return (false);
     }
     return (true);
   } else {
     return (super.equals(obj));
   }
 }
  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFSecuritySysClusterBuff) {
      CFSecuritySysClusterBuff rhs = (CFSecuritySysClusterBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFSecuritySysClusterByClusterIdxKey) {
      CFSecuritySysClusterByClusterIdxKey rhs = (CFSecuritySysClusterByClusterIdxKey) obj;

      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecuritySysClusterHBuff) {
      CFSecuritySysClusterHBuff rhs = (CFSecuritySysClusterHBuff) 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 (getRequiredSingletonId() < rhs.getRequiredSingletonId()) {
        return (-1);
      } else if (getRequiredSingletonId() > rhs.getRequiredSingletonId()) {
        return (1);
      }
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecuritySysClusterHPKey) {
      CFSecuritySysClusterHPKey rhs = (CFSecuritySysClusterHPKey) 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 (getRequiredSingletonId() < rhs.getRequiredSingletonId()) {
        return (-1);
      } else if (getRequiredSingletonId() > rhs.getRequiredSingletonId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecuritySysClusterPKey) {
      CFSecuritySysClusterPKey rhs = (CFSecuritySysClusterPKey) obj;
      if (getRequiredSingletonId() < rhs.getRequiredSingletonId()) {
        return (-1);
      } else if (getRequiredSingletonId() > rhs.getRequiredSingletonId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityHPKey) {
      CFSecurityHPKey rhs = (CFSecurityHPKey) 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 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 CFBamISOLanguageHBuff) {
     CFBamISOLanguageHBuff rhs = (CFBamISOLanguageHBuff) 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 (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamISOLanguageHPKey) {
     CFBamISOLanguageHPKey rhs = (CFBamISOLanguageHPKey) 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 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 CFBamISOLanguagePKey) {
     CFBamISOLanguagePKey rhs = (CFBamISOLanguagePKey) obj;
     if (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFBamISOLanguageBuff) {
     CFBamISOLanguageBuff rhs = (CFBamISOLanguageBuff) obj;
     if (getRequiredId() < rhs.getRequiredId()) {
       return (-1);
     } else if (getRequiredId() > rhs.getRequiredId()) {
       return (1);
     }
     return (0);
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(
             getClass(),
             "compareTo",
             "obj",
             obj,
             "CFBamISOLanguageHPKey, CFBamISOLanguagePKey, CFBamISOLanguageBuff");
   }
 }
public class CFBamClusterBuff implements Comparable<Object>, Serializable {
  public static final String CLASS_CODE = "CLUS";
  public static final String S_INIT_CREATEDBY = "654dbba0-eda7-11e1-aff1-0800200c9a66";
  public static final UUID INIT_CREATEDBY = UUID.fromString(S_INIT_CREATEDBY);
  public static final String S_INIT_UPDATEDBY = "654dbba0-eda7-11e1-aff1-0800200c9a66";
  public static final UUID INIT_UPDATEDBY = UUID.fromString(S_INIT_UPDATEDBY);
  public static final long ID_INIT_VALUE = 0L;
  public static final String FULLDOMAINNAME_INIT_VALUE = new String("");
  public static final String DESCRIPTION_INIT_VALUE = new String("");
  public static final long ID_MIN_VALUE = 0L;
  protected UUID createdByUserId = CFBamClusterBuff.INIT_CREATEDBY;
  protected Calendar createdAt = Calendar.getInstance();
  protected UUID updatedByUserId = CFBamClusterBuff.INIT_UPDATEDBY;
  protected Calendar updatedAt = Calendar.getInstance();
  protected long requiredId;
  protected String requiredFullDomainName;
  protected String requiredDescription;
  protected int requiredRevision;

  public CFBamClusterBuff() {
    requiredId = CFBamClusterBuff.ID_INIT_VALUE;
    requiredFullDomainName = new String(CFBamClusterBuff.FULLDOMAINNAME_INIT_VALUE);
    requiredDescription = new String(CFBamClusterBuff.DESCRIPTION_INIT_VALUE);
  }

  public String getClassCode() {
    return (CLASS_CODE);
  }

  public UUID getCreatedByUserId() {
    return (createdByUserId);
  }

  public void setCreatedByUserId(UUID value) {
    createdByUserId = value;
  }

  public Calendar getCreatedAt() {
    return (createdAt);
  }

  public void setCreatedAt(Calendar value) {
    createdAt = value;
  }

  public UUID getUpdatedByUserId() {
    return (updatedByUserId);
  }

  public void setUpdatedByUserId(UUID value) {
    updatedByUserId = value;
  }

  public Calendar getUpdatedAt() {
    return (updatedAt);
  }

  public void setUpdatedAt(Calendar value) {
    updatedAt = value;
  }

  public long getRequiredId() {
    return (requiredId);
  }

  public void setRequiredId(long value) {
    if (value < CFBamClusterBuff.ID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(), "setRequiredId", 1, "value", value, CFBamClusterBuff.ID_MIN_VALUE);
    }
    requiredId = value;
  }

  public String getRequiredFullDomainName() {
    return (requiredFullDomainName);
  }

  public void setRequiredFullDomainName(String value) {
    if (value == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "setRequiredFullDomainName", 1, "value");
    }
    if (value.length() > 192) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentOverflowException(
              getClass(), "setRequiredFullDomainName", 1, "value.length()", value.length(), 192);
    }
    requiredFullDomainName = value;
  }

  public String getRequiredDescription() {
    return (requiredDescription);
  }

  public void setRequiredDescription(String value) {
    if (value == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "setRequiredDescription", 1, "value");
    }
    if (value.length() > 128) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentOverflowException(
              getClass(), "setRequiredDescription", 1, "value.length()", value.length(), 128);
    }
    requiredDescription = value;
  }

  public int getRequiredRevision() {
    return (requiredRevision);
  }

  public void setRequiredRevision(int value) {
    requiredRevision = value;
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return (false);
    } else if (obj instanceof CFBamClusterBuff) {
      CFBamClusterBuff rhs = (CFBamClusterBuff) obj;
      if (!getCreatedByUserId().equals(rhs.getCreatedByUserId())) {
        return (false);
      }
      if (!getCreatedAt().equals(rhs.getCreatedAt())) {
        return (false);
      }
      if (!getUpdatedByUserId().equals(rhs.getUpdatedByUserId())) {
        return (false);
      }
      if (!getUpdatedAt().equals(rhs.getUpdatedAt())) {
        return (false);
      }
      if (getRequiredId() != rhs.getRequiredId()) {
        return (false);
      }
      if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
        return (false);
      }
      if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterPKey) {
      CFBamClusterPKey rhs = (CFBamClusterPKey) obj;
      if (getRequiredId() != rhs.getRequiredId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterHBuff) {
      CFBamClusterHBuff rhs = (CFBamClusterHBuff) obj;
      if (getRequiredId() != rhs.getRequiredId()) {
        return (false);
      }
      if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
        return (false);
      }
      if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterHPKey) {
      CFBamClusterHPKey rhs = (CFBamClusterHPKey) obj;
      if (getRequiredId() != rhs.getRequiredId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterByUDomainNameIdxKey) {
      CFBamClusterByUDomainNameIdxKey rhs = (CFBamClusterByUDomainNameIdxKey) obj;
      if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterByUDescrIdxKey) {
      CFBamClusterByUDescrIdxKey rhs = (CFBamClusterByUDescrIdxKey) obj;
      if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
        return (false);
      }
      return (true);
    } else {
      boolean retval = super.equals(obj);
      return (retval);
    }
  }

  public int hashCode() {
    int hashCode = 0;
    hashCode = hashCode + getCreatedByUserId().hashCode();
    hashCode = hashCode + getCreatedAt().hashCode();
    hashCode = hashCode + getUpdatedByUserId().hashCode();
    hashCode = hashCode + getUpdatedAt().hashCode();
    hashCode = hashCode + (int) (getRequiredId());
    if (getRequiredFullDomainName() != null) {
      hashCode = hashCode + getRequiredFullDomainName().hashCode();
    }
    if (getRequiredDescription() != null) {
      hashCode = hashCode + getRequiredDescription().hashCode();
    }
    return (hashCode & 0x7fffffff);
  }

  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamClusterBuff) {
      CFBamClusterBuff rhs = (CFBamClusterBuff) obj;
      int retval = 0;
      {
        int cmp = getCreatedByUserId().compareTo(rhs.getCreatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getCreatedAt().compareTo(rhs.getCreatedAt());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedByUserId().compareTo(rhs.getUpdatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedAt().compareTo(rhs.getUpdatedAt());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamClusterPKey) {
      CFBamClusterPKey rhs = (CFBamClusterPKey) obj;
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamClusterHPKey) {
      CFBamClusterHPKey rhs = (CFBamClusterHPKey) obj;
      {
        int lhsRequiredRevision = getRequiredRevision();
        int rhsRequiredRevision = rhs.getRequiredRevision();
        if (lhsRequiredRevision < rhsRequiredRevision) {
          return (-1);
        } else if (lhsRequiredRevision > rhsRequiredRevision) {
          return (1);
        }
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamClusterHBuff) {
      CFBamClusterHBuff rhs = (CFBamClusterHBuff) obj;
      int retval = 0;
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamClusterByUDomainNameIdxKey) {
      CFBamClusterByUDomainNameIdxKey rhs = (CFBamClusterByUDomainNameIdxKey) obj;

      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamClusterByUDescrIdxKey) {
      CFBamClusterByUDescrIdxKey rhs = (CFBamClusterByUDescrIdxKey) obj;

      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
    }
  }

  public void set(CFBamClusterBuff src) {
    setClusterBuff(src);
  }

  public void setClusterBuff(CFBamClusterBuff src) {
    setRequiredId(src.getRequiredId());
    setCreatedByUserId(src.getCreatedByUserId());
    setCreatedAt(src.getCreatedAt());
    setUpdatedByUserId(src.getUpdatedByUserId());
    setUpdatedAt(src.getUpdatedAt());
    setRequiredFullDomainName(src.getRequiredFullDomainName());
    setRequiredDescription(src.getRequiredDescription());
    setRequiredRevision(src.getRequiredRevision());
  }

  public void set(CFBamClusterHBuff src) {
    setClusterBuff(src);
  }

  public void setClusterBuff(CFBamClusterHBuff src) {
    setRequiredId(src.getRequiredId());
    setRequiredFullDomainName(src.getRequiredFullDomainName());
    setRequiredDescription(src.getRequiredDescription());
  }
}
 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 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 boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFCrmAddressHBuff) {
     CFCrmAddressHBuff rhs = (CFCrmAddressHBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredAddressId() != rhs.getRequiredAddressId()) {
       return (false);
     }
     if (getRequiredContactId() != rhs.getRequiredContactId()) {
       return (false);
     }
     if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
       return (false);
     }
     if (getOptionalAddrLine1() != null) {
       if (rhs.getOptionalAddrLine1() != null) {
         if (!getOptionalAddrLine1().equals(rhs.getOptionalAddrLine1())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalAddrLine1() != null) {
         return (false);
       }
     }
     if (getOptionalAddrLine2() != null) {
       if (rhs.getOptionalAddrLine2() != null) {
         if (!getOptionalAddrLine2().equals(rhs.getOptionalAddrLine2())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalAddrLine2() != null) {
         return (false);
       }
     }
     if (getOptionalCity() != null) {
       if (rhs.getOptionalCity() != null) {
         if (!getOptionalCity().equals(rhs.getOptionalCity())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalCity() != null) {
         return (false);
       }
     }
     if (getOptionalState() != null) {
       if (rhs.getOptionalState() != null) {
         if (!getOptionalState().equals(rhs.getOptionalState())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalState() != null) {
         return (false);
       }
     }
     if (getOptionalCountryId() != null) {
       if (rhs.getOptionalCountryId() != null) {
         if (!getOptionalCountryId().equals(rhs.getOptionalCountryId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalCountryId() != null) {
         return (false);
       }
     }
     if (getOptionalZip() != null) {
       if (rhs.getOptionalZip() != null) {
         if (!getOptionalZip().equals(rhs.getOptionalZip())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalZip() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFCrmAddressBuff) {
     CFCrmAddressBuff rhs = (CFCrmAddressBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredAddressId() != rhs.getRequiredAddressId()) {
       return (false);
     }
     if (getRequiredContactId() != rhs.getRequiredContactId()) {
       return (false);
     }
     if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
       return (false);
     }
     if (getOptionalAddrLine1() != null) {
       if (rhs.getOptionalAddrLine1() != null) {
         if (!getOptionalAddrLine1().equals(rhs.getOptionalAddrLine1())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalAddrLine1() != null) {
         return (false);
       }
     }
     if (getOptionalAddrLine2() != null) {
       if (rhs.getOptionalAddrLine2() != null) {
         if (!getOptionalAddrLine2().equals(rhs.getOptionalAddrLine2())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalAddrLine2() != null) {
         return (false);
       }
     }
     if (getOptionalCity() != null) {
       if (rhs.getOptionalCity() != null) {
         if (!getOptionalCity().equals(rhs.getOptionalCity())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalCity() != null) {
         return (false);
       }
     }
     if (getOptionalState() != null) {
       if (rhs.getOptionalState() != null) {
         if (!getOptionalState().equals(rhs.getOptionalState())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalState() != null) {
         return (false);
       }
     }
     if (getOptionalCountryId() != null) {
       if (rhs.getOptionalCountryId() != null) {
         if (!getOptionalCountryId().equals(rhs.getOptionalCountryId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalCountryId() != null) {
         return (false);
       }
     }
     if (getOptionalZip() != null) {
       if (rhs.getOptionalZip() != null) {
         if (!getOptionalZip().equals(rhs.getOptionalZip())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalZip() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFCrmAddressByTenantIdxKey) {
     CFCrmAddressByTenantIdxKey rhs = (CFCrmAddressByTenantIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFCrmAddressByContactIdxKey) {
     CFCrmAddressByContactIdxKey rhs = (CFCrmAddressByContactIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredContactId() != rhs.getRequiredContactId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFCrmAddressByUDescrIdxKey) {
     CFCrmAddressByUDescrIdxKey rhs = (CFCrmAddressByUDescrIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredContactId() != rhs.getRequiredContactId()) {
       return (false);
     }
     if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFCrmAddressByCountryIdxKey) {
     CFCrmAddressByCountryIdxKey rhs = (CFCrmAddressByCountryIdxKey) obj;
     if (getOptionalCountryId() != null) {
       if (rhs.getOptionalCountryId() != null) {
         if (!getOptionalCountryId().equals(rhs.getOptionalCountryId())) {
           return (false);
         }
       }
     } else {
       if (rhs.getOptionalCountryId() != null) {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFCrmAddressHPKey) {
     CFCrmAddressHPKey rhs = (CFCrmAddressHPKey) 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 (getRequiredAddressId() != rhs.getRequiredAddressId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFCrmHPKey) {
     CFCrmHPKey rhs = (CFCrmHPKey) 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 CFCrmAddressPKey) {
     CFCrmAddressPKey rhs = (CFCrmAddressPKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredAddressId() != rhs.getRequiredAddressId()) {
       return (false);
     }
     return (true);
   } else {
     return (super.equals(obj));
   }
 }
  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 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 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));
    }
  }
Ejemplo n.º 17
0
  /**
   * Creates the java help
   *
   * @param path the path where to create the java help
   * @param lang the spoken language
   */
  private void createJavaHelp(File path, String lang) {
    File pages = new File(path, "pages");
    if (pages.exists()) deleteDir(pages);
    pages.mkdir();

    File javahelpsearch = new File(path, SEARCH_DIR);
    if (javahelpsearch.exists()) deleteDir(javahelpsearch);

    File helpset_file = new File(path, HELPSET_NAME_BASE + lang + HELPSET_NAME_SUFFIX);
    File config_file = null;
    File map_file = null;
    File tam_file = null;

    String underscore = "";

    if (helpset_file.exists()) {
      // There is a helpset corresponding to the current language
      map_file = new File(path, MAP_NAME_BASE + lang + MAP_NAME_SUFFIX);
      tam_file = new File(path, TAM_NAME_BASE + lang + TAM_NAME_SUFFIX);
      underscore = "_" + lang;
    } else {
      // There is no helpset : we use the default one
      map_file = new File(path + "Map.jhm");
      tam_file = new File(path + "TAM.xml");
    }

    config_file = new File(path, CONFIG_FILE);

    if (config_file.exists()) config_file.delete();
    if (map_file.exists()) map_file.delete();
    if (tam_file.exists()) tam_file.delete();

    boolean test = true;

    try {
      // Generates the jhm and copy the file for objects
      // Generates the TAM.xml file
      test = test && map_file.createNewFile();
      test = test && tam_file.createNewFile();
      File lang_dir = new File(path, "Main_pages/" + lang);
      test = test && lang_dir.exists();
      if (test) {
        print = new PrintWriter(new BufferedWriter(new FileWriter(map_file)));
        // debut  + images
        print.println(
            "<?xml version='1.0' encoding='ISO-8859-1' ?>\n "
                + "<!DOCTYPE map\n"
                + "PUBLIC \"-//Sun Microsystems Inc.//DTD JavaHelp Map Version 1.0//EN\"\n"
                + "\"http://java.sun.com/products/javahelp/map_1_0.dtd\">\n"
                + "\n"
                + "<map version=\"1.0\">\n"
                + "<mapID target=\"image\" url=\"Main_pages/logo_cbs_petit.gif\" />\n"
                + "<mapID target=\"tamicon\" url=\"Main_pages/tam.gif\" />\n"
                + "<mapID target=\"fileicon\" url=\"Main_pages/file.gif\" />\n"
                + "<mapID target=\""
                + FIRST_PAGE
                + "\" url=\"pages/"
                + FIRST_PAGE
                + ".html\" />");

        print2 = new PrintWriter(new BufferedWriter(new FileWriter(tam_file)));
        print2.println(
            " <?xml version='1.0' encoding='ISO-8859-1'  ?> \n "
                + "<!DOCTYPE toc \n"
                + "PUBLIC \"-//Sun Microsystems Inc.//DTD JavaHelp TOC Version 2.0//EN\"\n"
                + "\"../dtd/toc_2_0.dtd\">\n"
                + "<toc version=\"2.0\"> \n<tocitem text=\""
                + getTitle(new File(path, "Main_pages/" + lang + "/" + FIRST_PAGE + ".html"))
                + "\" target=\""
                + FIRST_PAGE
                + "\" image=\"image\">");
        copyFile(
            new File(path, "Main_pages/" + lang + "/" + FIRST_PAGE + ".html"),
            new File(path, "pages/" + FIRST_PAGE + ".html"));

        // generation of the tree
        File[] list_lang_dir = lang_dir.listFiles();
        for (int a = 0; a < list_lang_dir.length; a++) {
          if (!list_lang_dir[a].getName().equals("CVS")
              && list_lang_dir[a].isFile()
              && !list_lang_dir[a].getName().equals(FIRST_PAGE + ".html")) {
            mapAndTocForFile(list_lang_dir[a], path, underscore);
          }
        }

        // Ends
        print.println("</map>");
        print.close();

        print2.println("</tocitem>\n</toc>");
        print2.close();

        test = test && config_file.createNewFile();
        if (test) {
          // Generates the config file
          print = new PrintWriter(new BufferedWriter(new FileWriter(config_file)));
          print.print("IndexRemove " + path.getAbsolutePath());
          print.close();
        }
      }
    } catch (Exception e) {
      LOG.error("Error getHelp " + e);
    }
    // Generates the search database
    String[] args =
        new String[] {
          pages.getAbsolutePath(),
          "-c",
          config_file.getAbsolutePath(),
          "-db",
          javahelpsearch.getAbsolutePath(),
          "-locale",
          lang
        };
    // Indexer indexer=new Indexer();
    // FIXME help desactived
    //		Indexer.main(args);

    Calendar c = GregorianCalendar.getInstance();
    c.setTime(new Date());
    int day = c.get(Calendar.DAY_OF_MONTH);
    int month = c.get(Calendar.MONTH) + 1;
    int year = c.get(Calendar.YEAR);
    int hour = c.get(Calendar.HOUR_OF_DAY);
    int minute = c.get(Calendar.MINUTE);
    int seconds = c.get(Calendar.SECOND);

    File log = new File(path, LOG_FILE);
    try {
      log.createNewFile();
      PrintWriter printlog = new PrintWriter(new BufferedWriter(new FileWriter(log)));
      printlog.println("Language " + lang);
      printlog.println(
          "Date : " + year + " " + month + " " + day + " " + hour + " " + minute + " " + seconds);
      printlog.close();
    } catch (Exception e) {
      LOG.error("Error while creating log " + e);
    }
  }
public class CFSecurityServiceBuff {
  public static final String CLASS_CODE = "HSVC";
  public static final String S_INIT_CREATEDBY = "654dbba0-eda7-11e1-aff1-0800200c9a66";
  public static final UUID INIT_CREATEDBY = UUID.fromString(S_INIT_CREATEDBY);
  public static final String S_INIT_UPDATEDBY = "654dbba0-eda7-11e1-aff1-0800200c9a66";
  public static final UUID INIT_UPDATEDBY = UUID.fromString(S_INIT_UPDATEDBY);
  public static final long CLUSTERID_INIT_VALUE = 0L;
  public static final long SERVICEID_INIT_VALUE = 0L;
  public static final long HOSTNODEID_INIT_VALUE = 0L;
  public static final int SERVICETYPEID_INIT_VALUE = 0;
  public static final short HOSTPORT_INIT_VALUE = (short) 0;
  public static final long CLUSTERID_MIN_VALUE = 0L;
  public static final long SERVICEID_MIN_VALUE = 0L;
  public static final long HOSTNODEID_MIN_VALUE = 0L;
  public static final int SERVICETYPEID_MIN_VALUE = 0;
  public static final short HOSTPORT_MIN_VALUE = (short) 0;
  protected UUID createdByUserId = CFSecurityServiceBuff.INIT_CREATEDBY;
  protected Calendar createdAt = Calendar.getInstance();
  protected UUID updatedByUserId = CFSecurityServiceBuff.INIT_UPDATEDBY;
  protected Calendar updatedAt = Calendar.getInstance();
  protected long requiredClusterId;
  protected long requiredServiceId;
  protected long requiredHostNodeId;
  protected int requiredServiceTypeId;
  protected short requiredHostPort;
  protected int requiredRevision;

  public CFSecurityServiceBuff() {
    requiredClusterId = CFSecurityServiceBuff.CLUSTERID_INIT_VALUE;
    requiredServiceId = CFSecurityServiceBuff.SERVICEID_INIT_VALUE;
    requiredHostNodeId = CFSecurityServiceBuff.HOSTNODEID_INIT_VALUE;
    requiredServiceTypeId = CFSecurityServiceBuff.SERVICETYPEID_INIT_VALUE;
    requiredHostPort = CFSecurityServiceBuff.HOSTPORT_INIT_VALUE;
  }

  public String getClassCode() {
    return (CLASS_CODE);
  }

  public UUID getCreatedByUserId() {
    return (createdByUserId);
  }

  public void setCreatedByUserId(UUID value) {
    createdByUserId = value;
  }

  public Calendar getCreatedAt() {
    return (createdAt);
  }

  public void setCreatedAt(Calendar value) {
    createdAt = value;
  }

  public UUID getUpdatedByUserId() {
    return (updatedByUserId);
  }

  public void setUpdatedByUserId(UUID value) {
    updatedByUserId = value;
  }

  public Calendar getUpdatedAt() {
    return (updatedAt);
  }

  public void setUpdatedAt(Calendar value) {
    updatedAt = value;
  }

  public long getRequiredClusterId() {
    return (requiredClusterId);
  }

  public void setRequiredClusterId(long value) {
    if (value < CFSecurityServiceBuff.CLUSTERID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredClusterId",
              1,
              "value",
              value,
              CFSecurityServiceBuff.CLUSTERID_MIN_VALUE);
    }
    requiredClusterId = value;
  }

  public long getRequiredServiceId() {
    return (requiredServiceId);
  }

  public void setRequiredServiceId(long value) {
    if (value < CFSecurityServiceBuff.SERVICEID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredServiceId",
              1,
              "value",
              value,
              CFSecurityServiceBuff.SERVICEID_MIN_VALUE);
    }
    requiredServiceId = value;
  }

  public long getRequiredHostNodeId() {
    return (requiredHostNodeId);
  }

  public void setRequiredHostNodeId(long value) {
    if (value < CFSecurityServiceBuff.HOSTNODEID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredHostNodeId",
              1,
              "value",
              value,
              CFSecurityServiceBuff.HOSTNODEID_MIN_VALUE);
    }
    requiredHostNodeId = value;
  }

  public int getRequiredServiceTypeId() {
    return (requiredServiceTypeId);
  }

  public void setRequiredServiceTypeId(int value) {
    if (value < CFSecurityServiceBuff.SERVICETYPEID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredServiceTypeId",
              1,
              "value",
              value,
              CFSecurityServiceBuff.SERVICETYPEID_MIN_VALUE);
    }
    requiredServiceTypeId = value;
  }

  public short getRequiredHostPort() {
    return (requiredHostPort);
  }

  public void setRequiredHostPort(short value) {
    if (value < CFSecurityServiceBuff.HOSTPORT_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredHostPort",
              1,
              "value",
              value,
              CFSecurityServiceBuff.HOSTPORT_MIN_VALUE);
    }
    requiredHostPort = value;
  }

  public int getRequiredRevision() {
    return (requiredRevision);
  }

  public void setRequiredRevision(int value) {
    requiredRevision = value;
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return (false);
    } else if (obj instanceof CFSecurityServiceBuff) {
      CFSecurityServiceBuff rhs = (CFSecurityServiceBuff) obj;
      if (!getCreatedByUserId().equals(rhs.getCreatedByUserId())) {
        return (false);
      }
      if (!getCreatedAt().equals(rhs.getCreatedAt())) {
        return (false);
      }
      if (!getUpdatedByUserId().equals(rhs.getUpdatedByUserId())) {
        return (false);
      }
      if (!getUpdatedAt().equals(rhs.getUpdatedAt())) {
        return (false);
      }
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredServiceId() != rhs.getRequiredServiceId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      if (getRequiredServiceTypeId() != rhs.getRequiredServiceTypeId()) {
        return (false);
      }
      if (getRequiredHostPort() != rhs.getRequiredHostPort()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServicePKey) {
      CFSecurityServicePKey rhs = (CFSecurityServicePKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredServiceId() != rhs.getRequiredServiceId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceHBuff) {
      CFSecurityServiceHBuff rhs = (CFSecurityServiceHBuff) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredServiceId() != rhs.getRequiredServiceId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      if (getRequiredServiceTypeId() != rhs.getRequiredServiceTypeId()) {
        return (false);
      }
      if (getRequiredHostPort() != rhs.getRequiredHostPort()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceHPKey) {
      CFSecurityServiceHPKey rhs = (CFSecurityServiceHPKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredServiceId() != rhs.getRequiredServiceId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByClusterIdxKey) {
      CFSecurityServiceByClusterIdxKey rhs = (CFSecurityServiceByClusterIdxKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByHostIdxKey) {
      CFSecurityServiceByHostIdxKey rhs = (CFSecurityServiceByHostIdxKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByTypeIdxKey) {
      CFSecurityServiceByTypeIdxKey rhs = (CFSecurityServiceByTypeIdxKey) obj;
      if (getRequiredServiceTypeId() != rhs.getRequiredServiceTypeId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByUTypeIdxKey) {
      CFSecurityServiceByUTypeIdxKey rhs = (CFSecurityServiceByUTypeIdxKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      if (getRequiredServiceTypeId() != rhs.getRequiredServiceTypeId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByUHostPortIdxKey) {
      CFSecurityServiceByUHostPortIdxKey rhs = (CFSecurityServiceByUHostPortIdxKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      if (getRequiredHostPort() != rhs.getRequiredHostPort()) {
        return (false);
      }
      return (true);
    } else {
      boolean retval = super.equals(obj);
      return (retval);
    }
  }

  public int hashCode() {
    int hashCode = 0;
    hashCode = hashCode + getCreatedByUserId().hashCode();
    hashCode = hashCode + getCreatedAt().hashCode();
    hashCode = hashCode + getUpdatedByUserId().hashCode();
    hashCode = hashCode + getUpdatedAt().hashCode();
    hashCode = hashCode + (int) (getRequiredClusterId());
    hashCode = hashCode + (int) (getRequiredServiceId());
    hashCode = hashCode + (int) (getRequiredHostNodeId());
    hashCode = hashCode + getRequiredServiceTypeId();
    hashCode = (hashCode * 0x10000) + getRequiredHostPort();
    return (hashCode & 0x7fffffff);
  }

  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFSecurityServiceBuff) {
      CFSecurityServiceBuff rhs = (CFSecurityServiceBuff) obj;
      int retval = 0;
      {
        int cmp = getCreatedByUserId().compareTo(rhs.getCreatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getCreatedAt().compareTo(rhs.getCreatedAt());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedByUserId().compareTo(rhs.getUpdatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedAt().compareTo(rhs.getUpdatedAt());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredServiceId() < rhs.getRequiredServiceId()) {
        return (-1);
      } else if (getRequiredServiceId() > rhs.getRequiredServiceId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      if (getRequiredServiceTypeId() < rhs.getRequiredServiceTypeId()) {
        return (-1);
      } else if (getRequiredServiceTypeId() > rhs.getRequiredServiceTypeId()) {
        return (1);
      }
      if (getRequiredHostPort() < rhs.getRequiredHostPort()) {
        return (-1);
      } else if (getRequiredHostPort() > rhs.getRequiredHostPort()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServicePKey) {
      CFSecurityServicePKey rhs = (CFSecurityServicePKey) obj;
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredServiceId() < rhs.getRequiredServiceId()) {
        return (-1);
      } else if (getRequiredServiceId() > rhs.getRequiredServiceId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceHPKey) {
      CFSecurityServiceHPKey rhs = (CFSecurityServiceHPKey) obj;
      {
        int lhsRequiredRevision = getRequiredRevision();
        int rhsRequiredRevision = rhs.getRequiredRevision();
        if (lhsRequiredRevision < rhsRequiredRevision) {
          return (-1);
        } else if (lhsRequiredRevision > rhsRequiredRevision) {
          return (1);
        }
      }
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredServiceId() < rhs.getRequiredServiceId()) {
        return (-1);
      } else if (getRequiredServiceId() > rhs.getRequiredServiceId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceHBuff) {
      CFSecurityServiceHBuff rhs = (CFSecurityServiceHBuff) obj;
      int retval = 0;
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredServiceId() < rhs.getRequiredServiceId()) {
        return (-1);
      } else if (getRequiredServiceId() > rhs.getRequiredServiceId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      if (getRequiredServiceTypeId() < rhs.getRequiredServiceTypeId()) {
        return (-1);
      } else if (getRequiredServiceTypeId() > rhs.getRequiredServiceTypeId()) {
        return (1);
      }
      if (getRequiredHostPort() < rhs.getRequiredHostPort()) {
        return (-1);
      } else if (getRequiredHostPort() > rhs.getRequiredHostPort()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceByClusterIdxKey) {
      CFSecurityServiceByClusterIdxKey rhs = (CFSecurityServiceByClusterIdxKey) obj;

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

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

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

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

      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      if (getRequiredHostPort() < rhs.getRequiredHostPort()) {
        return (-1);
      } else if (getRequiredHostPort() > rhs.getRequiredHostPort()) {
        return (1);
      }
      return (0);
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
    }
  }

  public void set(CFSecurityServiceBuff src) {
    setServiceBuff(src);
  }

  public void setServiceBuff(CFSecurityServiceBuff src) {
    setRequiredClusterId(src.getRequiredClusterId());
    setRequiredServiceId(src.getRequiredServiceId());
    setCreatedByUserId(src.getCreatedByUserId());
    setCreatedAt(src.getCreatedAt());
    setUpdatedByUserId(src.getUpdatedByUserId());
    setUpdatedAt(src.getUpdatedAt());
    setRequiredHostNodeId(src.getRequiredHostNodeId());
    setRequiredServiceTypeId(src.getRequiredServiceTypeId());
    setRequiredHostPort(src.getRequiredHostPort());
    setRequiredRevision(src.getRequiredRevision());
  }

  public void set(CFSecurityServiceHBuff src) {
    setServiceBuff(src);
  }

  public void setServiceBuff(CFSecurityServiceHBuff src) {
    setRequiredClusterId(src.getRequiredClusterId());
    setRequiredServiceId(src.getRequiredServiceId());
    setRequiredHostNodeId(src.getRequiredHostNodeId());
    setRequiredServiceTypeId(src.getRequiredServiceTypeId());
    setRequiredHostPort(src.getRequiredHostPort());
  }
}
  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 CFCrmAddressBuff) {
      CFCrmAddressBuff rhs = (CFCrmAddressBuff) obj;
      int retval = super.compareTo(rhs);
      if (retval != 0) {
        return (retval);
      }
      return (0);
    } else if (obj instanceof CFCrmAddressByTenantIdxKey) {
      CFCrmAddressByTenantIdxKey rhs = (CFCrmAddressByTenantIdxKey) obj;

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

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

      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredContactId() < rhs.getRequiredContactId()) {
        return (-1);
      } else if (getRequiredContactId() > rhs.getRequiredContactId()) {
        return (1);
      }
      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFCrmAddressByCountryIdxKey) {
      CFCrmAddressByCountryIdxKey rhs = (CFCrmAddressByCountryIdxKey) obj;

      if (getOptionalCountryId() != null) {
        Short lhsCountryId = getOptionalCountryId();
        if (rhs.getOptionalCountryId() != null) {
          Short rhsCountryId = rhs.getOptionalCountryId();
          int cmp = lhsCountryId.compareTo(rhsCountryId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalCountryId() != null) {
          return (-1);
        }
      }
      return (0);
    } else if (obj instanceof CFCrmAddressHBuff) {
      CFCrmAddressHBuff rhs = (CFCrmAddressHBuff) 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 (getRequiredAddressId() < rhs.getRequiredAddressId()) {
        return (-1);
      } else if (getRequiredAddressId() > rhs.getRequiredAddressId()) {
        return (1);
      }
      if (getRequiredContactId() < rhs.getRequiredContactId()) {
        return (-1);
      } else if (getRequiredContactId() > rhs.getRequiredContactId()) {
        return (1);
      }
      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getOptionalAddrLine1() != null) {
        if (rhs.getOptionalAddrLine1() != null) {
          int cmp = getOptionalAddrLine1().compareTo(rhs.getOptionalAddrLine1());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalAddrLine1() != null) {
          return (-1);
        }
      }
      if (getOptionalAddrLine2() != null) {
        if (rhs.getOptionalAddrLine2() != null) {
          int cmp = getOptionalAddrLine2().compareTo(rhs.getOptionalAddrLine2());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalAddrLine2() != null) {
          return (-1);
        }
      }
      if (getOptionalCity() != null) {
        if (rhs.getOptionalCity() != null) {
          int cmp = getOptionalCity().compareTo(rhs.getOptionalCity());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalCity() != null) {
          return (-1);
        }
      }
      if (getOptionalState() != null) {
        if (rhs.getOptionalState() != null) {
          int cmp = getOptionalState().compareTo(rhs.getOptionalState());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalState() != null) {
          return (-1);
        }
      }
      if (getOptionalCountryId() != null) {
        Short lhsCountryId = getOptionalCountryId();
        if (rhs.getOptionalCountryId() != null) {
          Short rhsCountryId = rhs.getOptionalCountryId();
          int cmp = lhsCountryId.compareTo(rhsCountryId);
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalCountryId() != null) {
          return (-1);
        }
      }
      if (getOptionalZip() != null) {
        if (rhs.getOptionalZip() != null) {
          int cmp = getOptionalZip().compareTo(rhs.getOptionalZip());
          if (cmp != 0) {
            return (cmp);
          }
        } else {
          return (1);
        }
      } else {
        if (rhs.getOptionalZip() != null) {
          return (-1);
        }
      }
      return (0);
    } else if (obj instanceof CFCrmAddressHPKey) {
      CFCrmAddressHPKey rhs = (CFCrmAddressHPKey) 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 (getRequiredAddressId() < rhs.getRequiredAddressId()) {
        return (-1);
      } else if (getRequiredAddressId() > rhs.getRequiredAddressId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFCrmAddressPKey) {
      CFCrmAddressPKey rhs = (CFCrmAddressPKey) obj;
      if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
        return (-1);
      } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
        return (1);
      }
      if (getRequiredAddressId() < rhs.getRequiredAddressId()) {
        return (-1);
      } else if (getRequiredAddressId() > rhs.getRequiredAddressId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFCrmHPKey) {
      CFCrmHPKey rhs = (CFCrmHPKey) 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 CFBamISOLanguageHPKey) {
     CFBamISOLanguageHPKey rhs = (CFBamISOLanguageHPKey) 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 CFBamISOLanguagePKey) {
     CFBamISOLanguagePKey rhs = (CFBamISOLanguagePKey) obj;
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamISOLanguageHBuff) {
     CFBamISOLanguageHBuff rhs = (CFBamISOLanguageHBuff) 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);
     }
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFBamISOLanguageBuff) {
     CFBamISOLanguageBuff rhs = (CFBamISOLanguageBuff) obj;
     if (getRequiredId() != rhs.getRequiredId()) {
       return (false);
     }
     return (true);
   } else {
     return (false);
   }
 }
  @Override
  public HashSet<ScoredAnnotation> solveSa2W(String text) throws AnnotationException {
    HashSet<ScoredAnnotation> res;
    try {
      res = new HashSet<ScoredAnnotation>();
      lastTime = Calendar.getInstance().getTimeInMillis();

      URL wikiApi = new URL(url);
      String parameters =
          "references=true&repeatMode=all&minProbability=0.0&source="
              + URLEncoder.encode(text, "UTF-8");
      HttpURLConnection slConnection = (HttpURLConnection) wikiApi.openConnection();
      slConnection.setRequestProperty("accept", "text/xml");
      slConnection.setDoOutput(true);
      slConnection.setDoInput(true);
      slConnection.setRequestMethod("POST");
      slConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
      slConnection.setRequestProperty("charset", "utf-8");
      slConnection.setRequestProperty(
          "Content-Length", "" + Integer.toString(parameters.getBytes().length));
      slConnection.setUseCaches(false);

      DataOutputStream wr = new DataOutputStream(slConnection.getOutputStream());
      wr.writeBytes(parameters);
      wr.flush();
      wr.close();
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      DocumentBuilder builder = factory.newDocumentBuilder();
      Document doc = builder.parse(slConnection.getInputStream());

      /*			URL wikiApi = new URL(url+"?references=true&repeatMode=all&minProbability=0.0&source="+URLEncoder.encode(text, "UTF-8"));
      			URLConnection wikiConnection = wikiApi.openConnection();
      			DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      			DocumentBuilder builder = factory.newDocumentBuilder();
      			Document doc = builder.parse(wikiConnection.getInputStream());
      */

      lastTime = Calendar.getInstance().getTimeInMillis() - lastTime;

      XPathFactory xPathfactory = XPathFactory.newInstance();
      XPath xpath = xPathfactory.newXPath();
      XPathExpression idExpr = xpath.compile("//detectedTopic/@id");
      XPathExpression weightExpr = xpath.compile("//detectedTopic/@weight");
      XPathExpression referenceExpr = xpath.compile("//detectedTopic/references");

      NodeList ids = (NodeList) idExpr.evaluate(doc, XPathConstants.NODESET);
      NodeList weights = (NodeList) weightExpr.evaluate(doc, XPathConstants.NODESET);
      NodeList references = (NodeList) referenceExpr.evaluate(doc, XPathConstants.NODESET);

      for (int i = 0; i < weights.getLength(); i++) {
        if (weights.item(i).getNodeType() != Node.TEXT_NODE) {
          int id = Integer.parseInt(ids.item(i).getNodeValue());
          float weight = Float.parseFloat(weights.item(i).getNodeValue());
          //					System.out.println("ID="+ids.item(i).getNodeValue()+" weight="+weight);
          XPathExpression startExpr =
              xpath.compile("//detectedTopic[@id=" + id + "]/references/reference/@start");
          XPathExpression endExpr =
              xpath.compile("//detectedTopic[@id=" + id + "]/references/reference/@end");
          NodeList starts =
              (NodeList) startExpr.evaluate(references.item(i), XPathConstants.NODESET);
          NodeList ends = (NodeList) endExpr.evaluate(references.item(i), XPathConstants.NODESET);
          for (int j = 0; j < starts.getLength(); j++) {
            int start = Integer.parseInt(starts.item(j).getNodeValue());
            int end = Integer.parseInt(ends.item(j).getNodeValue());
            int len = end - start;
            res.add(new ScoredAnnotation(start, len, id, weight));
          }
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
      throw new AnnotationException(
          "An error occurred while querying Wikipedia Miner API. Message: " + e.getMessage());
    }
    return res;
  }
  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));
    }
  }