@Override
 public int hashCode() {
   int result = termID != null ? termID.hashCode() : 0;
   result = 31 * result + (nachtMo != null ? nachtMo.hashCode() : 0);
   result = 31 * result + (morgens != null ? morgens.hashCode() : 0);
   result = 31 * result + (mittags != null ? mittags.hashCode() : 0);
   result = 31 * result + (nachmittags != null ? nachmittags.hashCode() : 0);
   result = 31 * result + (abends != null ? abends.hashCode() : 0);
   result = 31 * result + (nachtAb != null ? nachtAb.hashCode() : 0);
   result = 31 * result + (uhrzeitAnzahl != null ? uhrzeitAnzahl.hashCode() : 0);
   result = 31 * result + (uhrzeit != null ? uhrzeit.hashCode() : 0);
   result = 31 * result + (taeglich != null ? taeglich.hashCode() : 0);
   result = 31 * result + (woechentlich != null ? woechentlich.hashCode() : 0);
   result = 31 * result + (monatlich != null ? monatlich.hashCode() : 0);
   result = 31 * result + (tagNum != null ? tagNum.hashCode() : 0);
   result = 31 * result + (mon != null ? mon.hashCode() : 0);
   result = 31 * result + (die != null ? die.hashCode() : 0);
   result = 31 * result + (mit != null ? mit.hashCode() : 0);
   result = 31 * result + (don != null ? don.hashCode() : 0);
   result = 31 * result + (fre != null ? fre.hashCode() : 0);
   result = 31 * result + (sam != null ? sam.hashCode() : 0);
   result = 31 * result + (son != null ? son.hashCode() : 0);
   result = 31 * result + (erforderlich != null ? erforderlich.hashCode() : 0);
   result = 31 * result + (lDatum != null ? lDatum.hashCode() : 0);
   result = 31 * result + (dauer != null ? dauer.hashCode() : 0);
   result = 31 * result + (bemerkung != null ? bemerkung.hashCode() : 0);
   result = 31 * result + (version != null ? version.hashCode() : 0);
   result = 31 * result + (nursingProcess != null ? nursingProcess.hashCode() : 0);
   result = 31 * result + (intervention != null ? intervention.hashCode() : 0);
   return result;
 }
 private static String generateToken() {
   final StringBuilder builder = new StringBuilder(260);
   while (builder.length() < 256) {
     builder.append(Long.toHexString(TOKEN_GENERATOR.nextLong()));
   }
   return builder.substring(0, 256);
 }
示例#3
0
  @Override
  public boolean equals(Object obj) {

    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (!(obj instanceof Rule)) {
      return false;
    }
    Rule other = (Rule) obj;

    // if item is persisted use only the id for checking
    if (id != null && id != 0L) {
      return id.equals(other.id);
    }

    if (id == null) {
      if (other.id != null) {
        return false;
      }
    } else if (!id.equals(other.id)) {
      return false;
    }
    if (name == null) {
      if (other.name != null) {
        return false;
      }
    } else if (!name.equals(other.name)) {
      return false;
    }
    return true;
  }
示例#4
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    CmsArticleEntity that = (CmsArticleEntity) o;

    if (id != that.id) return false;
    if (articleClassId != null
        ? !articleClassId.equals(that.articleClassId)
        : that.articleClassId != null) return false;
    if (articleState != null ? !articleState.equals(that.articleState) : that.articleState != null)
      return false;
    if (content != null ? !content.equals(that.content) : that.content != null) return false;
    if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null)
      return false;
    if (createUserId != null ? !createUserId.equals(that.createUserId) : that.createUserId != null)
      return false;
    if (hits != null ? !hits.equals(that.hits) : that.hits != null) return false;
    if (summary != null ? !summary.equals(that.summary) : that.summary != null) return false;
    if (title != null ? !title.equals(that.title) : that.title != null) return false;
    if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null)
      return false;
    if (updateUserId != null ? !updateUserId.equals(that.updateUserId) : that.updateUserId != null)
      return false;

    return true;
  }
