@Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Product other = (Product) obj;
   if (category == null) {
     if (other.category != null) return false;
   } else if (!category.equals(other.category)) return false;
   if (effectiveDate == null) {
     if (other.effectiveDate != null) return false;
   } else if (!effectiveDate.equals(other.effectiveDate)) return false;
   if (expirationDate == null) {
     if (other.expirationDate != null) return false;
   } else if (!expirationDate.equals(other.expirationDate)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (invoicePrice == null) {
     if (other.invoicePrice != null) return false;
   } else if (!invoicePrice.equals(other.invoicePrice)) return false;
   if (msrp == null) {
     if (other.msrp != null) return false;
   } else if (!msrp.equals(other.msrp)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (vendorComissionPercent == null) {
     if (other.vendorComissionPercent != null) return false;
   } else if (!vendorComissionPercent.equals(other.vendorComissionPercent)) return false;
   return true;
 }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Quote quote = (Quote) o;

    if (deleted != quote.deleted) return false;
    if (voteCount != quote.voteCount) return false;
    if (approvalDate != null
        ? !approvalDate.equals(quote.approvalDate)
        : quote.approvalDate != null) return false;
    if (author != null ? !author.equals(quote.author) : quote.author != null) return false;
    if (creationDate != null
        ? !creationDate.equals(quote.creationDate)
        : quote.creationDate != null) return false;
    if (demagogBacklinkUrl != null
        ? !demagogBacklinkUrl.equals(quote.demagogBacklinkUrl)
        : quote.demagogBacklinkUrl != null) return false;
    if (id != null ? !id.equals(quote.id) : quote.id != null) return false;
    if (lastUpdateDate != null
        ? !lastUpdateDate.equals(quote.lastUpdateDate)
        : quote.lastUpdateDate != null) return false;
    if (quoteState != quote.quoteState) return false;
    if (quoteText != null ? !quoteText.equals(quote.quoteText) : quote.quoteText != null)
      return false;
    if (url != null ? !url.equals(quote.url) : quote.url != null) return false;
    if (userIp != null ? !userIp.equals(quote.userIp) : quote.userIp != null) return false;

    return true;
  }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   CatalogCategoryMaster other = (CatalogCategoryMaster) obj;
   if (businessName == null) {
     if (other.businessName != null) return false;
   } else if (!businessName.equals(other.businessName)) return false;
   if (code == null) {
     if (other.code != null) return false;
   } else if (!code.equals(other.code)) return false;
   if (dateCreate == null) {
     if (other.dateCreate != null) return false;
   } else if (!dateCreate.equals(other.dateCreate)) return false;
   if (dateUpdate == null) {
     if (other.dateUpdate != null) return false;
   } else if (!dateUpdate.equals(other.dateUpdate)) return false;
   if (defaultParentCatalogCategory == null) {
     if (other.defaultParentCatalogCategory != null) return false;
   } else if (!defaultParentCatalogCategory.equals(other.defaultParentCatalogCategory))
     return false;
   if (description == null) {
     if (other.description != null) return false;
   } else if (!description.equals(other.description)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (isDefault != other.isDefault) return false;
   if (version != other.version) return false;
   return true;
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Lancamento other = (Lancamento) obj;
   if (codigo != other.codigo) return false;
   if (descricao == null) {
     if (other.descricao != null) return false;
   } else if (!descricao.equals(other.descricao)) return false;
   if (lancamentoPai == null) {
     if (other.lancamentoPai != null) return false;
   } else if (!lancamentoPai.equals(other.lancamentoPai)) return false;
   if (pagamento == null) {
     if (other.pagamento != null) return false;
   } else if (!pagamento.equals(other.pagamento)) return false;
   if (pai != other.pai) return false;
   if (status != other.status) return false;
   if (usuario == null) {
     if (other.usuario != null) return false;
   } else if (!usuario.equals(other.usuario)) return false;
   if (Double.doubleToLongBits(valor) != Double.doubleToLongBits(other.valor)) return false;
   if (vencimento == null) {
     if (other.vencimento != null) return false;
   } else if (!vencimento.equals(other.vencimento)) return false;
   return true;
 }
