Class RelationShip

    • Constructor Detail

      • RelationShip

        public RelationShip​(int user1Id,
                            int user2Id,
                            int typeRelationShipId,
                            Date acceptanceDate)
      • RelationShip

        public RelationShip()
    • Method Detail

      • getId

        public int getId()
        get id of relationship
        Returns:
        int
      • getAcceptanceDate

        public Date getAcceptanceDate()
        get date of relationship
        Returns:
        date
      • getTypeRelationShipId

        public int getTypeRelationShipId()
        get the id of this ralationShip type
        Returns:
        int
      • getUser1Id

        public int getUser1Id()
        get the first user of this Invitation (the inviter)
        Returns:
        int
      • getUser2Id

        public int getUser2Id()
        get the second user of this Invitation
        Returns:
        int
      • setId

        public void setId​(int id)
        set the id of relationship
        Parameters:
        id - the identifier to set
      • setAcceptanceDate

        public void setAcceptanceDate​(Date acceptanceDate)
        set the date of relationship
        Parameters:
        acceptanceDate - Date
      • setTypeRelationShipId

        public void setTypeRelationShipId​(int typeRelationShipId)
        set the date of relationship
        Parameters:
        typeRelationShipId - int
      • setUser1Id

        public void setUser1Id​(int user1Id)
        set the first user of relationship
        Parameters:
        user1Id - int
      • setUser2Id

        public void setUser2Id​(int user2Id)
        set the second user of relationship
        Parameters:
        user2Id - int
      • setInviterId

        public void setInviterId​(int inviterId)
        set the inviter user
        Parameters:
        inviterId - int
      • getInviterId

        public int getInviterId()
        get the inviter
        Returns:
        int
      • equals

        public boolean equals​(Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object