Package trams.data

Examples of trams.data.Stop


   
    private void createAndStoreStop(String name, Calendar time) {
        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();

        Stop theStop = new Stop();
        theStop.setStopName(name);
        theStop.setStopTime(time);
        session.save(theStop);

        session.getTransaction().commit();
    }
View Full Code Here


    private void createAndStoreService() {
        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();

        Service theService = new Service();
        theService.addStop(new Stop("Rathaus Pankow", Calendar.getInstance()));
        theService.addStop(new Stop("Pankow Kirche", Calendar.getInstance()));
        theService.addStop(new Stop("S + U Pankow", Calendar.getInstance()));
        session.save(theService);

        session.getTransaction().commit();
    }
View Full Code Here

    private RouteSchedule createAndStoreRouteSchedule(String routeNumber, int scheduleNumber, int delayInMins) {
        //Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        //session.beginTransaction();

        Service theService = new Service();
        theService.addStop(new Stop("Rathaus Pankow", Calendar.getInstance()));
        theService.addStop(new Stop("Pankow Kirche", Calendar.getInstance()));
        theService.addStop(new Stop("S + U Pankow", Calendar.getInstance()));
        RouteSchedule theRouteSchedule = new RouteSchedule();
        theRouteSchedule.addService(theService);
        theRouteSchedule.setRouteNumber(routeNumber);
        theRouteSchedule.setScheduleNumber(scheduleNumber);
        theRouteSchedule.setDelayInMins(delayInMins);
View Full Code Here

    private Vehicle createAndStoreVehicle(String registrationNumber, Calendar deliveryDate, double depreciationFactor, String imagePath, String model, int seatingNum, int standingNum, double purchasePrice) {
        //Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        //session.beginTransaction();

        Service theService = new Service();
        theService.addStop(new Stop("Rathaus Pankow", Calendar.getInstance()));
        theService.addStop(new Stop("Pankow Kirche", Calendar.getInstance()));
        theService.addStop(new Stop("S + U Pankow", Calendar.getInstance()));
        RouteSchedule theRouteSchedule = new RouteSchedule();
        theRouteSchedule.addService(theService);
        theRouteSchedule.setRouteNumber("2A");
        theRouteSchedule.setScheduleNumber(1);
        theRouteSchedule.setDelayInMins(5);
View Full Code Here

TOP

Related Classes of trams.data.Stop

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.