Exemple #5
0
 private int searchCompare(Note n1, Note n2) {
   Integer count1 = Integer.valueOf(n1.getCount());
   Integer count2 = Integer.valueOf(n2.getCount());
   Date date1 = new Date((Timestamp.valueOf(n1.getDateTime())).getTime());
   Date date2 = new Date((Timestamp.valueOf(n2.getDateTime())).getTime());
   Integer type1 = Integer.valueOf(n1.getType());
   Integer type2 = Integer.valueOf(n2.getType());
   Integer imp1 = Integer.valueOf(n1.getImportant());
   Integer imp2 = Integer.valueOf(n2.getImportant());
   if (count1.equals(count2)) {
     if (n1.getType() == Note.REMINDER && n2.getType() == Note.REMINDER) {
       Date rdate1 = NoteComparator.StringToDate(n1.getRDateTime());
       Date rdate2 = NoteComparator.StringToDate(n1.getRDateTime());
       if (rdate1.equals(rdate2)) {
         return imp2.compareTo(imp1);
       }
       return rdate2.compareTo(rdate1);
     }
     if (type1.equals(type2)) {
       if (date1.equals(date2)) {
         return imp2.compareTo(imp1);
       }
       return date2.compareTo(date1);
     }
     return type2.compareTo(type1);
   }
   return count2.compareTo(count1);
 }
Exemple #6
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   QrdaWeeklyCounts other = (QrdaWeeklyCounts) obj;
   if (category1Count == null) {
     if (other.category1Count != null) return false;
   } else if (!category1Count.equals(other.category1Count)) return false;
   if (category3Count == null) {
     if (other.category3Count != null) return false;
   } else if (!category3Count.equals(other.category3Count)) return false;
   if (endDate == null) {
     if (other.endDate != null) return false;
   } else if (!endDate.equals(other.endDate)) return false;
   if (interval == null) {
     if (other.interval != null) return false;
   } else if (!interval.equals(other.interval)) return false;
   if (startDate == null) {
     if (other.startDate != null) return false;
   } else if (!startDate.equals(other.startDate)) return false;
   if (year == null) {
     if (other.year != null) return false;
   } else if (!year.equals(other.year)) return false;
   return true;
 }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    CheckError that = (CheckError) o;

    if (getId() != that.getId()) return false;
    if (chkDate != null ? !chkDate.equals(that.chkDate) : that.chkDate != null) return false;
    if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null)
      return false;
    if (dealStatus != null ? !dealStatus.equals(that.dealStatus) : that.dealStatus != null)
      return false;
    if (errDetail != null ? !errDetail.equals(that.errDetail) : that.errDetail != null)
      return false;
    if (partnerId != null ? !partnerId.equals(that.partnerId) : that.partnerId != null)
      return false;
    if (tradeNo != null ? !tradeNo.equals(that.tradeNo) : that.tradeNo != null) return false;
    if (tradeType != null ? !tradeType.equals(that.tradeType) : that.tradeType != null)
      return false;
    if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null)
      return false;

    return true;
  }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (!super.equals(obj)) return false;
   if (getClass() != obj.getClass()) return false;
   MedicineCardAnamnesisDisease other = (MedicineCardAnamnesisDisease) obj;
   if (amount == null) {
     if (other.amount != null) return false;
   } else if (!amount.equals(other.amount)) return false;
   if (anamnesisDiseaseDetail == null) {
     if (other.anamnesisDiseaseDetail != null) return false;
   } else if (!anamnesisDiseaseDetail.equals(other.anamnesisDiseaseDetail)) return false;
   if (beginDate == null) {
     if (other.beginDate != null) return false;
   } else if (!beginDate.equals(other.beginDate)) return false;
   if (description == null) {
     if (other.description != null) return false;
   } else if (!description.equals(other.description)) return false;
   if (endDate == null) {
     if (other.endDate != null) return false;
   } else if (!endDate.equals(other.endDate)) return false;
   if (firstManifestation == null) {
     if (other.firstManifestation != null) return false;
   } else if (!firstManifestation.equals(other.firstManifestation)) return false;
   if (medicineCard == null) {
     if (other.medicineCard != null) return false;
   } else if (!medicineCard.equals(other.medicineCard)) return false;
   if (medicineCardAnamnesisDiseaseId == null) {
     if (other.medicineCardAnamnesisDiseaseId != null) return false;
   } else if (!medicineCardAnamnesisDiseaseId.equals(other.medicineCardAnamnesisDiseaseId))
     return false;
   return true;
 }
