Search in sources :

Example 6 with Member

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());
}
Also used : TableStoreForCsvInMemory(org.molgenis.emx2.io.tablestore.TableStoreForCsvInMemory) Member(org.molgenis.emx2.Member) TableStore(org.molgenis.emx2.io.tablestore.TableStore) Test(org.junit.Test)

Example 7 with Member

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;
}
Also used : Member(com.example.demo.entity.order29.Member) GetMapping(org.springframework.web.bind.annotation.GetMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 8 with 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;
}
Also used : HashMap(java.util.HashMap) Member(com.example.demo.entity.order29.Member) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 9 with Member

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;
}
Also used : Member(com.example.demo.entity.order29.Member) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 10 with 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;
}
Also used : HashMap(java.util.HashMap) Member(com.example.demo.entity.order29.Member) Map(java.util.Map) HashMap(java.util.HashMap) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Aggregations

Member (com.example.demo.entity.order29.Member)5 GetMapping (org.springframework.web.bind.annotation.GetMapping)5 Member (com.eomcs.generic.ex02.Member)4 ArrayList (java.util.ArrayList)4 Member (org.openstack4j.model.image.v2.Member)4 Capabilities (org.geotoolkit.sml.xml.v100.Capabilities)3 Classification (org.geotoolkit.sml.xml.v100.Classification)3 Contact (org.geotoolkit.sml.xml.v100.Contact)3 Identification (org.geotoolkit.sml.xml.v100.Identification)3 Keywords (org.geotoolkit.sml.xml.v100.Keywords)3 Member (org.geotoolkit.sml.xml.v100.Member)3 InputStream (java.io.InputStream)2 HashMap (java.util.HashMap)2 JAXBElement (javax.xml.bind.JAXBElement)2 Unmarshaller (javax.xml.bind.Unmarshaller)2 DefaultIdentifier (org.apache.sis.metadata.iso.DefaultIdentifier)2 TimePositionType (org.geotoolkit.gml.xml.v311.TimePositionType)2 Classifier (org.geotoolkit.sml.xml.v100.Classifier)2 ClassifierList (org.geotoolkit.sml.xml.v100.ClassifierList)2 Identifier (org.geotoolkit.sml.xml.v100.Identifier)2