Ejemplo n.º 1
1
  public static void main(String[] args) {
    if (args.length != 2) {
      System.out.println("Usage : java CalendarEx7 2004 11");

      return;
    }

    int year = Integer.parseInt(args[0]);
    int month = Integer.parseInt(args[1]);

    Calendar sDay = Calendar.getInstance(); // 시작일
    Calendar eDay = Calendar.getInstance(); // 끝일
    // 월의 경우 0부터 11까지의 값을 가지므로 1을 빼줘야 한다.
    // 예를 들어, 2004년 11월 1일은 sDay.set(2004,10,1);과 같이 해줘야 한다.
    sDay.set(year, month - 1, 1); // 입력월의 1일로 설정 한다.
    // 입력 월의 말일로 설정한다.
    eDay.set(year, month - 1, sDay.getActualMaximum(Calendar.DATE));
    // 1일이 속한 주의일요일로 날짜설정.
    sDay.add(Calendar.DATE, -sDay.get(Calendar.DAY_OF_WEEK) + 1);
    // 말일이 속한 주의 토요일로 날짜설정
    eDay.add(Calendar.DATE, 7 - eDay.get(Calendar.DAY_OF_WEEK));

    System.out.println("   " + year + "년 " + month + "월");
    System.out.println(" SU MO TU WE TH FR SA");

    // 시작일과 마지막일까지(sDay<=eDay) 1일씩 증가시켜가면서 일(Calendar.DATE)을 출력한다.
    for (int n = 1; sDay.before(eDay) || sDay.equals(eDay); sDay.add(Calendar.DATE, 1)) {
      int day = sDay.get(Calendar.DATE);
      System.out.print((day < 10) ? "  " + day : " " + day);
      if (n++ % 7 == 0) {
        System.out.println(); // 7일치를 찍고 나서 죽을 바꾼다.
      }
    }
  } // main
 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 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 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));
   }
 }
Ejemplo n.º 5
0
  void updateSpinners() {
    if (mDayEnabled) {
      if (mCurrentDate.equals(mMinDate)) {
        mDaySpinner.setMinValue(mCurrentDate.get(Calendar.DAY_OF_MONTH));
        mDaySpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.DAY_OF_MONTH));
      } else if (mCurrentDate.equals(mMaxDate)) {
        mDaySpinner.setMinValue(mCurrentDate.getActualMinimum(Calendar.DAY_OF_MONTH));
        mDaySpinner.setMaxValue(mCurrentDate.get(Calendar.DAY_OF_MONTH));
      } else {
        mDaySpinner.setMinValue(1);
        mDaySpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.DAY_OF_MONTH));
      }
      mDaySpinner.setValue(mCurrentDate.get(Calendar.DAY_OF_MONTH));
    }

    if (mWeekEnabled) {
      mWeekSpinner.setMinValue(1);
      mWeekSpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.WEEK_OF_YEAR));
      mWeekSpinner.setValue(mCurrentDate.get(Calendar.WEEK_OF_YEAR));
    }

    if (mMonthEnabled) {
      mMonthSpinner.setDisplayedValues(null);
      if (mCurrentDate.equals(mMinDate)) {
        mMonthSpinner.setMinValue(mCurrentDate.get(Calendar.MONTH));
        mMonthSpinner.setMaxValue(mCurrentDate.getActualMaximum(Calendar.MONTH));
      } else if (mCurrentDate.equals(mMaxDate)) {
        mMonthSpinner.setMinValue(mCurrentDate.getActualMinimum(Calendar.MONTH));
        mMonthSpinner.setMaxValue(mCurrentDate.get(Calendar.MONTH));
      } else {
        mMonthSpinner.setMinValue(Calendar.JANUARY);
        mMonthSpinner.setMaxValue(Calendar.DECEMBER);
      }

      String[] displayedValues =
          Arrays.copyOfRange(
              mShortMonths, mMonthSpinner.getMinValue(), mMonthSpinner.getMaxValue() + 1);
      mMonthSpinner.setDisplayedValues(displayedValues);
      mMonthSpinner.setValue(mCurrentDate.get(Calendar.MONTH));
    }

    if (mYearEnabled) {
      mYearSpinner.setMinValue(mMinDate.get(Calendar.YEAR));
      mYearSpinner.setMaxValue(mMaxDate.get(Calendar.YEAR));
      mYearSpinner.setValue(mCurrentDate.get(Calendar.YEAR));
    }

    if (mHourEnabled) {
      if (mIs12HourMode) {
        mHourSpinner.setValue(mCurrentDate.get(Calendar.HOUR));
        mAMPMSpinner.setValue(mCurrentDate.get(Calendar.AM_PM));
        mAMPMSpinner.setDisplayedValues(mShortAMPMs);
      } else {
        mHourSpinner.setValue(mCurrentDate.get(Calendar.HOUR_OF_DAY));
      }
    }
    if (mMinuteEnabled) {
      mMinuteSpinner.setValue(mCurrentDate.get(Calendar.MINUTE));
    }
  }