Exemple #9
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    User user = (User) o;

    if (isConfirmed != user.isConfirmed) return false;
    if (isEnabled != user.isEnabled) return false;
    if (isNonReadOnly != user.isNonReadOnly) return false;
    if (Double.compare(user.rating, rating) != 0) return false;
    if (tasksSolved != user.tasksSolved) return false;
    if (country != null ? !country.equals(user.country) : user.country != null) return false;
    if (creationDate != null ? !creationDate.equals(user.creationDate) : user.creationDate != null)
      return false;
    if (email != null ? !email.equals(user.email) : user.email != null) return false;
    if (fullName != null ? !fullName.equals(user.fullName) : user.fullName != null) return false;
    if (id != null ? !id.equals(user.id) : user.id != null) return false;
    if (imageUrl != null ? !imageUrl.equals(user.imageUrl) : user.imageUrl != null) return false;
    if (lastVisit != null ? !lastVisit.equals(user.lastVisit) : user.lastVisit != null)
      return false;
    if (password != null ? !password.equals(user.password) : user.password != null) return false;
    if (roles != null ? !roles.equals(user.roles) : user.roles != null) return false;
    if (signInProvider != user.signInProvider) return false;
    if (tokenConfirmation != null
        ? !tokenConfirmation.equals(user.tokenConfirmation)
        : user.tokenConfirmation != null) return false;
    if (username != null ? !username.equals(user.username) : user.username != null) return false;

    return true;
  }
Exemple #10
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Utente other = (Utente) obj;
   if (cognome == null) {
     if (other.cognome != null) return false;
   } else if (!cognome.equals(other.cognome)) return false;
   if (dataDiNascita == null) {
     if (other.dataDiNascita != null) return false;
   } else if (!dataDiNascita.equals(other.dataDiNascita)) return false;
   if (dataDiRegistrazione == null) {
     if (other.dataDiRegistrazione != null) return false;
   } else if (!dataDiRegistrazione.equals(other.dataDiRegistrazione)) return false;
   if (id != other.id) return false;
   if (indirizzo == null) {
     if (other.indirizzo != null) return false;
   } else if (!indirizzo.equals(other.indirizzo)) return false;
   if (mail == null) {
     if (other.mail != null) return false;
   } else if (!mail.equals(other.mail)) return false;
   if (nome == null) {
     if (other.nome != null) return false;
   } else if (!nome.equals(other.nome)) return false;
   if (password != other.password) return false;
   return true;
 }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    MApnSessionEntity that = (MApnSessionEntity) o;

    if (creatorId != null ? !creatorId.equals(that.creatorId) : that.creatorId != null)
      return false;
    if (creatorTime != null ? !creatorTime.equals(that.creatorTime) : that.creatorTime != null)
      return false;
    if (delFlag != null ? !delFlag.equals(that.delFlag) : that.delFlag != null) return false;
    if (description != null ? !description.equals(that.description) : that.description != null)
      return false;
    if (id != null ? !id.equals(that.id) : that.id != null) return false;
    if (lastModifiedId != null
        ? !lastModifiedId.equals(that.lastModifiedId)
        : that.lastModifiedId != null) return false;
    if (lastModifiedTime != null
        ? !lastModifiedTime.equals(that.lastModifiedTime)
        : that.lastModifiedTime != null) return false;
    if (loginType != null ? !loginType.equals(that.loginType) : that.loginType != null)
      return false;
    if (onlineStatus != null ? !onlineStatus.equals(that.onlineStatus) : that.onlineStatus != null)
      return false;
    if (token != null ? !token.equals(that.token) : that.token != null) return false;
    if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;

    return true;
  }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    CassandraEndpointNotification that = (CassandraEndpointNotification) o;

    if (nfVersion != that.nfVersion) return false;
    if (applicationId != null
        ? !applicationId.equals(that.applicationId)
        : that.applicationId != null) return false;
    if (body != null ? !body.equals(that.body) : that.body != null) return false;
    if (endpointKeyHash != null
        ? !endpointKeyHash.equals(that.endpointKeyHash)
        : that.endpointKeyHash != null) return false;
    if (expiredAt != null ? !expiredAt.equals(that.expiredAt) : that.expiredAt != null)
      return false;
    if (id != null ? !id.equals(that.id) : that.id != null) return false;
    if (lastModifyTime != null
        ? !lastModifyTime.equals(that.lastModifyTime)
        : that.lastModifyTime != null) return false;
    if (schemaId != null ? !schemaId.equals(that.schemaId) : that.schemaId != null) return false;
    if (seqNum != null ? !seqNum.equals(that.seqNum) : that.seqNum != null) return false;
    if (type != that.type) return false;

    return true;
  }
