Class PostmanDAO
java.lang.Object
games.stendhal.server.core.engine.db.PostmanDAO
Database access for postman messages.
- Author:
- kymara
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetChatMessages(DBTransaction transaction, String charname) gets a list of ChatMessages for this charactervoidmarkMessagesDelivered(DBTransaction transaction, String charname) marks messages delivered for this charactervoidstoreMessage(DBTransaction transaction, String source, String target, String message, String messagetype, Timestamp timestamp) store a message from any named source We do not specify it must be a player because NPCs use postman to send messages
-
Constructor Details
-
PostmanDAO
public PostmanDAO()
-
-
Method Details
-
storeMessage
public void storeMessage(DBTransaction transaction, String source, String target, String message, String messagetype, Timestamp timestamp) throws SQLException store a message from any named source We do not specify it must be a player because NPCs use postman to send messages- Parameters:
transaction- DBTransactionsource- name of sourcetarget- name of player that the message is formessage- message to be sentmessagetype- N for NPCs, S for support, P for playertimestamp- timestamp- Throws:
SQLException- in case of an database error
-
getChatMessages
public List<ChatMessage> getChatMessages(DBTransaction transaction, String charname) throws SQLException gets a list of ChatMessages for this character- Parameters:
transaction- DBTransactioncharname- charname - name of character- Returns:
- list of ChatMessages
- Throws:
SQLException- in case of an database error
-
markMessagesDelivered
marks messages delivered for this character- Parameters:
transaction- DBTransactioncharname- charname - name of character- Throws:
SQLException- in case of an database error
-