Examples of AddressEntry


Examples of org.axonframework.sample.app.query.AddressEntry

    }

    @RequestMapping(value = "{identifier}/address/new", method = RequestMethod.GET)
    public String formNewAddress(@PathVariable String identifier, Model model) {
        ContactEntry contactEntry = repository.loadContactDetails(identifier);
        AddressEntry addressEntry = new AddressEntry();
        addressEntry.setIdentifier(contactEntry.getIdentifier());
        addressEntry.setName(contactEntry.getName());
        model.addAttribute("address", addressEntry);
        return "contacts/address";
    }
View Full Code Here

Examples of org.axonframework.sample.app.query.AddressEntry

    }

    @RequestMapping(value = "{identifier}/address/delete/{addressType}", method = RequestMethod.GET)
    public String formDeleteAddress(@PathVariable String identifier, @PathVariable AddressType addressType, Model model) {
        ContactEntry contactEntry = repository.loadContactDetails(identifier);
        AddressEntry addressEntry = new AddressEntry();
        addressEntry.setIdentifier(contactEntry.getIdentifier());
        addressEntry.setName(contactEntry.getName());
        addressEntry.setAddressType(addressType);
        model.addAttribute("address", addressEntry);
        return "contacts/removeAddress";
    }
View Full Code Here

Examples of org.axonframework.sample.app.query.AddressEntry

    @EventHandler
    public void handleAddressCreatedEvent(AddressRegisteredEvent event) {
        logger.debug("Received a address created event with type {} for contactId {}",
                     event.getType().toString(), event.getContactId());
        ContactEntry contactEntry = obtainContactByIdentifier(event.getContactId());
        AddressEntry value = new AddressEntry();
        value.setIdentifier(event.getContactId());
        value.setName(contactEntry.getName());
        value.setAddressType(event.getType());
        value.setStreetAndNumber(event.getAddress().getStreetAndNumber());
        value.setZipCode(event.getAddress().getZipCode());
        value.setCity(event.getAddress().getCity());
        publisher.publish(new Message<AddressEntry>("address-created", value));
    }
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.