Exemple #13
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Mapping other = (Mapping) obj;
   if (components == null) {
     if (other.components != null) return false;
   } else if (!components.equals(other.components)) return false;
   if (createdOn == null) {
     if (other.createdOn != null) return false;
   } else if (!createdOn.equals(other.createdOn)) return false;
   if (description == null) {
     if (other.description != null) return false;
   } else if (!description.equals(other.description)) return false;
   if (lastUpdatedOn == null) {
     if (other.lastUpdatedOn != null) return false;
   } else if (!lastUpdatedOn.equals(other.lastUpdatedOn)) return false;
   if (links == null) {
     if (other.links != null) return false;
   } else if (!links.equals(other.links)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (resources == null) {
     if (other.resources != null) return false;
   } else if (!resources.equals(other.resources)) return false;
   if (version == null) {
     if (other.version != null) return false;
   } else if (!version.equals(other.version)) return false;
   return true;
 }
Exemple #14
0
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    User pojo = (User) o;

    if (version != null ? !version.equals(pojo.version) : pojo.version != null) return false;
    if (addTime != null ? !addTime.equals(pojo.addTime) : pojo.addTime != null) return false;
    if (updateTime != null ? !updateTime.equals(pojo.updateTime) : pojo.updateTime != null)
      return false;
    if (username != null ? !username.equals(pojo.username) : pojo.username != null) return false;
    if (nickname != null ? !nickname.equals(pojo.nickname) : pojo.nickname != null) return false;
    if (password != null ? !password.equals(pojo.password) : pojo.password != null) return false;
    if (photo != null ? !photo.equals(pojo.photo) : pojo.photo != null) return false;
    if (realname != null ? !realname.equals(pojo.realname) : pojo.realname != null) return false;
    if (birthday != null ? !birthday.equals(pojo.birthday) : pojo.birthday != null) return false;
    if (constellation != null
        ? !constellation.equals(pojo.constellation)
        : pojo.constellation != null) return false;
    if (birthAttrib != null ? !birthAttrib.equals(pojo.birthAttrib) : pojo.birthAttrib != null)
      return false;
    if (marital != null ? !marital.equals(pojo.marital) : pojo.marital != null) return false;
    if (intro != null ? !intro.equals(pojo.intro) : pojo.intro != null) return false;
    if (website != null ? !website.equals(pojo.website) : pojo.website != null) return false;

    return true;
  }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    CheckInfo that = (CheckInfo) o;

    if (getId() != that.getId()) return false;
    if (chkStatus != null ? !chkStatus.equals(that.chkStatus) : that.chkStatus != null)
      return false;
    if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null)
      return false;
    if (partnerId != null ? !partnerId.equals(that.partnerId) : that.partnerId != null)
      return false;
    if (productCode != null ? !productCode.equals(that.productCode) : that.productCode != null)
      return false;
    if (productName != null ? !productName.equals(that.productName) : that.productName != null)
      return false;
    if (productType != null ? !productType.equals(that.productType) : that.productType != null)
      return false;
    if (tradeAmount != null ? !tradeAmount.equals(that.tradeAmount) : that.tradeAmount != null)
      return false;
    if (tradeDate != null ? !tradeDate.equals(that.tradeDate) : that.tradeDate != null)
      return false;
    if (tradeNo != null ? !tradeNo.equals(that.tradeNo) : that.tradeNo != null) return false;
    if (tradeType != null ? !tradeType.equals(that.tradeType) : that.tradeType != null)
      return false;
    if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null)
      return false;

    return true;
  }
