Search in sources :

Example 11 with UserAccount

use of com.springone.myrestaurants.domain.UserAccount in project spring-data-document-examples by spring-projects.

the class JpaUserAccountDao method merge.

@Transactional
public UserAccount merge(UserAccount userAccount) {
    UserAccount merged = this.entityManager.merge(userAccount);
    this.entityManager.flush();
    return merged;
}
Also used : UserAccount(com.springone.myrestaurants.domain.UserAccount) Transactional(org.springframework.transaction.annotation.Transactional)

Example 12 with UserAccount

use of com.springone.myrestaurants.domain.UserAccount in project spring-data-document-examples by spring-projects.

the class SignUpController method updateForm2.

@RequestMapping(value = "/{username}", params = "form2", method = RequestMethod.GET)
public String updateForm2(@PathVariable("username") String userName, Model model) {
    UserAccount userAccount = userAccountDao.findByName(userName);
    model.addAttribute("userAccount", userAccount);
    addDateTimeFormatPatterns(model);
    return "useraccounts/update";
}
Also used : UserAccount(com.springone.myrestaurants.domain.UserAccount) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

UserAccount (com.springone.myrestaurants.domain.UserAccount)12 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)5 Restaurant (com.springone.myrestaurants.domain.Restaurant)2 Query (javax.persistence.Query)2 Test (org.junit.Test)2 Transactional (org.springframework.transaction.annotation.Transactional)2 ModelAttribute (org.springframework.web.bind.annotation.ModelAttribute)1