/**
   * creates a clone of this object, the OrderAssocId field is not cloned.
   *
   * @return OrderAssocData object
   */
  public Object clone() {
    OrderAssocData myClone = new OrderAssocData();

    myClone.mOrder1Id = mOrder1Id;

    myClone.mOrder2Id = mOrder2Id;

    myClone.mOrderAssocCd = mOrderAssocCd;

    myClone.mOrderAssocStatusCd = mOrderAssocStatusCd;

    if (mAddDate != null) {
      myClone.mAddDate = (Date) mAddDate.clone();
    }

    myClone.mAddBy = mAddBy;

    if (mModDate != null) {
      myClone.mModDate = (Date) mModDate.clone();
    }

    myClone.mModBy = mModBy;

    myClone.mWorkOrderItemId = mWorkOrderItemId;

    myClone.mServiceTicketId = mServiceTicketId;

    return myClone;
  }
  /**
   * creates a clone of this object, the ProductViewDefId field is not cloned.
   *
   * @return ProductViewDefData object
   */
  public Object clone() {
    ProductViewDefData myClone = new ProductViewDefData();

    myClone.mStatusCd = mStatusCd;

    myClone.mAccountId = mAccountId;

    myClone.mAttributename = mAttributename;

    myClone.mSortOrder = mSortOrder;

    myClone.mWidth = mWidth;

    myClone.mStyleClass = mStyleClass;

    myClone.mProductViewCd = mProductViewCd;

    if (mAddDate != null) {
      myClone.mAddDate = (Date) mAddDate.clone();
    }

    myClone.mAddBy = mAddBy;

    if (mModDate != null) {
      myClone.mModDate = (Date) mModDate.clone();
    }

    myClone.mModBy = mModBy;

    return myClone;
  }
Exemple #3
0
  /**
   * creates a clone of this object, the EventId field is not cloned.
   *
   * @return EventData object
   */
  public Object clone() {
    EventData myClone = new EventData();

    myClone.mType = mType;

    myClone.mStatus = mStatus;

    myClone.mCd = mCd;

    myClone.mAttempt = mAttempt;

    if (mAddDate != null) {
      myClone.mAddDate = (Date) mAddDate.clone();
    }

    myClone.mAddBy = mAddBy;

    if (mModDate != null) {
      myClone.mModDate = (Date) mModDate.clone();
    }

    myClone.mModBy = mModBy;

    myClone.mEventPriority = mEventPriority;

    if (mProcessTime != null) {
      myClone.mProcessTime = (Date) mProcessTime.clone();
    }

    return myClone;
  }
  /**
   * First find a budget period that matches the start and end date. If that is found, find a
   * subaward period detail with the same budget period number.
   *
   * @param budget
   * @param budgetSubAward
   * @param startDate
   * @param endDate
   * @return
   */
  protected BudgetSubAwardPeriodDetail findBudgetSubAwardPeriodDetail(
      Budget budget, BudgetSubAwards budgetSubAward, Date startDate, Date endDate) {
    BudgetPeriod matchingPeriod = null;
    BudgetSubAwardPeriodDetail matchingDetail = null;
    for (BudgetPeriod period : budget.getBudgetPeriods()) {
      if (startDate.getTime() == period.getStartDate().getTime()
          && endDate.getTime() == period.getEndDate().getTime()) {
        matchingPeriod = period;
        break;
      }
    }
    if (matchingPeriod != null) {

      for (BudgetSubAwardPeriodDetail detail : budgetSubAward.getBudgetSubAwardPeriodDetails()) {
        if (ObjectUtils.equals(detail.getBudgetPeriod(), matchingPeriod.getBudgetPeriod())) {
          matchingDetail = detail;
          break;
        }
      }
    }
    return matchingDetail;
  }