Exemple #16
0
  public void puntos() {
    FacesContext context = FacesContext.getCurrentInstance();

    Date oct = new Date(1986, 10, 7);
    Date dic = new Date(2013, 12, 23);
    if (aniversario.equals(dic)) {
      puntos += 20;
    }
    if (cumple.equals(oct)) {
      puntos += 20;
    }
    if (numColor == 2) {
      puntos += 20;
    }
    if (quieres == 100) {
      puntos += 20;
    }
    if (boda == 1) {
      puntos += 20;
    }
    context.addMessage(null, new FacesMessage("Total de puntos", puntos + ""));
    context.addMessage(
        null,
        new FacesMessage(
            "Sorry", "No me puedes ganar por que yo te quiero al infinito y mas alla"));
  }
Exemple #17
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Role other = (Role) obj;
   if (code == null) {
     if (other.code != null) return false;
   } else if (!code.equals(other.code)) return false;
   if (createTime == null) {
     if (other.createTime != null) return false;
   } else if (!createTime.equals(other.createTime)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (isvalid == null) {
     if (other.isvalid != null) return false;
   } else if (!isvalid.equals(other.isvalid)) return false;
   if (modifyTime == null) {
     if (other.modifyTime != null) return false;
   } else if (!modifyTime.equals(other.modifyTime)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (status == null) {
     if (other.status != null) return false;
   } else if (!status.equals(other.status)) return false;
   return true;
 }
Exemple #18
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Ride other = (Ride) obj;
   if (arr == null) {
     if (other.arr != null) return false;
   } else if (!arr.equals(other.arr)) return false;
   if (dep == null) {
     if (other.dep != null) return false;
   } else if (!dep.equals(other.dep)) return false;
   if (dest == null) {
     if (other.dest != null) return false;
   } else if (!dest.equals(other.dest)) return false;
   if (duration != other.duration) return false;
   if (eco != other.eco) return false;
   if (fast != other.fast) return false;
   if (fun != other.fun) return false;
   if (green != other.green) return false;
   if (mode != other.mode) return false;
   if (orig == null) {
     if (other.orig != null) return false;
   } else if (!orig.equals(other.orig)) return false;
   if (price != other.price) return false;
   if (social != other.social) return false;
   return true;
 }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    BahmniObservation that = (BahmniObservation) o;

    if (conceptSortWeight != that.conceptSortWeight) return false;
    if (duration != null ? !duration.equals(that.duration) : that.duration != null) return false;
    if (encounterDateTime != null
        ? !encounterDateTime.equals(that.encounterDateTime)
        : that.encounterDateTime != null) return false;
    if (encounterTransactionObservation != null
        ? !encounterTransactionObservation.equals(that.encounterTransactionObservation)
        : that.encounterTransactionObservation != null) return false;
    if (groupMembers != null ? !groupMembers.equals(that.groupMembers) : that.groupMembers != null)
      return false;
    if (isAbnormal != null ? !isAbnormal.equals(that.isAbnormal) : that.isAbnormal != null)
      return false;
    if (providers != null ? !providers.equals(that.providers) : that.providers != null)
      return false;
    if (targetObsRelation != null
        ? !targetObsRelation.equals(that.targetObsRelation)
        : that.targetObsRelation != null) return false;
    if (type != null ? !type.equals(that.type) : that.type != null) return false;
    if (visitStartDateTime != null
        ? !visitStartDateTime.equals(that.visitStartDateTime)
        : that.visitStartDateTime != null) return false;

    return true;
  }
