Examples of CarPropertiesDto


Examples of com.gwtplatform.carstore.shared.dto.CarPropertiesDto

    public static CarPropertiesDto createDto(CarProperties carProperties) {
        if (carProperties == null) {
            return null;
        }

        CarPropertiesDto carPropertiesDto = new CarPropertiesDto();
        carPropertiesDto.setCar(Car.createDto(carProperties.getCar()));
        carPropertiesDto.setId(carProperties.getId());
        carPropertiesDto.setSomeDate(carProperties.getSomeDate());
        carPropertiesDto.setSomeNumber(carProperties.getSomeNumber());
        carPropertiesDto.setSomeString(carProperties.getSomeString());

        return carPropertiesDto;
    }
View Full Code Here

Examples of com.gwtplatform.carstore.shared.dto.CarPropertiesDto

            ManufacturerDto mitsubishi = new ManufacturerDto("Mitsubishi");

            honda = Manufacturer.createDto(manufacturerDao.put(Manufacturer.create(honda)));
            mitsubishi = Manufacturer.createDto(manufacturerDao.put(Manufacturer.create(mitsubishi)));

            CarPropertiesDto carPropertiesCivic = new CarPropertiesDto("Cat", 0, new Date());
            carPropertiesCivic = carPropertiesDao.put(carPropertiesCivic);

            CarPropertiesDto carPropertiesAccord = new CarPropertiesDto("Fish", 1, new Date());
            carPropertiesAccord = carPropertiesDao.put(carPropertiesAccord);

            CarPropertiesDto carPropertiesLancer = new CarPropertiesDto("Dog", 2, new Date());
            carPropertiesLancer = carPropertiesDao.put(carPropertiesLancer);

            CarPropertiesDto carPropertiesMitsubishi = new CarPropertiesDto("Cow", 3, new Date());
            carPropertiesMitsubishi = carPropertiesDao.put(carPropertiesMitsubishi);

            CarDto civic = new CarDto("Civic", honda, carPropertiesCivic);
            CarDto accord = new CarDto("Accord", honda, carPropertiesAccord);
            CarDto lancer = new CarDto("Lancer", mitsubishi, carPropertiesLancer);
View Full Code Here

Examples of com.gwtplatform.carstore.shared.dto.CarPropertiesDto

        return carDao.countAll();
    }

    @Override
    public CarDto saveOrCreate(CarDto carDto) {
        CarPropertiesDto carProperties = carDto.getCarProperties();
        if (carProperties != null && !carProperties.isSaved()) {
            carProperties = carPropertiesDao.put(carProperties);
            carDto.setCarProperties(carProperties);
        }

        Car car = carDao.put(Car.create(carDto));
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.