Package io.manebot.database.model
Class Conversation
- java.lang.Object
-
- io.manebot.database.model.TimedRow
-
- io.manebot.database.model.Conversation
-
- All Implemented Interfaces:
Conversation
,EntityType
@Entity public class Conversation extends TimedRow implements Conversation
-
-
Constructor Summary
Constructors Constructor Description Conversation(Database database)
Conversation(Database database, Entity entity, Platform platform, java.lang.String id)
-
Method Summary
Modifier and Type Method Description Chat
getChat()
Gets the chat instance associated with this Conversation.int
getConversationId()
Entity
getEntity()
Gets the entity associated with this object.java.lang.String
getId()
Gets the Id of this conversation.Platform
getPlatform()
Gets the platform associated with this conversation.int
hashCode()
boolean
isConnected()
Finds if this conversation is connected to a chat object.void
setId(java.lang.String id)
-
Methods inherited from class io.manebot.database.model.TimedRow
getCreated, getCreatedDate, getUpdated, getUpdatedDate, setCreated, setCreated, setCreatedDate, setUpdated, setUpdated, setUpdatedDate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.manebot.entity.EntityType
checkPermission, checkPermission, checkPermission, checkPermission, hasPermission, hasPermission, hasPermission, hasPermission
-
-
-
-
Method Detail
-
getConversationId
public int getConversationId()
-
getId
public java.lang.String getId()
Description copied from interface:Conversation
Gets the Id of this conversation.- Specified by:
getId
in interfaceConversation
- Returns:
- Conversation Id.
-
getChat
public Chat getChat()
Description copied from interface:Conversation
Gets the chat instance associated with this Conversation.- Specified by:
getChat
in interfaceConversation
- Returns:
- Chat instance.
-
isConnected
public boolean isConnected()
Description copied from interface:Conversation
Finds if this conversation is connected to a chat object. If this is true, getChat() should not be null.- Specified by:
isConnected
in interfaceConversation
- Returns:
- true if getChat() is not null, and is reporting connectivity such that getChat().isConnected() == true.
-
setId
public void setId(java.lang.String id)
-
getPlatform
public Platform getPlatform()
Description copied from interface:Conversation
Gets the platform associated with this conversation.- Specified by:
getPlatform
in interfaceConversation
- Returns:
- Platform instance.
-
getEntity
public Entity getEntity()
Description copied from interface:EntityType
Gets the entity associated with this object.- Specified by:
getEntity
in interfaceEntityType
- Returns:
- Associated entity.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-