コード例 #1
0
 /**
  * Builds a URI for this resource.
  *
  * @param data the data, not null
  * @param overrideVersionId the override version id, null uses information from data
  * @return the URI, not null
  */
 public static URI uri(final WebHolidayData data, final UniqueId overrideVersionId) {
   String holidayId = data.getBestHolidayUriId(null);
   String versionId =
       StringUtils.defaultString(
           overrideVersionId != null ? overrideVersionId.getVersion() : data.getUriVersionId());
   return data.getUriInfo()
       .getBaseUriBuilder()
       .path(WebHolidayVersionResource.class)
       .build(holidayId, versionId);
 }
コード例 #2
0
 @Override
 public boolean equals(Object obj) {
   if (obj == this) {
     return true;
   }
   if (obj != null && obj.getClass() == this.getClass()) {
     WebHolidayData other = (WebHolidayData) obj;
     return JodaBeanUtils.equal(getHolidayMaster(), other.getHolidayMaster())
         && JodaBeanUtils.equal(getUriInfo(), other.getUriInfo())
         && JodaBeanUtils.equal(getUriHolidayId(), other.getUriHolidayId())
         && JodaBeanUtils.equal(getUriVersionId(), other.getUriVersionId())
         && JodaBeanUtils.equal(getHoliday(), other.getHoliday())
         && JodaBeanUtils.equal(getVersioned(), other.getVersioned());
   }
   return false;
 }