Ejemplo n.º 6
0
  // ============================================
  public String toString() {
    String startDateString = DATE_FORMAT.format(startDate.getTime());
    String endDateString = DATE_FORMAT.format(endDate.getTime());
    String priorityString = Integer.toString(priority);
    String tagString = tag;

    if (startDate.equals(NO_CHANGE_FOR_STARTDATE)) {
      startDateString = EMPTY;
    }
    if (endDate.equals(NO_CHANGE_FOR_ENDDATE)) {
      endDateString = EMPTY;
    }
    if (priority == NO_CHANGE_FOR_PRIORITY) {
      priorityString = EMPTY;
    }
    if (tag.equals(NO_CHANGE_FOR_TAG)) {
      tagString = EMPTY;
    }
    // if no change of subtasks then don't print
    String output =
        "CommandType: "
            + this.commandType
            + "\r\n"
            + Id
            + "=="
            + startDateString
            + "=="
            + endDateString
            + "=="
            + tagString
            + "=="
            + priorityString;

    return output;
  }
Ejemplo n.º 7
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Person other = (Person) obj;
   if (age != other.age) return false;
   if (cal == null) {
     if (other.cal != null) return false;
   } else if (!cal.equals(other.cal)) return false;
   if (map == null) {
     if (other.map != null) return false;
   } else if (!map.equals(other.map)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (nullTest == null) {
     if (other.nullTest != null) return false;
   } else if (!nullTest.equals(other.nullTest)) return false;
   if (pet == null) {
     if (other.pet != null) return false;
   } else if (!pet.equals(other.pet)) return false;
   if (someDate == null) {
     if (other.someDate != null) return false;
   } else if (!someDate.equals(other.someDate)) return false;
   return true;
 }
Ejemplo n.º 8
0
 public boolean equals(Object other) {
   if ((other != null) && (other instanceof Expense)) {
     Expense another = (Expense) other;
     return (item.equals(another.item) && amount == another.amount && date.equals(another.date));
   }
   return false;
 }
Ejemplo n.º 9
0
  /** {@inheritDoc} */
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof Citation)) return false;

    final Citation c = (Citation) o;

    if (date == null) {
      if (c.date != null) return false;
    } else if (!date.equals(c.date)) return false;

    if (comment == null) {
      if (c.comment != null) return false;
    } else if (!comment.equals(c.comment)) return false;

    if (reference == null) {
      if (c.reference != null) return false;
    } else if (!reference.equals(c.reference)) return false;

    // name is non-null by contract
    if (!name.equals(c.name)) return false;

    if (type != c.type) return false;

    if (authors == null) {
      if (c.authors != null) return false;
    } else if (!authors.equals(c.authors)) return false;

    return true;
  }