Exemple #20
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   User other = (User) obj;
   if (Address == null) {
     if (other.Address != null) return false;
   } else if (!Address.equals(other.Address)) return false;
   if (CcCode == null) {
     if (other.CcCode != null) return false;
   } else if (!CcCode.equals(other.CcCode)) return false;
   if (Contact == null) {
     if (other.Contact != null) return false;
   } else if (!Contact.equals(other.Contact)) return false;
   if (CreationDate == null) {
     if (other.CreationDate != null) return false;
   } else if (!CreationDate.equals(other.CreationDate)) return false;
   if (ExpirationDate == null) {
     if (other.ExpirationDate != null) return false;
   } else if (!ExpirationDate.equals(other.ExpirationDate)) return false;
   if (FirstName == null) {
     if (other.FirstName != null) return false;
   } else if (!FirstName.equals(other.FirstName)) return false;
   if (LastName == null) {
     if (other.LastName != null) return false;
   } else if (!LastName.equals(other.LastName)) return false;
   if (SecurityCode == null) {
     if (other.SecurityCode != null) return false;
   } else if (!SecurityCode.equals(other.SecurityCode)) return false;
   return true;
 }
Exemple #21
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Rezerwacja that = (Rezerwacja) o;

    if (id != that.id) return false;
    if (rabat != that.rabat) return false;
    if (potwierdzenieRezerwacji != that.potwierdzenieRezerwacji) return false;
    if (klient != null ? !klient.equals(that.klient) : that.klient != null) return false;
    if (kategoriaPojazdu != null
        ? !kategoriaPojazdu.equals(that.kategoriaPojazdu)
        : that.kategoriaPojazdu != null) return false;
    if (miejsceOdbioru != null
        ? !miejsceOdbioru.equals(that.miejsceOdbioru)
        : that.miejsceOdbioru != null) return false;
    if (sposobDostarczeniaRezerwacji != null
        ? !sposobDostarczeniaRezerwacji.equals(that.sposobDostarczeniaRezerwacji)
        : that.sposobDostarczeniaRezerwacji != null) return false;
    if (dataWypozyczenia != null
        ? !dataWypozyczenia.equals(that.dataWypozyczenia)
        : that.dataWypozyczenia != null) return false;
    return dataOddania != null ? dataOddania.equals(that.dataOddania) : that.dataOddania == null;
  }
Exemple #22
0
 public boolean isCurrent() {
   Date currentDate = DateUtils.truncate(new Date(), Calendar.DAY_OF_MONTH);
   Date established = DateUtils.truncate(getEstablished(), Calendar.DAY_OF_MONTH);
   Date dueTo = DateUtils.truncate(getDueTo(), Calendar.DAY_OF_MONTH);
   return isActive()
       && ((established.before(currentDate) || established.equals(currentDate))
           && (dueTo.after(currentDate) || dueTo.equals(currentDate)));
 }
