diff --git a/src/main/java/com/example/cosmos_serversb/entities/Group.java b/src/main/java/com/example/cosmos_serversb/entities/Group.java index 524fa87..8d0bdfb 100644 --- a/src/main/java/com/example/cosmos_serversb/entities/Group.java +++ b/src/main/java/com/example/cosmos_serversb/entities/Group.java @@ -3,45 +3,34 @@ import java.util.ArrayList; -import static com.example.cosmos_serversb.models.Users.*; - public class Group { - private Long id; - private String gId, uri, name; + private Long gId; + private String uri, name; private ArrayList members; private ArrayList requests; - private Group(){ + public Group(){ } public Group(String gId, String uri, String name, String uId){ - this.gId = gId; - //setGid(gId); - setUri(uri); - setName(name); - this.members.add(getUserById(uId)); - this.requests = null; + this.gId = Long.parseLong(gId); + this.uri = uri; + this.name = name; } - //hibernate用 - public Long getId() { - return id; - } - - private void setId(Long id) { - this.id = id; - } - - - private void setGid(String gId){ - this.gId = gId; - } - - public String getGid(){ + public Long getgId() { return gId; } + private void setgId(Long gId) { + this.gId = gId; + } + + public String getUri() { + return uri; + } + private void setUri(String uri){ this.uri = uri; } @@ -54,6 +43,10 @@ this.name = name; } + public String getName(){ + return name; + } + public String getNameByGid(String gId){ return name; }