Ejemplo n.º 10
0
  public int findAllBirthsBetweenIntervalByGender(Calendar startDate, Calendar endDate, int flag) {

    int count = 0;
    List<PregnancyOutcome> outcomes = genericDao.findAll(PregnancyOutcome.class, true);

    for (PregnancyOutcome outcome : outcomes) {
      Calendar outcomeDate = outcome.getOutcomeDate();
      if ((outcomeDate.after(startDate) || outcomeDate.equals(startDate))
          && (outcomeDate.before(endDate))) {

        List<Outcome> allOutcomes = outcome.getOutcomes();
        for (Outcome o : allOutcomes) {
          if (o.getType().equals(siteProperties.getLiveBirthCode())) {
            // male
            if (flag == 0) {
              if (o.getChild().getGender().equals(siteProperties.getMaleCode())) {
                if (o.getType().equals(siteProperties.getLiveBirthCode())) {
                  count++;
                }
              }
            }
            // female
            else {
              if (o.getChild().getGender().equals(siteProperties.getFemaleCode())) {
                if (o.getType().equals(siteProperties.getLiveBirthCode())) {
                  count++;
                }
              }
            }
          }
        }
      }
    }
    return count;
  }
Ejemplo n.º 11
0
  public static int getIntervalMonths(Date date1, Date date2) {
    int iMonth = 0;
    int flag = 0;
    try {
      Calendar objCalendarDate1 = Calendar.getInstance();
      objCalendarDate1.setTime(date1);

      Calendar objCalendarDate2 = Calendar.getInstance();
      objCalendarDate2.setTime(date2);

      if (objCalendarDate2.equals(objCalendarDate1)) return 0;
      if (objCalendarDate1.after(objCalendarDate2)) {
        Calendar temp = objCalendarDate1;
        objCalendarDate1 = objCalendarDate2;
        objCalendarDate2 = temp;
      }
      if (objCalendarDate2.get(Calendar.DAY_OF_MONTH) < objCalendarDate1.get(Calendar.DAY_OF_MONTH))
        flag = 1;

      if (objCalendarDate2.get(Calendar.YEAR) > objCalendarDate1.get(Calendar.YEAR))
        iMonth =
            ((objCalendarDate2.get(Calendar.YEAR) - objCalendarDate1.get(Calendar.YEAR)) * 12
                    + objCalendarDate2.get(Calendar.MONTH)
                    - flag)
                - objCalendarDate1.get(Calendar.MONTH);
      else
        iMonth = objCalendarDate2.get(Calendar.MONTH) - objCalendarDate1.get(Calendar.MONTH) - flag;

    } catch (Exception e) {
      e.printStackTrace();
    }
    return iMonth;
  }
  @TestTargetNew(
      level = TestLevel.COMPLETE,
      notes = "",
      method = "equals",
      args = {java.lang.Object.class})
  public void test_equals() {
    Calendar cal1 = Calendar.getInstance(TimeZone.getTimeZone("GMT+2"), defaultLocale);
    Calendar cal2 = Calendar.getInstance(TimeZone.getTimeZone("GMT+2"), defaultLocale);

    cal1.setTimeInMillis(1222185600225L);
    cal2.set(2008, Calendar.SEPTEMBER, 23, 18, 0, 0);
    assertFalse(cal1.equals(cal2));
    cal1.get(Calendar.YEAR);
    cal2.getTimeInMillis();
    cal1.set(Calendar.MILLISECOND, 0);
    cal2.set(Calendar.MILLISECOND, 0);
    // tests fails on following line.
    assertTrue(cal1.equals(cal2));
  }
Ejemplo n.º 13
0
  @Override
  protected boolean validate(T contest) {
    Calendar submitByCalendar = Calendar.getInstance();
    submitByCalendar.setTime(contest.getSubmitBy());
    removeTimeInformation(submitByCalendar);

    Calendar todayCalendar = Calendar.getInstance();
    removeTimeInformation(todayCalendar);

    return (submitByCalendar.after(todayCalendar) || submitByCalendar.equals(todayCalendar));
    //        return (contest.getSubmitBy().getTime() / 1000) >= (new Date().getTime() / 1000);
  }
