@Test public void getGroup() { assertThat(group1.getName()).isEqualTo("group1"); assertThat(group1.getDescription()).isEqualTo("desc1"); assertThat(group1.getCreatedBy()).isEqualTo("creator1"); assertThat(group1.getUpdatedBy()).isEqualTo("updater1"); }
public Optional<Group> getGroup(String name) { GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.NAME.eq(name)); return Optional.ofNullable(r).map(groupMapper::map); }
GroupDAO { public Optional<Group> getGroup(String name) { GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.NAME.eq(name)); return Optional.ofNullable(r).map(groupMapper::map); } }
GroupDAO { public Optional<Group> getGroup(String name) { GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.NAME.eq(name)); return Optional.ofNullable(r).map(groupMapper::map); } private  GroupDAO(DSLContext dslContext, GroupMapper groupMapper, ObjectMapper mapper); }
GroupDAO { public Optional<Group> getGroup(String name) { GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.NAME.eq(name)); return Optional.ofNullable(r).map(groupMapper::map); } private  GroupDAO(DSLContext dslContext, GroupMapper groupMapper, ObjectMapper mapper); long createGroup(String name, String creator, String description, ImmutableMap<String, String> metadata); void deleteGroup(Group group); Optional<Group> getGroup(String name); Optional<Group> getGroupById(long id); ImmutableSet<Group> getGroups(); }
GroupDAO { public Optional<Group> getGroup(String name) { GroupsRecord r = dslContext.fetchOne(GROUPS, GROUPS.NAME.eq(name)); return Optional.ofNullable(r).map(groupMapper::map); } private  GroupDAO(DSLContext dslContext, GroupMapper groupMapper, ObjectMapper mapper); long createGroup(String name, String creator, String description, ImmutableMap<String, String> metadata); void deleteGroup(Group group); Optional<Group> getGroup(String name); Optional<Group> getGroupById(long id); ImmutableSet<Group> getGroups();  }