示例#5
0
 public int compareTo(Object o) {
   if (o instanceof Comment) {
     // Don't compare Date objects! Use the time in milliseconds!
     return Long.valueOf(this.getCreated().getTime())
         .compareTo(Long.valueOf(((Comment) o).getCreated().getTime()));
   }
   return 0;
 }
示例#6
0
 @Override
 public int hashCode() {
   int result = id != null ? id.hashCode() : 0;
   result = 31 * result + (orderNum != null ? orderNum.hashCode() : 0);
   result = 31 * result + (description != null ? description.hashCode() : 0);
   result = 31 * result + (link != null ? link.hashCode() : 0);
   result = 31 * result + (lesson != null ? lesson.hashCode() : 0);
   return result;
 }
示例#7
0
 @Override
 public int hashCode() {
   int result = codigo != null ? codigo.hashCode() : 0;
   result = 31 * result + (nombre != null ? nombre.hashCode() : 0);
   result = 31 * result + (duracion != null ? duracion.hashCode() : 0);
   result = 31 * result + (especialidad != null ? especialidad.hashCode() : 0);
   result = 31 * result + (profesor != null ? profesor.hashCode() : 0);
   return result;
 }
 @Override
 public RestaurantLanguageDTO toDTO() {
   RestaurantLanguageDTO dto =
       new RestaurantLanguageDTO(
           id == null ? null : id.toString(),
           name,
           address,
           introduce,
           languageCode == null ? null : languageCode.toString(),
           restaurantId == null ? null : restaurantId.toString());
   return dto;
 }
示例#9
0
  @Override
  public int hashCode() {
    // if item is persisted use only the id for calculating hash code
    if (id != null && id != 0L) {
      return id.hashCode();
    }

    final int prime = 31;
    int result = 1;
    result = prime * result + ((id == null) ? 0 : id.hashCode());
    result = prime * result + ((name == null) ? 0 : name.hashCode());
    return result;
  }
示例#10
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Asignatura that = (Asignatura) o;

    if (codigo != null ? !codigo.equals(that.codigo) : that.codigo != null) return false;
    if (nombre != null ? !nombre.equals(that.nombre) : that.nombre != null) return false;
    if (duracion != null ? !duracion.equals(that.duracion) : that.duracion != null) return false;
    if (especialidad != that.especialidad) return false;
    return !(profesor != null ? !profesor.equals(that.profesor) : that.profesor != null);
  }
