Package com.captechconsulting.core.domain

Examples of com.captechconsulting.core.domain.Location


    @RequestMapping(value = "/ticket/{ticketId}/scan/{locationId}", method = RequestMethod.POST)
    @ResponseStatus(HttpStatus.CREATED)
    public LocationVO addLocationScan(@PathVariable long ticketId, @PathVariable long locationId) {
        Ticket ticket = ticketService.get(ticketId);
        Location location = ticketService.addLocationScan(ticket, locationId);
        return mappingService.map(location, LocationVO.class);
    }
View Full Code Here


    private LocationDao locationDao;

    @PostConstruct
    public void run() {
        // Locations
        Location location1 = createLocation("Grocery Store", createAddress("123 Some Street", "Some City", "543 21"));
        locationDao.save(location1);
        Location location2 = createLocation("Other Store", createAddress("123 Middle of Nowhere Street", "Boonies", "890 34"));
        locationDao.save(location2);
        Location location3 = createLocation("Mail Supply", createAddress("45 Nowhere Street", "Lost City", "675 12"));
        locationDao.save(location3);
        Location location4 = createLocation("Sorting Hub", createAddress("321 Other Street", "Some City", "123 89"));
        locationDao.save(location4);

        // Version 1 tickets (without email)
        Ticket ticket1 = createTicket("John", "Doe", null, "ab-123-12345", createAddress("123 Street", "City", "123 45"));
        Ticket ticket2 = createTicket("John", "Doe", null, "ab-123-12345", createAddress("123 Street", "City", "123 45"));
View Full Code Here

        ticketDao.save(ticket2);
        ticketDao.save(ticket3);
    }

    private Location createLocation(String name, Address address) {
        Location location = new Location();
        location.setName(name);
        location.setAddress(address);
        return location;
    }
View Full Code Here

    public void delete(Ticket ticket) {
        ticketDao.delete(ticket);
    }

    public Location addLocationScan(Ticket ticket, Long locationId) {
        Location location = locationDao.findOne(locationId);
        if (location == null) {
            throw new ObjectRetrievalFailureException(Ticket.class, locationId);
        }

        LocationScan locationScan = new LocationScan();
View Full Code Here

    @Autowired
    private MappingService mappingService;

    @RequestMapping(value = "/location/{locationId}", method = RequestMethod.GET)
    public LocationVO getLocation(@PathVariable Long locationId) {
        Location location = locationService.get(locationId);
        return mappingService.map(location, LocationVO.class);
    }
View Full Code Here

    @RequestMapping(value = "/ticket/{ticketId}/scan/{locationId}", method = RequestMethod.POST)
    @ResponseStatus(HttpStatus.CREATED)
    public LocationVO addLocationScan(@PathVariable long ticketId, @PathVariable long locationId) {
        Ticket ticket = ticketService.get(ticketId);
        Location location = ticketService.addLocationScan(ticket, locationId);
        return mappingService.map(location, LocationVO.class);
    }
View Full Code Here

TOP

Related Classes of com.captechconsulting.core.domain.Location

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.