Package it.unisa.info13d.Login

Examples of it.unisa.info13d.Login.Entry


   * @throws ClassNotFoundException
   * @throws IOException
   */
    public int search_product_id(String user, String in_id) throws FileNotFoundException, ClassNotFoundException, IOException
    {
        Entry loggedUser = Access.get_user_data(user);
        //System.out.println("----- Shop ----");
        //System.out.println("### Prodotti ###");

        //System.out.println("Offerta da acquistare[inserisci id]: ");
View Full Code Here


        //("1 --> Ordina Per Data di Acquisto");
        //("2 --> Ordina Per Costo Prodotto");



        Entry userLogged = Access.get_user_data(user);
        //System.out.println("---------- STORICO ----------");
        ArrayList<StoricoItem> storico = userLogged.getStorico();

        if  (choice.equals("1")){
            class CompareDataAcquisto implements Comparator<StoricoItem> {

                @Override
View Full Code Here

   * @throws IOException
   * @throws ClassNotFoundException
   * @throws FileNotFoundException
   */
  public static void showClientMenu(Catalogo catalogo, ReShow r, String username) throws FileNotFoundException, ClassNotFoundException, IOException {
    Entry loggedUser = Access.get_user_data(username);
    System.out.println("------------ Menu operazioni ------------");
    System.out.println("-- Salto totale:"+loggedUser.getBalance());
    System.out.println("1 --> Acquista Credito");       //Si acquista credito per l'acquisto dei prodotti
    System.out.println("2 --> Visualizza Offerte");     //Visualizza le offerte acquistabili
    System.out.println("3 --> Acquista");               //Acquisto di un offerta
    System.out.println("4 --> Storico acquisti");       //Visualizza lo storico degli acquisti dell'utente
    System.out.println("5 --> Esci");
View Full Code Here

   * @throws ClassNotFoundException
   * @throws IOException
   */
  public void offerteAttive(String user, JTextArea show_offers, String in_choice) throws FileNotFoundException, ClassNotFoundException, IOException
  {
    Entry loggedUser = Access.get_user_data(user);
    if(!(loggedUser.getType()))
    {
            //admin
     
            if  (in_choice.equals("1")){

                class CompareDataScadenza implements Comparator<Utilizzabile> {

                    @Override
                    public int compare(Utilizzabile e1, Utilizzabile e2) {

                      if (e1 instanceof BeniDiConsumo){
                           //beni vs
                            if (e2 instanceof Vacanze){
                                //beni vs vacanze
                                if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                    return -1;
                                    return 1;

                            }else{
                                if (e2 instanceof BeniDiConsumo){
                                    //bene vs //bene

                                    if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                        return -1;
                                    return 1;

                                }else{
                                    //bene vs cena
                                    if (e2 instanceof CeneInRistoranti) {

                                        if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                            return -1;
                                        return 1;
                                    }else{

                                        //bene vs prest
                                        if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                            return -1;
                                        return 1;

                                    }
                                }
                            }
                      }else{
                          if (e1 instanceof Vacanze){
                               //vacanze vs
                              if (e2 instanceof BeniDiConsumo){
                                  //vacanze vs bene
                                  if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                      return -1;
                                  return 1;

                              }else{
                                  if (e2 instanceof Vacanze){
                                      //vacabnza vs vacanza

                                      if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                          return -1;
                                      return 1;


                                  }else{
                                      //vacanza vs cena

                                      if (e2 instanceof CeneInRistoranti) {

                                          if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                              return -1;
                                          return 1;
                                      }else{
                                          //vacanza vs prest
                                          if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                              return -1;
                                          return 1;

                                      }

                                  }
                              }

                          }else{
                              //Cene vs
                              if (e1 instanceof CeneInRistoranti){
                                      if (e2 instanceof Vacanze){
                                          //cena vs vacanza

                                          if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                              return -1;
                                          return 1;

                                      }else{
                                          if (e2 instanceof CeneInRistoranti){
                                              //cena vs cena

                                              if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                                  return -1;
                                              return 1;
                                          }else{
                                              //cena vs bene

                                              if (e2 instanceof BeniDiConsumo) {

                                                  if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                                      return -1;
                                                  return 1;
                                              }else{
                                                  //cena vs prest
                                                  if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                                      return -1;
                                                  return 1;

                                              }
                                          }
                                      }
                              }else{

                                  if (e2 instanceof Vacanze){
                                      //prest vs vacanza

                                      if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                          return -1;
                                      return 1;

                                  }else{
                                      if (e2 instanceof CeneInRistoranti){
                                          //prest vs cena

                                          if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                              return -1;
                                          return 1;
                                      }else{
                                          //prest vs bene

                                          if (e2 instanceof BeniDiConsumo) {

                                              if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                                  return -1;
                                              return 1;
                                          }else{
                                              //prest vs prest
                                              if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                                  return -1;
                                              return 1;

                                          }
                                      }
                                  }

                              }

                          }
                      }

                    }
                }

                Collections.sort(catalogoOfferte,new CompareDataScadenza());
                print_cat_admin (catalogoOfferte,show_offers);
            }else{

                class CompareID implements Comparator<Utilizzabile> {

                    @Override
                    public int compare(Utilizzabile e1, Utilizzabile e2) {

                        if (e1 instanceof BeniDiConsumo){
                            //beni vs
                            if (e2 instanceof Vacanze){
                                //beni vs vacanze
                                if (((BeniDiConsumo)e1).getIdBene() < ((Vacanze)e2).getIdViaggio())
                                    return -1;
                                return 1;

                            }else{
                                if (e2 instanceof BeniDiConsumo){
                                    //bene vs //bene

                                    if (((BeniDiConsumo)e1).getIdBene() < ((BeniDiConsumo)e2).getIdBene())
                                        return -1;
                                    return 1;

                                }else{
                                    //bene vs cena
                                    if (e2 instanceof CeneInRistoranti){

                                        if (((BeniDiConsumo)e1).getIdBene() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{

                                        if (((BeniDiConsumo)e1).getIdBene() < ((PrestazioniDopera)e2).getIdPrOpera())
                                            return -1;
                                        return 1;
                                    }
                                }
                            }
                        }else{
                            if (e1 instanceof Vacanze){
                                //vacanze vs
                                if (e2 instanceof BeniDiConsumo){
                                    //vacanze vs bene
                                    if (((Vacanze)e1).getIdViaggio() < ((BeniDiConsumo)e2).getIdBene())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof Vacanze){
                                        //vacabnza vs vacanza

                                        if (((Vacanze)e1).getIdViaggio() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;
                                       
                                    }else{
                                        //vacanza vs cena

                                        if (e2 instanceof CeneInRistoranti){

                                            if (((Vacanze)e1).getIdViaggio() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((Vacanze)e1).getIdViaggio() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }

                                    }
                                }

                            }else{
                                if (e1 instanceof CeneInRistoranti){


                                    //Cene vs
                                    if (e2 instanceof Vacanze){
                                        //cena vs vacanza

                                        if (((CeneInRistoranti)e1).getIdCena() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //cena vs cena

                                            if (((CeneInRistoranti)e1).getIdCena() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{
                                            //cena vs bene

                                            if (e2 instanceof BeniDiConsumo){

                                                if (((CeneInRistoranti)e1).getIdCena() < ((BeniDiConsumo)e2).getIdBene())
                                                    return -1;
                                                return 1;
                                            }else{

                                                if (((CeneInRistoranti)e1).getIdCena() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                    return -1;
                                                return 1;
                                            }
                                        }
                                    }
                                }else{

                                    if (e2 instanceof Vacanze){
                                        //prest vs vacanza

                                        if (((PrestazioniDopera)e1).getIdPrOpera() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //prest vs cena

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{
                                            //prest vs bene

                                            if (e2 instanceof BeniDiConsumo){

                                                if (((PrestazioniDopera)e1).getIdPrOpera() < ((BeniDiConsumo)e2).getIdBene())
                                                    return -1;
                                                return 1;
                                            }else{

                                                if (((PrestazioniDopera)e1).getIdPrOpera() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                    return -1;
                                                return 1;
                                            }
                                        }
                                    }

                                }

                            }
                        }

                    }
                }

                Collections.sort(catalogoOfferte,new CompareID());
                print_cat_admin (catalogoOfferte,show_offers);
            }

    } else{

            // user

            class CompareIDUser implements Comparator<Utilizzabile> {

                @Override
                public int compare(Utilizzabile e1, Utilizzabile e2) {

                    if (e1 instanceof BeniDiConsumo){
                        //beni vs
                        if (e2 instanceof Vacanze){
                            //beni vs vacanze
                            if (((BeniDiConsumo)e1).getIdBene() < ((Vacanze)e2).getIdViaggio())
                                return -1;
                            return 1;

                        }else{
                            if (e2 instanceof BeniDiConsumo){
                                //bene vs //bene

                                if (((BeniDiConsumo)e1).getIdBene() < ((BeniDiConsumo)e2).getIdBene())
                                    return -1;
                                return 1;

                            }else{
                                //bene vs cena
                                if (e2 instanceof CeneInRistoranti){

                                    if (((BeniDiConsumo)e1).getIdBene() < ((CeneInRistoranti)e2).getIdCena())
                                        return -1;
                                    return 1;
                                }else{

                                    if (((BeniDiConsumo)e1).getIdBene() < ((PrestazioniDopera)e2).getIdPrOpera())
                                        return -1;
                                    return 1;
                                }
                            }
                        }
                    }else{
                        if (e1 instanceof Vacanze){
                            //vacanze vs
                            if (e2 instanceof BeniDiConsumo){
                                //vacanze vs bene
                                if (((Vacanze)e1).getIdViaggio() < ((BeniDiConsumo)e2).getIdBene())
                                    return -1;
                                return 1;

                            }else{
                                if (e2 instanceof Vacanze){
                                    //vacabnza vs vacanza

                                    if (((Vacanze)e1).getIdViaggio() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;


                                }else{
                                    //vacanza vs cena

                                    if (e2 instanceof CeneInRistoranti){

                                        if (((Vacanze)e1).getIdViaggio() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{

                                        if (((Vacanze)e1).getIdViaggio() < ((PrestazioniDopera)e2).getIdPrOpera())
                                            return -1;
                                        return 1;
                                    }

                                }
                            }

                        }else{
                            if (e1 instanceof CeneInRistoranti){


                            //Cene vs
                                if (e2 instanceof Vacanze){
                                    //cena vs vacanza

                                    if (((CeneInRistoranti)e1).getIdCena() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof CeneInRistoranti){
                                        //cena vs cena

                                        if (((CeneInRistoranti)e1).getIdCena() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{
                                        //cena vs bene

                                        if (e2 instanceof BeniDiConsumo){

                                            if (((CeneInRistoranti)e1).getIdCena() < ((BeniDiConsumo)e2).getIdBene())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((CeneInRistoranti)e1).getIdCena() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }
                                    }
                                }
                            }else{

                                if (e2 instanceof Vacanze){
                                    //prest vs vacanza

                                    if (((PrestazioniDopera)e1).getIdPrOpera() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof CeneInRistoranti){
                                        //prest vs cena

                                        if (((PrestazioniDopera)e1).getIdPrOpera() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{
                                        //prest vs bene

                                        if (e2 instanceof BeniDiConsumo){

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((BeniDiConsumo)e2).getIdBene())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }
                                    }
                                }

                            }

                        }
                    }

                }
            }

            Collections.sort(catalogoOfferte, new CompareIDUser());
            print_cat_user(catalogoOfferte, loggedUser.getLocation(), show_offers);
        }
  }
View Full Code Here

   * @throws ClassNotFoundException
   * @throws IOException
   */
    public void offerteAttiveConScadenza(String user, JTextArea show_offers, String in_choice, GregorianCalendar datastart, GregorianCalendar data_end) throws FileNotFoundException, ClassNotFoundException, IOException
    {
        Entry loggedUser = Access.get_user_data(user);
        ArrayList<Utilizzabile> arrayData = getDataExpire(datastart,data_end);
        if(!(loggedUser.getType()))
        {
            //admin

            if  (in_choice.equals("1")){
                class CompareDataScadenza implements Comparator<Utilizzabile> {

                    @Override
                    public int compare(Utilizzabile e1, Utilizzabile e2) {

                        if (e1 instanceof BeniDiConsumo){
                            //beni vs
                            if (e2 instanceof Vacanze){
                                //beni vs vacanze
                                if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                    return -1;
                                return 1;

                            }else{
                                if (e2 instanceof BeniDiConsumo){
                                    //bene vs //bene

                                    if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                        return -1;
                                    return 1;

                                }else{
                                    //bene vs cena
                                    if (e2 instanceof CeneInRistoranti) {

                                        if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                            return -1;
                                        return 1;
                                    }else{

                                        //bene vs prest
                                        if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                            return -1;
                                        return 1;

                                    }
                                }
                            }
                        }else{
                            if (e1 instanceof Vacanze){
                                //vacanze vs
                                if (e2 instanceof BeniDiConsumo){
                                    //vacanze vs bene
                                    if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof Vacanze){
                                        //vacabnza vs vacanza

                                        if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                            return -1;
                                        return 1;


                                    }else{
                                        //vacanza vs cena

                                        if (e2 instanceof CeneInRistoranti) {

                                            if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                                return -1;
                                            return 1;
                                        }else{
                                            //vacanza vs prest
                                            if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                                return -1;
                                            return 1;

                                        }

                                    }
                                }

                            }else{
                                //Cene vs
                                if (e1 instanceof CeneInRistoranti){
                                    if (e2 instanceof Vacanze){
                                        //cena vs vacanza

                                        if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //cena vs cena

                                            if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                                return -1;
                                            return 1;
                                        }else{
                                            //cena vs bene

                                            if (e2 instanceof BeniDiConsumo) {

                                                if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                                    return -1;
                                                return 1;
                                            }else{
                                                //cena vs prest
                                                if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                                    return -1;
                                                return 1;

                                            }
                                        }
                                    }
                                }else{

                                    if (e2 instanceof Vacanze){
                                        //prest vs vacanza

                                        if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //prest vs cena

                                            if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                                return -1;
                                            return 1;
                                        }else{
                                            //prest vs bene

                                            if (e2 instanceof BeniDiConsumo) {

                                                if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                                    return -1;
                                                return 1;
                                            }else{
                                                //prest vs prest
                                                if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                                    return -1;
                                                return 1;

                                            }
                                        }
                                    }

                                }

                            }
                        }

                    }
                }

                Collections.sort(arrayData,new CompareDataScadenza());
                print_cat_admin (arrayData,show_offers);
            }else{

                class CompareID implements Comparator<Utilizzabile> {

                    @Override
                    public int compare(Utilizzabile e1, Utilizzabile e2) {

                        if (e1 instanceof BeniDiConsumo){
                            //beni vs
                            if (e2 instanceof Vacanze){
                                //beni vs vacanze
                                if (((BeniDiConsumo)e1).getIdBene() < ((Vacanze)e2).getIdViaggio())
                                    return -1;
                                return 1;

                            }else{
                                if (e2 instanceof BeniDiConsumo){
                                    //bene vs //bene

                                    if (((BeniDiConsumo)e1).getIdBene() < ((BeniDiConsumo)e2).getIdBene())
                                        return -1;
                                    return 1;

                                }else{
                                    //bene vs cena
                                    if (e2 instanceof CeneInRistoranti){

                                        if (((BeniDiConsumo)e1).getIdBene() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{

                                        if (((BeniDiConsumo)e1).getIdBene() < ((PrestazioniDopera)e2).getIdPrOpera())
                                            return -1;
                                        return 1;
                                    }
                                }
                            }
                        }else{
                            if (e1 instanceof Vacanze){
                                //vacanze vs
                                if (e2 instanceof BeniDiConsumo){
                                    //vacanze vs bene
                                    if (((Vacanze)e1).getIdViaggio() < ((BeniDiConsumo)e2).getIdBene())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof Vacanze){
                                        //vacabnza vs vacanza

                                        if (((Vacanze)e1).getIdViaggio() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;


                                    }else{
                                        //vacanza vs cena

                                        if (e2 instanceof CeneInRistoranti){

                                            if (((Vacanze)e1).getIdViaggio() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((Vacanze)e1).getIdViaggio() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }

                                    }
                                }

                            }else{
                                if (e1 instanceof CeneInRistoranti){


                                    //Cene vs
                                    if (e2 instanceof Vacanze){
                                        //cena vs vacanza

                                        if (((CeneInRistoranti)e1).getIdCena() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //cena vs cena

                                            if (((CeneInRistoranti)e1).getIdCena() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{
                                            //cena vs bene

                                            if (e2 instanceof BeniDiConsumo){

                                                if (((CeneInRistoranti)e1).getIdCena() < ((BeniDiConsumo)e2).getIdBene())
                                                    return -1;
                                                return 1;
                                            }else{

                                                if (((CeneInRistoranti)e1).getIdCena() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                    return -1;
                                                return 1;
                                            }
                                        }
                                    }
                                }else{

                                    if (e2 instanceof Vacanze){
                                        //prest vs vacanza

                                        if (((PrestazioniDopera)e1).getIdPrOpera() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //prest vs cena

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{
                                            //prest vs bene

                                            if (e2 instanceof BeniDiConsumo){

                                                if (((PrestazioniDopera)e1).getIdPrOpera() < ((BeniDiConsumo)e2).getIdBene())
                                                    return -1;
                                                return 1;
                                            }else{

                                                if (((PrestazioniDopera)e1).getIdPrOpera() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                    return -1;
                                                return 1;
                                            }
                                        }
                                    }

                                }

                            }
                        }

                    }
                }

                Collections.sort(arrayData,new CompareID());
                print_cat_admin (arrayData,show_offers);
            }

        } else{

            // user

            class CompareIDUser implements Comparator<Utilizzabile> {

                @Override
                public int compare(Utilizzabile e1, Utilizzabile e2) {

                    if (e1 instanceof BeniDiConsumo){
                        //beni vs
                        if (e2 instanceof Vacanze){
                            //beni vs vacanze
                            if (((BeniDiConsumo)e1).getIdBene() < ((Vacanze)e2).getIdViaggio())
                                return -1;
                            return 1;

                        }else{
                            if (e2 instanceof BeniDiConsumo){
                                //bene vs //bene

                                if (((BeniDiConsumo)e1).getIdBene() < ((BeniDiConsumo)e2).getIdBene())
                                    return -1;
                                return 1;

                            }else{
                                //bene vs cena
                                if (e2 instanceof CeneInRistoranti){

                                    if (((BeniDiConsumo)e1).getIdBene() < ((CeneInRistoranti)e2).getIdCena())
                                        return -1;
                                    return 1;
                                }else{

                                    if (((BeniDiConsumo)e1).getIdBene() < ((PrestazioniDopera)e2).getIdPrOpera())
                                        return -1;
                                    return 1;
                                }
                            }
                        }
                    }else{
                        if (e1 instanceof Vacanze){
                            //vacanze vs
                            if (e2 instanceof BeniDiConsumo){
                                //vacanze vs bene
                                if (((Vacanze)e1).getIdViaggio() < ((BeniDiConsumo)e2).getIdBene())
                                    return -1;
                                return 1;

                            }else{
                                if (e2 instanceof Vacanze){
                                    //vacabnza vs vacanza

                                    if (((Vacanze)e1).getIdViaggio() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;


                                }else{
                                    //vacanza vs cena

                                    if (e2 instanceof CeneInRistoranti){

                                        if (((Vacanze)e1).getIdViaggio() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{

                                        if (((Vacanze)e1).getIdViaggio() < ((PrestazioniDopera)e2).getIdPrOpera())
                                            return -1;
                                        return 1;
                                    }

                                }
                            }

                        }else{
                            if (e1 instanceof CeneInRistoranti){


                                //Cene vs
                                if (e2 instanceof Vacanze){
                                    //cena vs vacanza

                                    if (((CeneInRistoranti)e1).getIdCena() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof CeneInRistoranti){
                                        //cena vs cena

                                        if (((CeneInRistoranti)e1).getIdCena() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{
                                        //cena vs bene

                                        if (e2 instanceof BeniDiConsumo){

                                            if (((CeneInRistoranti)e1).getIdCena() < ((BeniDiConsumo)e2).getIdBene())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((CeneInRistoranti)e1).getIdCena() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }
                                    }
                                }
                            }else{

                                if (e2 instanceof Vacanze){
                                    //prest vs vacanza

                                    if (((PrestazioniDopera)e1).getIdPrOpera() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof CeneInRistoranti){
                                        //prest vs cena

                                        if (((PrestazioniDopera)e1).getIdPrOpera() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{
                                        //prest vs bene

                                        if (e2 instanceof BeniDiConsumo){

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((BeniDiConsumo)e2).getIdBene())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }
                                    }
                                }

                            }

                        }
                    }

                }
            }

            Collections.sort(arrayData, new CompareIDUser());
            print_cat_user(arrayData, loggedUser.getLocation(), show_offers);
        }
    }
View Full Code Here

     * @throws ClassNotFoundException
     * @throws IOException
     */
    public void offerteAttiveSenzaScadenza(String user, JTextArea show_offers, String in_choice, int votazione) throws FileNotFoundException, ClassNotFoundException, IOException
    {
        Entry loggedUser = Access.get_user_data(user);
        ArrayList<Utilizzabile> arrayData = getDealNotExpire(votazione);
        if(!(loggedUser.getType()))
        {
            //admin

            if  (in_choice.equals("1")){

                class CompareDataScadenza implements Comparator<Utilizzabile> {

                    @Override
                    public int compare(Utilizzabile e1, Utilizzabile e2) {

                        if (e1 instanceof BeniDiConsumo){
                            //beni vs
                            if (e2 instanceof Vacanze){
                                //beni vs vacanze
                                if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                    return -1;
                                return 1;

                            }else{
                                if (e2 instanceof BeniDiConsumo){
                                    //bene vs //bene

                                    if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                        return -1;
                                    return 1;

                                }else{
                                    //bene vs cena
                                    if (e2 instanceof CeneInRistoranti) {

                                        if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                            return -1;
                                        return 1;
                                    }else{

                                        //bene vs prest
                                        if (((BeniDiConsumo)e1).getScadenza().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                            return -1;
                                        return 1;

                                    }
                                }
                            }
                        }else{
                            if (e1 instanceof Vacanze){
                                //vacanze vs
                                if (e2 instanceof BeniDiConsumo){
                                    //vacanze vs bene
                                    if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof Vacanze){
                                        //vacabnza vs vacanza

                                        if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                            return -1;
                                        return 1;


                                    }else{
                                        //vacanza vs cena

                                        if (e2 instanceof CeneInRistoranti) {

                                            if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                                return -1;
                                            return 1;
                                        }else{
                                            //vacanza vs prest
                                            if (((Vacanze)e1).getScadenzaOfferta().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                                return -1;
                                            return 1;

                                        }

                                    }
                                }

                            }else{
                                //Cene vs
                                if (e1 instanceof CeneInRistoranti){
                                    if (e2 instanceof Vacanze){
                                        //cena vs vacanza

                                        if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //cena vs cena

                                            if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                                return -1;
                                            return 1;
                                        }else{
                                            //cena vs bene

                                            if (e2 instanceof BeniDiConsumo) {

                                                if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                                    return -1;
                                                return 1;
                                            }else{
                                                //cena vs prest
                                                if (((CeneInRistoranti)e1).getDataScadenzaOffertaCena().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                                    return -1;
                                                return 1;

                                            }
                                        }
                                    }
                                }else{

                                    if (e2 instanceof Vacanze){
                                        //prest vs vacanza

                                        if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((Vacanze)e2).getScadenzaOfferta().getTimeInMillis())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //prest vs cena

                                            if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((CeneInRistoranti)e2).getDataScadenzaOffertaCena().getTimeInMillis())
                                                return -1;
                                            return 1;
                                        }else{
                                            //prest vs bene

                                            if (e2 instanceof BeniDiConsumo) {

                                                if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((BeniDiConsumo)e2).getScadenza().getTimeInMillis())
                                                    return -1;
                                                return 1;
                                            }else{
                                                //prest vs prest
                                                if (((PrestazioniDopera)e1).getScadenza().getTimeInMillis() < ((PrestazioniDopera)e2).getScadenza().getTimeInMillis())
                                                    return -1;
                                                return 1;

                                            }
                                        }
                                    }

                                }

                            }
                        }

                    }
                }

                Collections.sort(arrayData,new CompareDataScadenza());
                print_cat_admin (arrayData,show_offers);
            }else{

                class CompareID implements Comparator<Utilizzabile> {

                    @Override
                    public int compare(Utilizzabile e1, Utilizzabile e2) {

                        if (e1 instanceof BeniDiConsumo){
                            //beni vs
                            if (e2 instanceof Vacanze){
                                //beni vs vacanze
                                if (((BeniDiConsumo)e1).getIdBene() < ((Vacanze)e2).getIdViaggio())
                                    return -1;
                                return 1;

                            }else{
                                if (e2 instanceof BeniDiConsumo){
                                    //bene vs //bene

                                    if (((BeniDiConsumo)e1).getIdBene() < ((BeniDiConsumo)e2).getIdBene())
                                        return -1;
                                    return 1;

                                }else{
                                    //bene vs cena
                                    if (e2 instanceof CeneInRistoranti){

                                        if (((BeniDiConsumo)e1).getIdBene() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{

                                        if (((BeniDiConsumo)e1).getIdBene() < ((PrestazioniDopera)e2).getIdPrOpera())
                                            return -1;
                                        return 1;
                                    }
                                }
                            }
                        }else{
                            if (e1 instanceof Vacanze){
                                //vacanze vs
                                if (e2 instanceof BeniDiConsumo){
                                    //vacanze vs bene
                                    if (((Vacanze)e1).getIdViaggio() < ((BeniDiConsumo)e2).getIdBene())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof Vacanze){
                                        //vacabnza vs vacanza

                                        if (((Vacanze)e1).getIdViaggio() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;


                                    }else{
                                        //vacanza vs cena

                                        if (e2 instanceof CeneInRistoranti){

                                            if (((Vacanze)e1).getIdViaggio() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((Vacanze)e1).getIdViaggio() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }

                                    }
                                }

                            }else{
                                if (e1 instanceof CeneInRistoranti){


                                    //Cene vs
                                    if (e2 instanceof Vacanze){
                                        //cena vs vacanza

                                        if (((CeneInRistoranti)e1).getIdCena() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //cena vs cena

                                            if (((CeneInRistoranti)e1).getIdCena() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{
                                            //cena vs bene

                                            if (e2 instanceof BeniDiConsumo){

                                                if (((CeneInRistoranti)e1).getIdCena() < ((BeniDiConsumo)e2).getIdBene())
                                                    return -1;
                                                return 1;
                                            }else{

                                                if (((CeneInRistoranti)e1).getIdCena() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                    return -1;
                                                return 1;
                                            }
                                        }
                                    }
                                }else{

                                    if (e2 instanceof Vacanze){
                                        //prest vs vacanza

                                        if (((PrestazioniDopera)e1).getIdPrOpera() < ((Vacanze)e2).getIdViaggio())
                                            return -1;
                                        return 1;

                                    }else{
                                        if (e2 instanceof CeneInRistoranti){
                                            //prest vs cena

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((CeneInRistoranti)e2).getIdCena())
                                                return -1;
                                            return 1;
                                        }else{
                                            //prest vs bene

                                            if (e2 instanceof BeniDiConsumo){

                                                if (((PrestazioniDopera)e1).getIdPrOpera() < ((BeniDiConsumo)e2).getIdBene())
                                                    return -1;
                                                return 1;
                                            }else{

                                                if (((PrestazioniDopera)e1).getIdPrOpera() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                    return -1;
                                                return 1;
                                            }
                                        }
                                    }

                                }

                            }
                        }

                    }
                }


                Collections.sort(arrayData,new CompareID());
                print_cat_admin (arrayData,show_offers);

            }


        } else{

            // user

            class CompareIDUser implements Comparator<Utilizzabile> {

                @Override
                public int compare(Utilizzabile e1, Utilizzabile e2) {

                    if (e1 instanceof BeniDiConsumo){
                        //beni vs
                        if (e2 instanceof Vacanze){
                            //beni vs vacanze
                            if (((BeniDiConsumo)e1).getIdBene() < ((Vacanze)e2).getIdViaggio())
                                return -1;
                            return 1;

                        }else{
                            if (e2 instanceof BeniDiConsumo){
                                //bene vs //bene

                                if (((BeniDiConsumo)e1).getIdBene() < ((BeniDiConsumo)e2).getIdBene())
                                    return -1;
                                return 1;

                            }else{
                                //bene vs cena
                                if (e2 instanceof CeneInRistoranti){

                                    if (((BeniDiConsumo)e1).getIdBene() < ((CeneInRistoranti)e2).getIdCena())
                                        return -1;
                                    return 1;
                                }else{

                                    if (((BeniDiConsumo)e1).getIdBene() < ((PrestazioniDopera)e2).getIdPrOpera())
                                        return -1;
                                    return 1;
                                }
                            }
                        }
                    }else{
                        if (e1 instanceof Vacanze){
                            //vacanze vs
                            if (e2 instanceof BeniDiConsumo){
                                //vacanze vs bene
                                if (((Vacanze)e1).getIdViaggio() < ((BeniDiConsumo)e2).getIdBene())
                                    return -1;
                                return 1;

                            }else{
                                if (e2 instanceof Vacanze){
                                    //vacabnza vs vacanza

                                    if (((Vacanze)e1).getIdViaggio() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;


                                }else{
                                    //vacanza vs cena

                                    if (e2 instanceof CeneInRistoranti){

                                        if (((Vacanze)e1).getIdViaggio() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{

                                        if (((Vacanze)e1).getIdViaggio() < ((PrestazioniDopera)e2).getIdPrOpera())
                                            return -1;
                                        return 1;
                                    }

                                }
                            }

                        }else{
                            if (e1 instanceof CeneInRistoranti){


                                //Cene vs
                                if (e2 instanceof Vacanze){
                                    //cena vs vacanza

                                    if (((CeneInRistoranti)e1).getIdCena() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof CeneInRistoranti){
                                        //cena vs cena

                                        if (((CeneInRistoranti)e1).getIdCena() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{
                                        //cena vs bene

                                        if (e2 instanceof BeniDiConsumo){

                                            if (((CeneInRistoranti)e1).getIdCena() < ((BeniDiConsumo)e2).getIdBene())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((CeneInRistoranti)e1).getIdCena() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }
                                    }
                                }
                            }else{

                                if (e2 instanceof Vacanze){
                                    //prest vs vacanza

                                    if (((PrestazioniDopera)e1).getIdPrOpera() < ((Vacanze)e2).getIdViaggio())
                                        return -1;
                                    return 1;

                                }else{
                                    if (e2 instanceof CeneInRistoranti){
                                        //prest vs cena

                                        if (((PrestazioniDopera)e1).getIdPrOpera() < ((CeneInRistoranti)e2).getIdCena())
                                            return -1;
                                        return 1;
                                    }else{
                                        //prest vs bene

                                        if (e2 instanceof BeniDiConsumo){

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((BeniDiConsumo)e2).getIdBene())
                                                return -1;
                                            return 1;
                                        }else{

                                            if (((PrestazioniDopera)e1).getIdPrOpera() < ((PrestazioniDopera)e2).getIdPrOpera())
                                                return -1;
                                            return 1;
                                        }
                                    }
                                }

                            }

                        }
                    }

                }
            }

            Collections.sort(arrayData, new CompareIDUser());
            print_cat_user(arrayData, loggedUser.getLocation(), show_offers);
        }
    }
View Full Code Here

   * @throws ClassNotFoundException
   * @throws IOException
   */
  public void offerteScadute(String user,JTextArea in_area) throws FileNotFoundException, ClassNotFoundException, IOException
  {
    Entry loggedUser = Access.get_user_data(user);
    //System.out.println("------ Offerte Scadute -----");
    for(Utilizzabile deal: catalogoOfferte)
    {
      if(deal instanceof Vacanze)
      {
View Full Code Here

   * @throws ClassNotFoundException
   * @throws IOException
   */
  public void aggiungiCredito(String user, String in_double) throws FileNotFoundException, ClassNotFoundException, IOException
  {
    Entry loggedUser = Access.get_user_data(user);

    String euro = in_double;
    loggedUser.setBalance(Double.parseDouble(euro));
    Access.replace_data(user, loggedUser);
  }
View Full Code Here

   * @throws ClassNotFoundException
   * @throws IOException
   */
  public boolean acquistaProdotti(String user, ArrayList<Utilizzabile> Carrello) throws FileNotFoundException, ClassNotFoundException, IOException
  {
    Entry loggedUser = Access.get_user_data(user);
    ArrayList<StoricoItem> storico = loggedUser.getStorico();

        double totale = 0;
   
    for(Utilizzabile dealsc: Carrello)
    {
      if(dealsc instanceof Vacanze)
      {
        Vacanze dealVacanza = (Vacanze)dealsc;
        totale += dealVacanza.get_prezzo_scontato();
      }
      if(dealsc instanceof BeniDiConsumo)
      {
        BeniDiConsumo dealBene = (BeniDiConsumo)dealsc;
                totale += dealBene.get_prezzo_scontato();
       
      }
      if( dealsc instanceof CeneInRistoranti)
      {
        CeneInRistoranti dealCena = (CeneInRistoranti)dealsc;
                totale += dealCena.get_prezzo_scontato();
      }

            if( dealsc instanceof PrestazioniDopera)
            {
                PrestazioniDopera deal = (PrestazioniDopera)dealsc;
                totale += deal.get_prezzo_scontato();
            }
    }

        if (Carrello.size() >= Global.getMin_num_articoli_per_sconto()){
            totale = totale - (totale * Global.getSconto_per_min_num_articoli());
        }

        if (totale <= loggedUser.getBalance()){

            for(Utilizzabile dealsc: Carrello)
            {
                if(dealsc instanceof Vacanze)
                {
                    Vacanze dealVacanza = (Vacanze)dealsc;

                        storico.add(new StoricoItem("Viaggio: "+dealVacanza.getLocalitaViaggio(), new GregorianCalendar() ,dealVacanza.get_prezzo_scontato()));
                        dealVacanza.setViaggiVenduti();
                        store_data();
                        Access.replace_data(user, loggedUser);

                }
                if(dealsc instanceof BeniDiConsumo)
                {
                    BeniDiConsumo dealBene = (BeniDiConsumo)dealsc;

                        storico.add(new StoricoItem("Prodotto: "+dealBene.getDescrizioneBene(), new GregorianCalendar() ,dealBene.get_prezzo_scontato()));
                        dealBene.setBeniVenduti();
                        Access.replace_data(user, loggedUser);
                        store_data();



                }
                if (dealsc instanceof CeneInRistoranti)
                {
                    CeneInRistoranti dealCena = (CeneInRistoranti)dealsc;

                        storico.add(new StoricoItem("Cena ristorante: "+dealCena.getNomeRistorante()+" "+dealCena.getDescrizione_cena(), new GregorianCalendar() ,dealCena.get_prezzo_scontato()));
                        dealCena.setCeneVendute();
                        Access.replace_data(user, loggedUser);
                        store_data();

                }
                if (dealsc instanceof PrestazioniDopera)
                {
                    PrestazioniDopera deal = (PrestazioniDopera)dealsc;

                    storico.add(new StoricoItem("Prestazione d'opera: "+deal.getDescrizione(), new GregorianCalendar() ,deal.get_prezzo_scontato()));
                    deal.setPrestazioniVendute();
                    Access.replace_data(user, loggedUser);
                    store_data();
                }
            }

            loggedUser.setBalance(-totale);
            Carrello.clear();
            Access.replace_data(user, loggedUser);
            store_data();

            return true;
View Full Code Here

            System.out.println("Scelta Errata. Riprovare");
            System.out.print("Opzione: ");
            choice = reader.nextLine();
        }

        Entry userLogged = Access.get_user_data(user);
        System.out.println("---------- STORICO ----------");
        ArrayList<StoricoItem> storico = userLogged.getStorico();

        if  (choice.equals("1")){
            class CompareDataAcquisto implements Comparator<StoricoItem> {

                @Override
View Full Code Here

TOP

Related Classes of it.unisa.info13d.Login.Entry

Copyright © 2018 www.massapicom. 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.