Package com.cometchat.pro.models
Class Group
- java.lang.Object
-
- com.cometchat.pro.models.AppEntity
-
- com.cometchat.pro.models.Group
-
public class Group extends AppEntity
Created by adityagokula on 12/09/18.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLUMN_CREATED_AT
static java.lang.String
COLUMN_DESCRIPTION
static java.lang.String
COLUMN_GROUP_TYPE
static java.lang.String
COLUMN_GUID
static java.lang.String
COLUMN_HAS_JOINED
static java.lang.String
COLUMN_ICON
static java.lang.String
COLUMN_IDENTITY
static java.lang.String
COLUMN_METADATA
static java.lang.String
COLUMN_NAME
static java.lang.String
COLUMN_OWNER
static java.lang.String
COLUMN_PASSWORD
static java.lang.String
COLUMN_UPDATED_AT
static java.lang.String
TABLE_GROUPS
-
Constructor Summary
Constructors Constructor Description Group()
Group(java.lang.String guid, java.lang.String name, java.lang.String groupType, java.lang.String password)
Group(java.lang.String guid, java.lang.String name, java.lang.String groupType, java.lang.String password, java.lang.String icon, java.lang.String description)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
static Group
fromJson(java.lang.String json)
static java.util.List<Group>
fromJSONArray(java.lang.String response)
long
getCreatedAt()
Get timestamp of group creationjava.lang.String
getDescription()
Get description of the Groupjava.lang.String
getGroupType()
Get type of the group types of th group : GROUP_TYPE_PUBLIC GROUP_TYPE_PASSWORD GROUP_TYPE_PRIVATEjava.lang.String
getGuid()
Get unique identifier of the Groupjava.lang.String
getIcon()
Get URL of the iconlong
getJoinedAt()
Get join at timestamp of logged in user in a particular groupint
getMembersCount()
Get number of members that are a part of the groupJSONObject
getMetadata()
GetJSONObject
of data set by developer
java.lang.String
getName()
Get name of the groupjava.lang.String
getOwner()
GetUID
of the owner of the Group
java.lang.String
getPassword()
Get password of the password protected groupjava.lang.String
getScope()
Get scope of logged in user in a particular groupjava.util.List<java.lang.String>
getTags()
Get the tags that are specified for the grouplong
getUpdatedAt()
Get timestamp of group updateint
hashCode()
boolean
isJoined()
Get join information of logged in user in a particular groupvoid
setCreatedAt(long createdAt)
void
setDescription(java.lang.String description)
void
setGroupType(java.lang.String groupType)
void
setGuid(java.lang.String guid)
void
setHasJoined(boolean hasJoined)
void
setIcon(java.lang.String icon)
void
setJoinedAt(long joinedAt)
void
setMembersCount(int membersCount)
void
setMetadata(JSONObject metadata)
void
setName(java.lang.String name)
void
setOwner(java.lang.String owner)
void
setPassword(java.lang.String password)
void
setScope(java.lang.String scope)
void
setTags(java.util.List<java.lang.String> tags)
void
setUpdatedAt(long updatedAt)
java.util.HashMap<java.lang.String,java.lang.String>
toMap()
java.lang.String
toString()
-
-
-
Field Detail
-
TABLE_GROUPS
public static final java.lang.String TABLE_GROUPS
- See Also:
- Constant Field Values
-
COLUMN_GUID
public static final java.lang.String COLUMN_GUID
- See Also:
- Constant Field Values
-
COLUMN_NAME
public static final java.lang.String COLUMN_NAME
- See Also:
- Constant Field Values
-
COLUMN_GROUP_TYPE
public static final java.lang.String COLUMN_GROUP_TYPE
- See Also:
- Constant Field Values
-
COLUMN_PASSWORD
public static final java.lang.String COLUMN_PASSWORD
- See Also:
- Constant Field Values
-
COLUMN_ICON
public static final java.lang.String COLUMN_ICON
- See Also:
- Constant Field Values
-
COLUMN_DESCRIPTION
public static final java.lang.String COLUMN_DESCRIPTION
- See Also:
- Constant Field Values
-
COLUMN_OWNER
public static final java.lang.String COLUMN_OWNER
- See Also:
- Constant Field Values
-
COLUMN_METADATA
public static final java.lang.String COLUMN_METADATA
- See Also:
- Constant Field Values
-
COLUMN_CREATED_AT
public static final java.lang.String COLUMN_CREATED_AT
- See Also:
- Constant Field Values
-
COLUMN_UPDATED_AT
public static final java.lang.String COLUMN_UPDATED_AT
- See Also:
- Constant Field Values
-
COLUMN_HAS_JOINED
public static final java.lang.String COLUMN_HAS_JOINED
- See Also:
- Constant Field Values
-
COLUMN_IDENTITY
public static final java.lang.String COLUMN_IDENTITY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Group
public Group(java.lang.String guid, java.lang.String name, java.lang.String groupType, java.lang.String password)
-
Group
public Group(java.lang.String guid, java.lang.String name, java.lang.String groupType, java.lang.String password, java.lang.String icon, java.lang.String description)
-
Group
public Group()
-
-
Method Detail
-
getGuid
public java.lang.String getGuid()
Get unique identifier of the Group- Returns:
- GUID of the group
- Since:
- v1
-
setGuid
public void setGuid(java.lang.String guid)
-
getName
public java.lang.String getName()
Get name of the group- Returns:
- name of the Group
- Since:
- v1
-
setName
public void setName(java.lang.String name)
-
getIcon
public java.lang.String getIcon()
Get URL of the icon- Returns:
- URL of the icon
- Since:
- v1
-
setIcon
public void setIcon(java.lang.String icon)
-
getDescription
public java.lang.String getDescription()
Get description of the Group- Returns:
- description of the group
- Since:
- v1
-
setDescription
public void setDescription(java.lang.String description)
-
getOwner
public java.lang.String getOwner()
GetUID
of the owner of the Group
- Returns:
- UID of the user
- Since:
- v1
-
setOwner
public void setOwner(java.lang.String owner)
-
getGroupType
public java.lang.String getGroupType()
Get type of the group types of th group :- GROUP_TYPE_PUBLIC
- GROUP_TYPE_PASSWORD
- GROUP_TYPE_PRIVATE
- Returns:
- type of the Group
- Since:
- v1
- See Also:
CometChatConstants.GroupTypes
-
setGroupType
public void setGroupType(java.lang.String groupType)
-
getPassword
public java.lang.String getPassword()
Get password of the password protected group- Returns:
- password of the group
- Since:
- v1
-
setPassword
public void setPassword(java.lang.String password)
-
getMetadata
public JSONObject getMetadata()
GetJSONObject
of data set by developer
- Returns:
JSONObject
of custom data set by developer
- Since:
- v1
-
setMetadata
public void setMetadata(JSONObject metadata)
-
getCreatedAt
public long getCreatedAt()
Get timestamp of group creation- Returns:
- creation timestamp
- Since:
- v1
-
setCreatedAt
public void setCreatedAt(long createdAt)
-
getUpdatedAt
public long getUpdatedAt()
Get timestamp of group update- Returns:
- updated timestamp
- Since:
- v1
-
setUpdatedAt
public void setUpdatedAt(long updatedAt)
-
isJoined
public boolean isJoined()
Get join information of logged in user in a particular group- Returns:
- true if logged in user is part of the group else false
- Since:
- v1
-
setHasJoined
public void setHasJoined(boolean hasJoined)
-
getJoinedAt
public long getJoinedAt()
Get join at timestamp of logged in user in a particular group- Returns:
- timestamp of joined at of logged in user
- Since:
- v1
-
setJoinedAt
public void setJoinedAt(long joinedAt)
-
getScope
public java.lang.String getScope()
Get scope of logged in user in a particular group- Returns:
- scope of logged in user
- Since:
- v1
-
setScope
public void setScope(java.lang.String scope)
-
getMembersCount
public int getMembersCount()
Get number of members that are a part of the group- Returns:
- number of participants for the group
- Since:
- v1
-
setMembersCount
public void setMembersCount(int membersCount)
-
getTags
public java.util.List<java.lang.String> getTags()
Get the tags that are specified for the group- Returns:
- number of participants for the group
- Since:
- v2.1.6
-
setTags
public void setTags(java.util.List<java.lang.String> tags)
-
toMap
public java.util.HashMap<java.lang.String,java.lang.String> toMap()
-
fromJson
public static Group fromJson(java.lang.String json)
-
fromJSONArray
public static java.util.List<Group> fromJSONArray(java.lang.String response) throws JSONException
- Throws:
JSONException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-