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 ChatgetChat()Gets the chat instance associated with this Conversation.intgetConversationId()EntitygetEntity()Gets the entity associated with this object.java.lang.StringgetId()Gets the Id of this conversation.PlatformgetPlatform()Gets the platform associated with this conversation.inthashCode()booleanisConnected()Finds if this conversation is connected to a chat object.voidsetId(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:ConversationGets the Id of this conversation.- Specified by:
getIdin interfaceConversation- Returns:
- Conversation Id.
-
getChat
public Chat getChat()
Description copied from interface:ConversationGets the chat instance associated with this Conversation.- Specified by:
getChatin interfaceConversation- Returns:
- Chat instance.
-
isConnected
public boolean isConnected()
Description copied from interface:ConversationFinds if this conversation is connected to a chat object. If this is true, getChat() should not be null.- Specified by:
isConnectedin 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:ConversationGets the platform associated with this conversation.- Specified by:
getPlatformin interfaceConversation- Returns:
- Platform instance.
-
getEntity
public Entity getEntity()
Description copied from interface:EntityTypeGets the entity associated with this object.- Specified by:
getEntityin interfaceEntityType- Returns:
- Associated entity.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-