Spring Data Same programming model for many databases simple things simple, complex things possible One API to rule them all - nope reduce amount boilerplate code
Spring Data Same programming model for many databases simple things simple, complex things possible One API to rule them all - nope reduce amount boilerplate code
Repositories public interface UserRepository extends PagingAndSortingRepository{ User findByName(String name); List findByNameLike(String name, Pageable pageable); }
Map Reduce // reduce function (key, values) { var sum = 0; for (var i = 0; i < values.length; i++) sum += values[i]; return sum; } // map function () { emit(this.description, 1); }
QueryDSL @Generated("com.mysema.query.codegen.EntitySerializer") public class QPost extends EntityPathBase { private static final long serialVersionUID = -1782980951; private static final PathInits INITS = PathInits.DIRECT; public static final QPost post = new QPost("post"); public final QUser author; public final ListPath comments = this.QComment>createList("comments", Comment.class, QComment.class, PathInits.DIRECT); public final StringPath content = createString("content"); public final org.joda.time.QDateTime createdAt; public final org.bson.types.QObjectId id; Type-Safe criteria API
QueryDSL postRepository.findAll(QPost.post.content.contains("hello"))); @Generated("com.mysema.query.codegen.EntitySerializer") public class QPost extends EntityPathBase { private static final long serialVersionUID = -1782980951; private static final PathInits INITS = PathInits.DIRECT; public static final QPost post = new QPost("post"); public final QUser author; public final ListPath comments = this.QComment>createList("comments", Comment.class, QComment.class, PathInits.DIRECT); public final StringPath content = createString("content"); public final org.joda.time.QDateTime createdAt; public final org.bson.types.QObjectId id; Type-Safe criteria API