diff --git a/src/main/java/com/example/cosmos_serversb/jsons/GroupJson.java b/src/main/java/com/example/cosmos_serversb/jsons/GroupJson.java index 3708bef..2b2a534 100644 --- a/src/main/java/com/example/cosmos_serversb/jsons/GroupJson.java +++ b/src/main/java/com/example/cosmos_serversb/jsons/GroupJson.java @@ -13,17 +13,15 @@ public class GroupJson { private String gId; private String uri, name; - //private Map members = new HashMap<>();//HashSetでいいのかな? private ArrayList members = new ArrayList<>(); - private Map requests = new HashMap<>(); + private ArrayList requests = new ArrayList<>(); public GroupJson(Group group){ setgId(group.getgId()); setUri(group.getUri()); setName(group.getName()); - //changeMembersMap(group.getMembers()); createUidUri(group.getMembers()); - changeRequestsMap(group.getRequests()); + createRidUri(group.getRequests()); } public String getgId() { @@ -58,15 +56,6 @@ return name; } -// public Map getMembers() { -// return members; -// } - -// public void setMembers(Map members) { -// this.members = members; -// } - - public ArrayList getMembers() { return members; } @@ -75,11 +64,11 @@ this.members = members; } - public Map getRequests() { + public ArrayList getRequest() { return requests; } - public void setRequests(Map requests) { + public void setRequests(ArrayList requests) { this.requests = requests; } @@ -89,20 +78,11 @@ } } -// private void changeMembersMap(Set set){ -// for ( User user : (Set) set ) { -// members.put(user.getuId(), getUri()); -// } -// } - - private void changeRequestsMap(Set set){ + private void createRidUri(Set set){ for ( Request request : (Set) set ) { - requests.put(request.getrId(), getUri()); + requests.add( new RidUriJson(request) ); } } - - - }