Exemple #23
0
 /** @tests java.util.Date#equals(java.lang.Object) */
 public void test_equalsLjava_lang_Object() {
   // Test for method boolean java.util.Date.equals(java.lang.Object)
   Date d1 = new Date(0);
   Date d2 = new Date(1900000);
   Date d3 = new Date(1900000);
   assertTrue("Equality test failed", d2.equals(d3));
   assertTrue("Equality test failed", !d1.equals(d2));
 }
 /** Test the list feed instances api using an orderBy parameter. Check the order. */
 @Test
 public void testFeedOrderBy()
     throws URISyntaxException, OozieClientException, JAXBException, AuthenticationException,
         IOException, InterruptedException {
   SoftAssert softAssert = new SoftAssert();
   // orderBy start time
   InstancesResult r =
       prism.getFeedHelper().listInstances(feedName, "orderBy=startTime&sortOrder=desc", null);
   InstancesResult.Instance[] instances = r.getInstances();
   Date previousDate = new Date();
   for (InstancesResult.Instance instance : instances) {
     Date current = instance.getStartTime();
     if (current != null) { // e.g if instance is WAITING it doesn't have start time
       softAssert.assertTrue(
           current.before(previousDate) || current.equals(previousDate),
           "Wrong order. Current startTime :" + current + " Previous: " + previousDate);
       previousDate = (Date) current.clone();
     }
   }
   // orderBy status
   r =
       prism
           .getFeedHelper()
           .listInstances(
               feedName,
               "start=" + startTime + "&numResults=12&orderBy=status&sortOrder=desc",
               null);
   InstanceUtil.validateResponse(r, 12, 1, 1, 4, 6);
   instances = r.getInstances();
   InstancesResult.WorkflowStatus previousStatus = InstancesResult.WorkflowStatus.WAITING;
   for (InstancesResult.Instance instance : instances) {
     InstancesResult.WorkflowStatus current = instance.getStatus();
     softAssert.assertTrue(
         current.toString().compareTo(previousStatus.toString()) <= 0,
         "Wrong order. Compared " + current + " and " + previousStatus + " statuses.");
     previousStatus = current;
   }
   // sort by endTime
   r =
       prism
           .getFeedHelper()
           .listInstances(
               feedName,
               "start=" + startTime + "&numResults=12&orderBy=endTime&sortOrder=desc",
               null);
   instances = r.getInstances();
   previousDate = new Date();
   for (InstancesResult.Instance instance : instances) {
     Date current = instance.getEndTime();
     if (current != null) { // e.g if instance is WAITING it doesn't have end time
       softAssert.assertTrue(
           current.before(previousDate) || current.equals(previousDate),
           "Wrong order. Current startTime :" + current + " Previous: " + previousDate);
       previousDate = (Date) current.clone();
     }
   }
   softAssert.assertAll();
 }
 @Override
 public boolean equals(final Object obj) {
   if (this == obj) {
     return true;
   }
   if (!super.equals(obj)) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   PersonAddress other = (PersonAddress) obj;
   if (apartment == null) {
     if (other.apartment != null) {
       return false;
     }
   } else if (!apartment.equals(other.apartment)) {
     return false;
   }
   if (begDate == null) {
     if (other.begDate != null) {
       return false;
     }
   } else if (!begDate.equals(other.begDate)) {
     return false;
   }
   if (endDate == null) {
     if (other.endDate != null) {
       return false;
     }
   } else if (!endDate.equals(other.endDate)) {
     return false;
   }
   if (house == null) {
     if (other.house != null) {
       return false;
     }
   } else if (!house.equals(other.house)) {
     return false;
   }
   if (street == null) {
     if (other.street != null) {
       return false;
     }
   } else if (!street.equals(other.street)) {
     return false;
   }
   if (zipCode == null) {
     if (other.zipCode != null) {
       return false;
     }
   } else if (!zipCode.equals(other.zipCode)) {
     return false;
   }
   return true;
 }
 @Override
 public boolean equals(final Object obj) {
   if (this == obj) {
     return true;
   }
   if (!super.equals(obj)) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   SpecOfferWave other = (SpecOfferWave) obj;
   if (benefitCount == null) {
     if (other.benefitCount != null) {
       return false;
     }
   } else if (!benefitCount.equals(other.benefitCount)) {
     return false;
   }
   if (licCount == null) {
     if (other.licCount != null) {
       return false;
     }
   } else if (!licCount.equals(other.licCount)) {
     return false;
   }
   if (stateCount == null) {
     if (other.stateCount != null) {
       return false;
     }
   } else if (!stateCount.equals(other.stateCount)) {
     return false;
   }
   if (targetCount == null) {
     if (other.targetCount != null) {
       return false;
     }
   } else if (!targetCount.equals(other.targetCount)) {
     return false;
   }
   if (beginDate == null) {
     if (other.beginDate != null) {
       return false;
     }
   } else if (!beginDate.equals(other.beginDate)) {
     return false;
   }
   if (endDate == null) {
     if (other.endDate != null) {
       return false;
     }
   } else if (!endDate.equals(other.endDate)) {
     return false;
   }
   return true;
 }
