Newer
Older
CosmosServer / src / main / java / com / example / cosmos_serversb / entities / Group.java
//このクラスは仮です
package com.example.cosmos_serversb.entities;

import java.util.ArrayList;

import static com.example.cosmos_serversb.models.Users.*;

public class Group {
    private Long id;
    private String gId, uri, name;
    private ArrayList<User> members;
    private ArrayList<Request> requests;

    private 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;
    }

    //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(){
        return gId;
    }

    private void setUri(String uri){
        this.uri = uri;
    }

    public String getUriByGid(String gId){
        return uri;
    }

    private void setName(String name){
        this.name = name;
    }

    public String getNameByGid(String gId){
        return name;
    }

    /*メンバー*/
    //public ArrayList<User> getMembersList(){
    //    return null;
    //}

    //public void addMemberByUid(String uId){
    //
    //    members.add(user);
    //}

    //public DeleteResult deleteMember(String uid){
    //    members.remove(members.indexOf(uid));
    //    return null;
    //}

    /*リクエスト*/

}