示例#11
0
 @Override
 public int hashCode() {
   int result = (int) (id ^ (id >>> 32));
   result = 31 * result + (articleClassId != null ? articleClassId.hashCode() : 0);
   result = 31 * result + (title != null ? title.hashCode() : 0);
   result = 31 * result + (summary != null ? summary.hashCode() : 0);
   result = 31 * result + (content != null ? content.hashCode() : 0);
   result = 31 * result + (hits != null ? hits.hashCode() : 0);
   result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
   result = 31 * result + (createUserId != null ? createUserId.hashCode() : 0);
   result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
   result = 31 * result + (updateUserId != null ? updateUserId.hashCode() : 0);
   result = 31 * result + (articleState != null ? articleState.hashCode() : 0);
   return result;
 }
 /**
  * Title: equals
  *
  * <p>Description:
  *
  * @param obj
  * @return
  * @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 (getClass() != obj.getClass()) return false;
   PotentialContactPhone other = (PotentialContactPhone) obj;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (phone1 == null) {
     if (other.phone1 != null) return false;
   } else if (!phone1.equals(other.phone1)) return false;
   if (phone2 == null) {
     if (other.phone2 != null) return false;
   } else if (!phone2.equals(other.phone2)) return false;
   if (phone3 == null) {
     if (other.phone3 != null) return false;
   } else if (!phone3.equals(other.phone3)) return false;
   if (phoneNum == null) {
     if (other.phoneNum != null) return false;
   } else if (!phoneNum.equals(other.phoneNum)) return false;
   if (phoneTypeId == null) {
     if (other.phoneTypeId != null) return false;
   } else if (!phoneTypeId.equals(other.phoneTypeId)) return false;
   if (potentialContact == null) {
     if (other.potentialContact != null) return false;
   } else if (!potentialContact.equals(other.potentialContact)) return false;
   if (potentialContactId == null) {
     if (other.potentialContactId != null) return false;
   } else if (!potentialContactId.equals(other.potentialContactId)) return false;
   if (prmphn == null) {
     if (other.prmphn != null) return false;
   } else if (!prmphn.equals(other.prmphn)) return false;
   return true;
 }
示例#13
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof LessonLinkEntity)) return false;

    LessonLinkEntity that = (LessonLinkEntity) o;

    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 (orderNum != null ? !orderNum.equals(that.orderNum) : that.orderNum != null) return false;
    if (lesson != null ? !lesson.equals(that.lesson) : that.lesson != null) return false;
    if (link != null ? !link.equals(that.link) : that.link != 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;
   PhysicalResourceGroup other = (PhysicalResourceGroup) obj;
   if (id == null) {
     if (other.id != null) {
       return false;
     }
   } else if (!id.equals(other.id)) {
     return false;
   }
   if (version == null) {
     if (other.version != null) {
       return false;
     }
   } else if (!version.equals(other.version)) {
     return false;
   }
   return true;
 }
示例#15
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   Article other = (Article) obj;
   if (barcode == null) {
     if (other.barcode != null) return false;
   } else if (!barcode.equals(other.barcode)) return false;
   if (comment == null) {
     if (other.comment != null) return false;
   } else if (!comment.equals(other.comment)) return false;
   if (id == null) {
     if (other.id != null) return false;
   } else if (!id.equals(other.id)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   if (price == null) {
     if (other.price != null) return false;
   } else if (!price.equals(other.price)) return false;
   if (supplier == null) {
     if (other.supplier != null) return false;
   } else if (!supplier.equals(other.supplier)) return false;
   if (type == null) {
     if (other.type != null) return false;
   } else if (!type.equals(other.type)) return false;
   if (unit == null) {
     if (other.unit != null) return false;
   } else if (!unit.equals(other.unit)) return false;
   return true;
 }
示例#16
0
 @Override
 public int hashCode() {
   if (id != null) {
     return id.intValue();
   }
   return super.hashCode();
 }
示例#17
0
 /**
  * Instantiates a new user.
  *
  * @param id the id
  * @param userAccount the user account
  * @param lastName the last name
  * @param firstName the first name
  * @param country the country
  * @param email the email
  * @param city the city
  * @param zip the zip
  * @param streetName the street name
  * @param addressAddition the address addition
  * @param language1 the language1
  * @param language2 the language2
  * @param language3 the language3
  */
 public User(
     long id,
     UserAccount userAccount,
     String lastName,
     String firstName,
     String country,
     String email,
     String city,
     String zip,
     String streetName,
     String addressAddition,
     String language1,
     String language2,
     String language3) {
   this.userAccount = userAccount;
   this.username = userAccount.getUsername();
   this.lastName = lastName;
   this.firstName = firstName;
   this.country = country;
   this.email = email;
   this.city = city;
   this.zip = zip;
   this.streetName = streetName;
   this.addressAddition = addressAddition;
   this.language1 = language1;
   this.language2 = language2;
   this.language3 = language3;
   this.validated = false;
   this.hashcode = (lastName + firstName + Long.toString(id)).hashCode();
   this.usernameLowercase = username.toLowerCase();
 }
示例#18
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((ideUsuario == null) ? 0 : ideUsuario.hashCode());
   return result;
 }
示例#19
0
 @Override
 public int hashCode() {
   int result = id != null ? id.hashCode() : 0;
   result = 31 * result + (username != null ? username.hashCode() : 0);
   result = 31 * result + (roles != null ? roles.hashCode() : 0);
   return result;
 }
