Skip to content

Instantly share code, notes, and snippets.

@debop
Created July 20, 2013 10:10
Show Gist options
  • Save debop/6044541 to your computer and use it in GitHub Desktop.
Save debop/6044541 to your computer and use it in GitHub Desktop.
AlbumRepository
package kr.hconnect.mongo.test.music.model;
import org.bson.types.ObjectId;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* Simple repositories interface to manage {@link Album} instances.
*
* @author 배성혁 [email protected]
* @since 13. 7. 20. 오후 4:16
*/
@Repository
public interface AlbumRepository extends CrudRepository<Album, ObjectId>, QueryDslPredicateExecutor<Album> {
List<Album> findByTracksName(String name);
List<Album> findByTracksNameLike(String name);
List<Album> findByTracksRatingGreaterThan(Stars rating);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment