Package net.sf.czarrental.bl.car

Examples of net.sf.czarrental.bl.car.Car


    System.out.println("A. Odebiram auto ID " + IDcar);
    ArrayList<Car> newList = oldList;

    Iterator<Car> i = newList.iterator();
    while (i.hasNext()) {
      Car tmpCar = (Car) i.next();
      if (tmpCar.getIDCar() == IDcar) {
        newList.remove(tmpCar);
        break;
      }
    }
View Full Code Here


  }

  @Override
  public Car readCar(int i) {
    System.out.println("Looking for car ID: " + i);
    Car car = null;
    Transaction tx = null;
    try {
      Session session = SessionFactoryUtil.getInstance()
          .getCurrentSession();
      tx = session.beginTransaction();
View Full Code Here

   */
 
  public float countPrice(int IDcar, int day, boolean insurance, int IDcus) {
    float totalPrice = 0;
   
    Car tmpCar = Car.getCarById(IDcar);
    Customer tmpCustomer = Customer.getCustomerById(IDcus);
    System.out.println(IDcar + ": " + tmpCar);
    System.out.println(tmpCustomer);
    totalPrice = tmpCar.getPrice() * day * Insurance.getInsuranceCost(tmpCustomer.getAge(), insurance);
       
    return totalPrice;
  }
View Full Code Here

  }

  @Override
  public Car readCar(int i) {
    System.out.println("Looking for car ID: " + i);
    Car car = null;
      Transaction tx = null;
      try {
        Session session = SessionFactoryUtil.getInstance().getCurrentSession();
        tx = session.beginTransaction();
        car = (Car) session.createQuery("select c from Car as c where idcar = " + i).uniqueResult();
View Full Code Here

   */

  public float countPrice(int IDcar, int day, boolean insurance, int IDcus) {
    float totalPrice = 0;

    Car tmpCar = Car.getCarById(IDcar);
    Customer tmpCustomer = Customer.getCustomerById(IDcus);
    System.out.println(IDcar + ": " + tmpCar);
    System.out.println(tmpCustomer);
    totalPrice = tmpCar.getPrice() * day
        * Insurance.getInsuranceCost(tmpCustomer.getAge(), insurance);

    return totalPrice;
  }
View Full Code Here

TOP

Related Classes of net.sf.czarrental.bl.car.Car

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.