Ejemplo n.º 14
0
 public Event getEventFromCommand() {
   Event e = new Event();
   if (Id != 0) {
     e.setId(Id);
   }
   if (!detail.equals(NO_CHANGE_FOR_DETAIL)) {
     e.setDetails(detail);
   }
   if (!startDate.equals(NO_CHANGE_FOR_STARTDATE)) {
     e.setStartDate(startDate);
   }
   if (!endDate.equals(NO_CHANGE_FOR_ENDDATE)) {
     e.setEndDate(endDate);
   }
   if (priority != NO_CHANGE_FOR_PRIORITY) {
     e.setPriority(priority);
   }
   if (!tag.equals(NO_CHANGE_FOR_TAG)) {
     e.setTag(tag);
   }
   return e;
 }
  public void testClone() {

    WebXTypeConverter converter = new WebXTypeConverter();

    Calendar cal = Calendar.getInstance();
    Calendar cal2 = (Calendar) converter.convertValue(cal, Calendar.class);
    assertTrue(cal != cal2);
    assertTrue(cal.equals(cal2));

    Integer i = 2;
    Integer i2 = (Integer) converter.convertValue(i, Integer.class);
    assertTrue(i == i2);
  }
Ejemplo n.º 16
0
 public void updateDate(Calendar calendar) {
   if (mCurrentDate.equals(calendar)) {
     return;
   }
   mCurrentDate.setTimeInMillis(calendar.getTimeInMillis());
   if (mCurrentDate.before(mMinDate)) {
     mCurrentDate.setTimeInMillis(mMinDate.getTimeInMillis());
   } else if (mCurrentDate.after(mMaxDate)) {
     mCurrentDate.setTimeInMillis(mMaxDate.getTimeInMillis());
   }
   updateSpinners();
   notifyDateChanged();
 }
Ejemplo n.º 17
0
  public void testCalendarAttribute() throws Exception {
    User user = getUser(userDao, "testuser");
    CollectionItem root = (CollectionItem) contentDao.getRootItem(user);

    ContentItem item = generateTestContent();

    CalendarAttribute calAttr =
        new HibCalendarAttribute(new HibQName("calendarattribute"), "2002-10-10T00:00:00+05:00");
    item.addAttribute(calAttr);

    ContentItem newItem = contentDao.createContent(root, item);

    clearSession();

    ContentItem queryItem = contentDao.findContentByUid(newItem.getUid());

    Attribute attr = queryItem.getAttribute(new HibQName("calendarattribute"));
    Assert.assertNotNull(attr);
    Assert.assertTrue(attr instanceof CalendarAttribute);

    Calendar cal = (Calendar) attr.getValue();
    Assert.assertEquals(cal.getTimeZone().getID(), "GMT+05:00");
    Assert.assertTrue(cal.equals(calAttr.getValue()));

    attr.setValue("2003-10-10T00:00:00+02:00");

    contentDao.updateContent(queryItem);

    clearSession();

    queryItem = contentDao.findContentByUid(newItem.getUid());
    Attribute queryAttr = queryItem.getAttribute(new HibQName("calendarattribute"));
    Assert.assertNotNull(queryAttr);
    Assert.assertTrue(queryAttr instanceof CalendarAttribute);

    cal = (Calendar) queryAttr.getValue();
    Assert.assertEquals(cal.getTimeZone().getID(), "GMT+02:00");
    Assert.assertTrue(cal.equals(attr.getValue()));
  }
