// PostDao and Post are generated by jOOQ
@Autowired PostDao dao;
@Autowired DSLContext dsl;
public List<Post> findAllByIdAndActive(UInteger id, Boolean active){
return dsl.selectFrom(POST)
.where(POST.ID.eq(id))
.and(POST.ACTIVE.eq(active))
.fetch()
.map(dao.mapper());
}