示例#20
0
 @Override
 public int hashCode() {
   int result;
   result = id.hashCode();
   result = 31 * result + orderDate.hashCode();
   return result;
 }
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    InterventionSchedule that = (InterventionSchedule) o;
    if (termID != null ? !termID.equals(that.termID) : that.termID != null) return false;
    if (abends != null ? !abends.equals(that.abends) : that.abends != null) return false;
    if (bemerkung != null ? !bemerkung.equals(that.bemerkung) : that.bemerkung != null)
      return false;
    if (dauer != null ? !dauer.equals(that.dauer) : that.dauer != null) return false;
    if (die != null ? !die.equals(that.die) : that.die != null) return false;
    if (don != null ? !don.equals(that.don) : that.don != null) return false;
    if (erforderlich != null ? !erforderlich.equals(that.erforderlich) : that.erforderlich != null)
      return false;
    if (fre != null ? !fre.equals(that.fre) : that.fre != null) return false;
    if (intervention != null ? !intervention.equals(that.intervention) : that.intervention != null)
      return false;
    if (lDatum != null ? !lDatum.equals(that.lDatum) : that.lDatum != null) return false;
    if (mit != null ? !mit.equals(that.mit) : that.mit != null) return false;
    if (mittags != null ? !mittags.equals(that.mittags) : that.mittags != null) return false;
    if (mon != null ? !mon.equals(that.mon) : that.mon != null) return false;
    if (monatlich != null ? !monatlich.equals(that.monatlich) : that.monatlich != null)
      return false;
    if (morgens != null ? !morgens.equals(that.morgens) : that.morgens != null) return false;
    if (nachmittags != null ? !nachmittags.equals(that.nachmittags) : that.nachmittags != null)
      return false;
    if (nachtAb != null ? !nachtAb.equals(that.nachtAb) : that.nachtAb != null) return false;
    if (nachtMo != null ? !nachtMo.equals(that.nachtMo) : that.nachtMo != null) return false;
    if (nursingProcess != null
        ? !nursingProcess.equals(that.nursingProcess)
        : that.nursingProcess != null) return false;
    if (sam != null ? !sam.equals(that.sam) : that.sam != null) return false;
    if (son != null ? !son.equals(that.son) : that.son != null) return false;
    if (taeglich != null ? !taeglich.equals(that.taeglich) : that.taeglich != null) return false;
    if (tagNum != null ? !tagNum.equals(that.tagNum) : that.tagNum != null) return false;
    if (uhrzeit != null ? !uhrzeit.equals(that.uhrzeit) : that.uhrzeit != null) return false;
    if (uhrzeitAnzahl != null
        ? !uhrzeitAnzahl.equals(that.uhrzeitAnzahl)
        : that.uhrzeitAnzahl != null) return false;
    if (version != null ? !version.equals(that.version) : that.version != null) return false;
    if (woechentlich != null ? !woechentlich.equals(that.woechentlich) : that.woechentlich != null)
      return false;
    if (uuid != null ? !uuid.equals(that.uuid) : that.uuid != null) return false;

    return true;
  }
示例#22
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((title == null) ? 0 : title.hashCode());
   result = prime * result + ((id == null) ? 0 : id.hashCode());
   return result;
 }
示例#23
0
 @Override
 public int hashCode() {
   int result = id.hashCode();
   result = 31 * result + title.hashCode();
   result = 31 * result + content.hashCode();
   result = 31 * result + url.hashCode();
   return result;
 }
示例#24
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (!(o instanceof ItemType)) return false;

    ItemType object = (ItemType) o;
    return !(id != null ? !id.equals(object.id) : object.id != null);
  }
示例#25
0
 @Override
 public int hashCode() {
   if (id != null) {
     return id.hashCode();
   } else {
     return super.hashCode();
   }
 }
示例#26
0
 @Override
 public int hashCode() {
   int result = id.hashCode();
   result = 31 * result + (firstName != null ? firstName.hashCode() : 0);
   result = 31 * result + (lastName != null ? lastName.hashCode() : 0);
   result = 31 * result + (comments != null ? comments.hashCode() : 0);
   return result;
 }