Ejemplo n.º 18
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Deposit other = (Deposit) obj;
   if (balance == null) {
     if (other.balance != null) return false;
   } else if (!balance.equals(other.balance)) return false;
   if (client == null) {
     if (other.client != null) return false;
   } else if (!client.equals(other.client)) return false;
   if (closingDate == null) {
     if (other.closingDate != null) return false;
   } else if (!closingDate.equals(other.closingDate)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (openingDate == null) {
     if (other.openingDate != null) return false;
   } else if (!openingDate.equals(other.openingDate)) return false;
   if (type != other.type) return false;
   return true;
 }
  public boolean isRequestedAppearanceDateBetweenDates(Calendar startDate, Calendar endDate) {

    if (requestedAppearanceDate == null || (startDate == null && endDate == null)) {
      return false;
    }

    Calendar requestedAppearanceCalendar =
        DateUtils.clearTimeFromCalendar(DateUtils.toCalendar(requestedAppearanceDate));

    if (endDate != null) {
      return !requestedAppearanceCalendar.before(startDate)
          && !endDate.before(requestedAppearanceCalendar);
    }

    return startDate.equals(requestedAppearanceCalendar);
  }
 public void run() {
   LOG.debug("run: " + this);
   Calendar now = Calendar.getInstance();
   Calendar start = this.getStartCalendar();
   Calendar end = this.getEndCalendar();
   if (now.after(end)) {
     this.setStatus(Status.SENT);
     this.stopReminder();
     this.refreshReminder();
   } else if ((now.equals(start) || now.after(start))
       && now.get(Calendar.MINUTE) == start.get(Calendar.MINUTE)
       && now.get(Calendar.HOUR_OF_DAY) == start.get(Calendar.HOUR_OF_DAY)
       && Arrays.asList(WEEKDAYS).contains(now.get(Calendar.DAY_OF_WEEK))) {
     this.sendReminder();
   }
 }
Ejemplo n.º 21
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   SpecialView other = (SpecialView) obj;
   if (description == null) {
     if (other.description != null) return false;
   } else if (!description.equals(other.description)) return false;
   if (expirationDate == null) {
     if (other.expirationDate != null) return false;
   } else if (!expirationDate.equals(other.expirationDate)) return false;
   if (specialId != other.specialId) return false;
   if (summary == null) {
     if (other.summary != null) return false;
   } else if (!summary.equals(other.summary)) return false;
   return true;
 }
  private void checkLancamentosNaoResolvidos(
      List<DatedExtratoLancamento> extratoLines,
      List<Lancamento> lancamentoOrfaoList,
      int i,
      List<ExtratoLineAnalyseResult> statuses) {
    DatedExtratoLancamento extrato = extratoLines.get(i);

    if (i != extratoLines.size() - 1) {
      Calendar dataAtual = extrato.getData();

      DatedExtratoLancamento proximo = extratoLines.get(i + 1);

      Calendar dataProximo = proximo.getData();

      if ((dataProximo == null) || (!dataAtual.equals(dataProximo))) {
        addLancamentosNaoResolvidos(dataAtual, dataProximo, lancamentoOrfaoList, statuses);
      }
    }
  }
