Package kirjastox.model

Examples of kirjastox.model.CustomersDataAccessObject


        books = FXCollections.observableArrayList(booksPersistentData.getAll());
       
        AudioRecordsDataAccessObject audioRecordsPersistentData = new AudioRecordsDataAccessObject();
        audioRecords = FXCollections.observableArrayList(audioRecordsPersistentData.getAll());
       
        CustomersDataAccessObject customersPersistentData = new CustomersDataAccessObject();
        customers = FXCollections.observableArrayList(customersPersistentData.getAll());
    }
View Full Code Here


    /*
        Apumetodeita ohjaimien väliseen kommunikaatioon ja tiedon tallentamiseen
    */
   
    public void setBookLoanToCustomer(Book loanBook, int cardNumber){
        CustomersDataAccessObject customersPersistentData = new CustomersDataAccessObject();
       
        int index = customersPersistentData.getCustomerIndexByCardNumber(cardNumber);
        this.customers.get(index).loanBook(loanBook);
       
        ArrayList<Customer> updatedCustomers = new ArrayList<Customer>(customers);
        customersPersistentData.updateAll(updatedCustomers);
        customersPersistentData.save();
    }
View Full Code Here

        this.updateBooksPersistentStore();
    }
   
    public void setAudioRecordToCustomer(AudioRecord recordBought, int cardNumber){
       
        CustomersDataAccessObject customersPersistentData = new CustomersDataAccessObject();
        int index = customersPersistentData.getCustomerIndexByCardNumber(cardNumber);
       
        this.customers.get(index).buyAudioRecord(recordBought);
       
        ArrayList<Customer> updatedCustomers = new ArrayList<Customer>(customers);
        customersPersistentData.updateAll(updatedCustomers);
        customersPersistentData.save();
    }
View Full Code Here

        audioRecordPersistentData.save();
    }
   
    public void updateCustomersPersistentStore(){
        // Tässä päivitetään ja tallennetaan muutokset tiedostoon
        CustomersDataAccessObject customersPersistentData = new CustomersDataAccessObject();
        ArrayList<Customer> updatedCustomers = new ArrayList<Customer>(customers);
        customersPersistentData.updateAll(updatedCustomers);
        customersPersistentData.save();
    }
View Full Code Here

TOP

Related Classes of kirjastox.model.CustomersDataAccessObject

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.