Package br.com.visualmidia.tools

Examples of br.com.visualmidia.tools.MergeSortAlgorithm.sortParcelByDate()


            String text = "";
            Billet billet = null;
      if(oneStudents.getSelection()){
        List<Parcel> parcels = selectedRegistration.getParcels();
        MergeSortAlgorithm sort = new MergeSortAlgorithm();
        sort.sortParcelByDate(parcels);
       
        for (Parcel parcel : parcels) {
                    if(parcelIsSelected(parcelId, getSelectedParcels())) {
                        billet = new Billet(String.valueOf(parcelId), parcel, selectedRegistration, selectedRegistration.getStudent(), getNamePrint(selectedRegistration));
                        billets.add(billet);
View Full Code Here


                MergeSortAlgorithm sortAlgorithm = new MergeSortAlgorithm();
               
                for (Registration registration : registrationMap.values()) {
                    List<Parcel> parcels = registration.getParcels();
                    if(parcels.size() > 1){
                      sortAlgorithm.sortParcelByDate(parcels);
                      GDDate dateParcel = new GDDate(parcels.get(parcels.size()-1).getDate());
                      if(registration.isActive() && ignoreDate ? true : (dateParcel.beforeOrEqualsDay(finishDate) && dateParcel.afterOrEqualsDay(startDate))) {
                        registrationList.add(registration);
                       
                      }
View Full Code Here

                  if (registration.isActive()) {
                      int parcelsTotal = 0;
                      int parcelsPayed = 0;
                      List<Parcel> parcels = registration.getParcels();
                     
                      sortAlgorithm.sortParcelByDate(parcels);
                     
                      Parcel lastParcel = parcels.get(parcels.size()-1);
                      totalParcel.credit(lastParcel.isPayed()? lastParcel.getPayValue() : new GDDate(lastParcel.getDate()).beforeDay(new GDDate()) ? lastParcel.getValueAfterParcelDateExpiration() : lastParcel.getValueBeforeParcelDateExpiration());
                      for(Parcel parcel : parcels) {
                          parcelsTotal++;
View Full Code Here

      discountingText.setText(new Money(registration.getRegistrationDiscountValue()).getFormatedValue());
      pontualityDiscountingText.setText(registration.getPontualityDiscount().getFormatedValue());
     
      registrationParcelList = registration.getParcels();
            MergeSortAlgorithm sort = new MergeSortAlgorithm();
      sort.sortParcelByDate(registrationParcelList);
     
      for (int i = 0; i < registrationParcelList.size(); i++) {
        Parcel parcel = registrationParcelList.get(i);
       
        TableItem item = new TableItem(paymentTable, SWT.NONE);
View Full Code Here

    } else {
      List<Parcel> parcels = _registration.getParcels();

      if (parcels.size() > 1) {
        MergeSortAlgorithm sort = new MergeSortAlgorithm();
        sort.sortParcelByDate(parcels);
        GDDate date = new GDDate(parcels.get(parcels.size() - 1)
            .getDate());
        date.addMonth(1);
        dateText.setValue(date.getDate());
      } else {
View Full Code Here

        try {
            paymentTable.removeAll();
            registration = (Registration) system.query(new GetRegistration(registrationId));
            List<Parcel> parcels = registration.getParcels();
            MergeSortAlgorithm sort = new MergeSortAlgorithm();
      sort.sortParcelByDate(parcels);
           
            float payTotal = 0;
            for (int i = 0; i < parcels.size(); i++) {
                Parcel parcel = (Parcel) parcels.get(i);
               
View Full Code Here

                if (paymentTable.getSelectionIndex() >= 0) {
                    setMessage("Selecione uma parcela para efetuar a altera��o", IMessageProvider.INFORMATION);

                    List<Parcel> list = registration.getParcels();
                    MergeSortAlgorithm sort = new MergeSortAlgorithm();
              sort.sortParcelByDate(list);
             
                    Parcel parcel = list.get(Integer.parseInt(paymentTable.getSelection()[0].getText())-1);

                    if (!parcel.isPayed()) {
                        new ParcelPaymentDialog(getShell(), getMySelf(), registration, canBePaid(list, parcel), Integer.parseInt(paymentTable.getSelection()[0].getText())-1).open();
View Full Code Here

                if (paymentTable.getSelectionIndex() >= 0) {
                    setMessage(MESSAGE, IMessageProvider.INFORMATION);

                    List<Parcel> list = registration.getParcels();
                    MergeSortAlgorithm sort = new MergeSortAlgorithm();
              sort.sortParcelByDate(list);
                    if(list.size() > 0){
                      Parcel parcel = list.get(paymentTable.getSelectionIndex());
                      if (!parcel.isPayed()) {
                        new SplitParcelDialog(getShell(), getMySelf(), registration, paymentTable.getSelectionIndices()).open();
                      } else {
View Full Code Here

         try {
             Map<String, Registration> registrations = (Map<String, Registration>) system.query(new GetRegistration());
             for (Registration registration : registrations.values()) {
               List<Parcel> parcels = registration.getParcels();
          MergeSortAlgorithm sort = new MergeSortAlgorithm();
          sort.sortParcelByDate(parcels);
         
                 for (Parcel parcel : parcels) {
                     final GDDate parcelDate = new GDDate(parcel.getDate());
                     if(!parcel.isPayed() && parcelDate.beforeOrEqualsDay(finalDate) && parcelDate.afterOrEqualsDay(initialDate) && parcelDate.beforeDay(today)){
                         Person person = (Person) system.query(new GetPerson(registration.getIdPerson()));
View Full Code Here

  }

  private List<Parcel> getNewParcelList() {
    List<Parcel> parcelList = registration.getParcels();
    MergeSortAlgorithm sort = new MergeSortAlgorithm();
    sort.sortParcelByDate(parcelList);

    this.parcelList = new ArrayList<Parcel>();

    for (int j = 0; j < parcelList.size(); j++) {
      Parcel parcel = parcelList.get(j);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.