Ejemplo n.º 23
0
 /* (non-Javadoc)
  * @see java.lang.Object#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (obj == null) {
     return false;
   }
   if (!(obj instanceof Itinerary)) {
     return false;
   }
   Itinerary other = (Itinerary) obj;
   if (departureDate == null) {
     if (other.departureDate != null) {
       return false;
     }
   } else if (!departureDate.equals(other.departureDate)) {
     return false;
   }
   if (destination == null) {
     if (other.destination != null) {
       return false;
     }
   } else if (!destination.equals(other.destination)) {
     return false;
   }
   if (flights == null) {
     if (other.flights != null) {
       return false;
     }
   } else if (!flights.equals(other.flights)) {
     return false;
   }
   if (origin == null) {
     if (other.origin != null) {
       return false;
     }
   } else if (!origin.equals(other.origin)) {
     return false;
   }
   return true;
 }
Ejemplo n.º 24
0
  public List<PregnancyOutcome> findAllLiveBirthsBetweenInterval(
      Calendar startDate, Calendar endDate) {

    List<PregnancyOutcome> output = new ArrayList<PregnancyOutcome>();
    List<PregnancyOutcome> outcomes = genericDao.findAll(PregnancyOutcome.class, true);

    for (PregnancyOutcome outcome : outcomes) {
      Calendar outcomeDate = outcome.getOutcomeDate();
      if ((outcomeDate.after(startDate) || outcomeDate.equals(startDate))
          && (outcomeDate.before(endDate))) {

        List<Outcome> allOutcomes = outcome.getOutcomes();
        for (Outcome o : allOutcomes)
          if (o.getType().equals(siteProperties.getLiveBirthCode())) {
            output.add(outcome);
          }
      }
    }
    return output;
  }
Ejemplo n.º 25
0
  /**
   * Evaluates if the first date is greater or equal to the second date - provided as a string value
   * - using the default date format.
   *
   * @param date1 the first date value for comparison
   * @param value2 the second date value for comparison
   * @return indication if the first value is greater than the second value
   */
  public static boolean evaluate(Date date1, String value2) {

    SimpleDateFormat sdf = new SimpleDateFormat(CheckConstants.DEFAULT_DATE_FORMAT);

    boolean result = false;

    try {
      Date date2 = sdf.parse(value2);

      Calendar cal1 = Calendar.getInstance();
      cal1.setTime(date1);

      Calendar cal2 = Calendar.getInstance();
      cal2.setTime(date2);

      result = cal1.after(cal2) || cal1.equals(cal2);
    } catch (Exception ex) {

    }
    return result;
  }
Ejemplo n.º 26
0
    public void stateChanged(ChangeEvent e) {
      Date date = spinnerDateModel.getDate();

      // We only care about the time portion of the field. If no date is
      // selected, we shouldn't be able to change the time (unless there
      // is no date to select)

      if (!isNullDate || (selectedComponents & DISPLAY_DATE) == 0) {
        temp.setTime(date);
        temp.set(Calendar.YEAR, selectedCalendar.get(Calendar.YEAR));
        temp.set(Calendar.MONTH, selectedCalendar.get(Calendar.MONTH));
        temp.set(Calendar.DATE, selectedCalendar.get(Calendar.DATE));

        // Make sure we change the time only if necessary

        if (lastTemp == null || !lastTemp.equals(temp)) {
          setDate(temp.getTime());
          lastTemp = (Calendar) temp.clone();
        }
      }
    }
Ejemplo n.º 27
0
  /**
   * Evaluates if the first date is greater or equal to the second date - both provided as string
   * values- using the specified date format.
   *
   * @param value1 the first date value for comparison
   * @param value2 the second date value for comparison
   * @param format the format to be used for the comparison according to the SimpleDateFormat class
   * @return indication if the first value is greater than the second value
   */
  public static boolean evaluate(String value1, String value2, String format) {

    SimpleDateFormat sdf = new SimpleDateFormat(format);

    boolean result = false;

    try {
      Date date1 = sdf.parse(value1);
      Date date2 = sdf.parse(value2);

      Calendar cal1 = Calendar.getInstance();
      cal1.setTime(date1);

      Calendar cal2 = Calendar.getInstance();
      cal2.setTime(date2);

      result = cal1.after(cal2) || cal1.equals(cal2);
    } catch (Exception ex) {

    }
    return result;
  }
Ejemplo n.º 28
0
  public List<Time> buildDoctorSchedule(List<Schedule> schedules, int interval) {
    Calendar start = getFirstHourOfTheSchedule();
    Calendar end = getLastHourOfTheSchedule();

    List<Time> timeTable = new LinkedList<Time>();
    while (start.before(end) || start.equals(end)) {
      Time time = new Time(start);

      for (Schedule schedule : schedules) {
        if (schedule.getStartTime().get(Calendar.HOUR_OF_DAY) == start.get(Calendar.HOUR_OF_DAY)
            && schedule.getStartTime().get(Calendar.MINUTE) == start.get(Calendar.MINUTE)) {
          time.addCommitment(schedule);
        }
      }

      timeTable.add(time);

      start.add(Calendar.MINUTE, interval);
    }

    return timeTable;
  }
 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);
   }
 }
 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));
   }
 }