package com.mc.spring.samples.console.persistence.dao;

import com.mc.spring.samples.console.persistence.model.User;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;


/**
 * This DAO is using the hibernate session directly.
 * It's marked with @Repository for the exception handling - see PersistenceExceptionTranslationPostProcessor.
 */
@Repository
public interface UserDao extends CrudRepository<User, Long> {

    User findByUserName(String username);

}

@@ -244,45 +244,301 @@
  is 
+j
 us
-ing the hibernate sess
+t an interface extending the provided spring-data repository.%0A * %3C/br%3E%0A * New methods will need to respect the convent
 ion
+s
  d
-irectly.
+efined by spring-data:%0A * http://docs.spring.io/spring-data/jpa/docs/current/reference/html/jpa.repositories.html%0A * in order to be transformed into valid queries.%0A *
 %0A * 

update javadoc