use of com.example.demo.entity.order40.Member in project molgenis-emx2 by molgenis.
the class TestEmx2Roles method testRolesIO.
@Test
public void testRolesIO() {
// create user roles
schema.addMember("bofke", "Viewer");
TableStore store = new TableStoreForCsvInMemory();
// export
Emx2Members.outputRoles(store, schema);
// empty the database, verify
schema = schema.getDatabase().dropCreateSchema(TestEmx2Roles.class.getSimpleName());
assertEquals(0, schema.getMembers().size());
// import and see if consistent
Emx2Members.inputRoles(store, schema);
List<Member> members = schema.getMembers();
assertEquals("bofke", members.get(0).getUser());
assertEquals("Viewer", members.get(0).getRole());
}
use of com.example.demo.entity.order40.Member in project LectureContents by KHWeb19.
the class Second29thMemberController method viewInfo.
// 실제로는 아래 코드에서 리턴되는 member는 그냥 객체(메모리 주소)일 뿐인데
// 웹 상에서 출력되는 정보는 JSON 형태로 출력되었다.
// 이를 지원하는 녀석은 ResponseBody에 해당한다.
@ResponseBody
@GetMapping("/view-info")
public Member viewInfo() {
log.info("viewInfo()");
Member member = new Member();
log.info("member: " + member);
return member;
}
use of com.example.demo.entity.order40.Member in project LectureContents by KHWeb19.
the class Second29thMemberRestController method viewMemberMapInfo.
@GetMapping("/view-map")
public Map<String, Member> viewMemberMapInfo() {
log.info("viewMemberMapInfo()");
Map<String, Member> map = new HashMap<>();
for (int i = 0; i < 3; i++) {
Member member = new Member();
map.put("key" + i, member);
}
return map;
}
use of com.example.demo.entity.order40.Member in project LectureContents by KHWeb19.
the class Second29thMemberRestController method viewInfo.
@GetMapping("/view-info")
public Member viewInfo() {
log.info("viewInfo()");
Member member = new Member();
log.info("member: " + member);
return member;
}
use of com.example.demo.entity.order40.Member in project LectureContents by KHWeb19.
the class QnaController method doubleMapTest.
@GetMapping("doubleMapTest")
public Map<String, Member> doubleMapTest() {
log.info("doubleMapTest()");
Map<String, Member> map = new HashMap<>();
for (int i = 0; i < 3; i++) {
Member member = new Member();
map.put("key" + i, member);
}
for (Map.Entry<String, Member> each : map.entrySet()) {
String key = each.getKey();
Member value = each.getValue();
log.info("key = " + key + ", value = " + value);
}
return map;
}
Aggregations