Exemple #27
0
 @Test
 public void testBeginningOfMonth() {
   Date testDate = DateUtils.date(2011, 3, 3);
   Date beginningOfMonthDate = DateUtils.date(2011, 3, 1);
   testDate = DateUtils.beginningOfMonth(testDate);
   assert testDate.equals(beginningOfMonthDate) : "Beginning of month does not match";
   testDate = DateUtils.date(2011, 3, 1);
   testDate = DateUtils.beginningOfMonth(testDate);
   assert testDate.equals(beginningOfMonthDate) : "Beginning of month does not match";
 }
  // ---------------------------------------------------------------------------
  private Vector filterJobs(java.util.List allJobs, java.util.Date effDate)
      throws java.lang.Exception {
    Vector filteredList = new Vector();

    java.util.Date jobStartDate = new java.util.Date();
    java.util.Date jobEndDate = new java.util.Date();

    ListIterator results = allJobs.listIterator();
    while (results.hasNext()) {
      JobAssignment jobAssignment = (JobAssignment) results.next();

      logger.debug(
          "direct values in Translator_RetroJobChange:filterJobs, jobStartDate => "
              + jobAssignment.getBaseJobData().getStartDate()
              + " jobEndDate => "
              + jobAssignment.getBaseJobData().getEndDate()
              + " effDate => "
              + effDate);

      // add this job only if it was active on effDate selected from ERV
      if (validateState(formatDate(jobAssignment.getBaseJobData().getStartDate())))
        jobStartDate =
            convertToDate(
                formatDate(
                    jobAssignment
                        .getBaseJobData()
                        .getStartDate())); // Can start date be a null? I don't know!

      if (hasValue(jobAssignment.getBaseJobData().getEndDate())) {
        jobEndDate = convertToDate(formatDate(jobAssignment.getBaseJobData().getEndDate()));
      } else {
        // Use today's date if job assignment's end date is null, which means the job is active as
        // of today
        jobEndDate = new java.util.Date();
      }

      logger.debug(
          "Translator_RetroJobChange:filterJobs, jobStartDate => "
              + jobStartDate
              + " jobEndDate => "
              + jobEndDate
              + " effDate => "
              + effDate);
      if ((effDate.after(jobStartDate) && effDate.before(jobEndDate))
          || effDate.equals(jobStartDate)
          || effDate.equals(jobEndDate)) {
        logger.debug("criteria met, adding this jobAssignment => " + jobAssignment);
        filteredList.add(jobAssignment);
      }
    }

    logger.debug("num of filtered JobAssignment objects => " + filteredList.size());
    return filteredList;
  }
 @Override
 public boolean equals(Object o) {
   if (this == o) {
     return true;
   } else if (o instanceof ImmutableDateTimePeriod) {
     final ImmutableDateTimePeriod that = ImmutableDateTimePeriod.class.cast(o);
     return start.equals(that.start) && end.equals(that.end);
   } else {
     return false;
   }
 }
 private AppointmentInterface findAppt(
     String start, String end, ArrayList<AppointmentInterface> appts) {
   DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss");
   Date st = dtf.parse(start);
   Date ed = dtf.parse(end);
   for (int i = 0; i < appts.size(); i++) {
     if (st.equals(appts.get(i).getStart()) && ed.equals(appts.get(i).getEnd())) {
       return appts.get(i);
     }
   }
   return null; // couldn't find it!
 }