示例#27
0
  /**
   * Persists a Audit
   *
   * @param object
   * @param persisted
   * @param auditingType
   */
  public void audit(Object object, Object persisted, AuditingType auditingType) {

    try {

      if (isEntity(object)) {

        Field[] fields = object.getClass().getDeclaredFields();
        Method[] methods = object.getClass().getDeclaredMethods();
        Method.setAccessible(methods, true);
        Field.setAccessible(fields, true);

        AbstractAuditing auditing = Configuration.getAbstractAuditing();
        auditing.setIdentifier(Long.valueOf(getId(object).toString()));
        auditing.setEntity(getEntityName(object.getClass()));
        auditing.setAuditingType(auditingType);
        auditing.setEventDate(new Date());
        if (FacesContext.getCurrentInstance() != null) {
          auditing.setIp(FacesUtils.getIP());
        }
        auditing.setAuditClass(object.getClass());
        AbstractAuditingListener listener = Configuration.getAuditingListener();
        if (listener != null) {
          listener.onSave(auditing);
        }

        List<AbstractMetadata> metadatas = null;
        boolean auditPersited = false;
        if (auditingType.equals(AuditingType.INSERT) || auditingType.equals(AuditingType.DELETE)) {
          entityManager.persist(auditing);
          metadatas = getMetadata(object, null, auditing);
          auditPersited = true;
        } else if (auditingType.equals(AuditingType.UPDATE)) {
          metadatas = getMetadata(object, persisted, auditing);
          if (metadatas != null && !metadatas.isEmpty()) {
            entityManager.persist(auditing);
            auditPersited = true;
          }
        }

        auditing.setMetadatas(metadatas);
        // add to context
        if (auditPersited == true) {
          AuditContext context = AuditContext.getCurrentInstance();
          if (context != null) {
            context.setAuditing(object, auditing);
          }
        }

        if (metadatas != null && !metadatas.isEmpty()) {
          for (AbstractMetadata metadata : metadatas) {
            entityManager.persist(metadata);
          }
        }
      }
    } catch (Throwable t) {
      logger.log(Level.SEVERE, t.getMessage(), t);
    }
  }
 /*
  * (non-Javadoc)
  *
  * @see java.lang.Object#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   if (!super.equals(obj)) {
     return false;
   }
   if (this == obj) {
     return true;
   }
   if (!super.equals(obj)) {
     return false;
   }
   if (getClass() != obj.getClass()) {
     return false;
   }
   XXPolicyItemUserPerm other = (XXPolicyItemUserPerm) obj;
   if (id == null) {
     if (other.id != null) {
       return false;
     }
   } else if (!id.equals(other.id)) {
     return false;
   }
   if (order == null) {
     if (other.order != null) {
       return false;
     }
   } else if (!order.equals(other.order)) {
     return false;
   }
   if (policyItemId == null) {
     if (other.policyItemId != null) {
       return false;
     }
   } else if (!policyItemId.equals(other.policyItemId)) {
     return false;
   }
   if (userId == null) {
     if (other.userId != null) {
       return false;
     }
   } else if (!userId.equals(other.userId)) {
     return false;
   }
   return true;
 }
 @Override
 public int hashCode() {
   int result = (id != null) ? id.intValue() : 0;
   result = 31 * result + (desc != null ? desc.hashCode() : 0);
   result = 31 * result + (error != null ? error.hashCode() : 0);
   result = 31 * result + (username != null ? username.hashCode() : 0);
   result = 31 * result + (createdDate != null ? createdDate.hashCode() : 0);
   return result;
 }
示例#30
0
 @Override
 public int hashCode() {
   int result = id != null ? id.hashCode() : 0;
   result = 31 * result + (name != null ? name.hashCode() : 0);
   result = 31 * result + (creationTime != null ? creationTime.hashCode() : 0);
   result = 31 * result + (profile != null ? profile.hashCode() : 0);
   result = 31 * result + (booksCount != null ? booksCount.hashCode() : 0);
   return result;
 }