Class StoreMessageCommand
java.lang.Object
marauroa.server.db.command.AbstractDBCommand
games.stendhal.server.core.engine.dbcommand.StoreMessageCommand
- All Implemented Interfaces:
DBCommand
Store postman messages for a player, if a character for them exists
Can find out from this function if the character existed
- Author:
- kymara
-
Constructor Summary
ConstructorDescriptionStoreMessageCommand(String source, String target, String message, String messagetype)
creates a new StoreMessageCommand -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute(DBTransaction transaction)
processes the database request.To access the messageTo access the source message senderTo access the character name we queriedboolean
is ignoredboolean
checks if account name could be found - which tells if the character whom the message was for, existedtoString()
returns a string suitable for debug output of this DBCommand.Methods inherited from class marauroa.server.db.command.AbstractDBCommand
getEnqueueTime, getException, setEnqueueTime, setException
-
Constructor Details
-
StoreMessageCommand
creates a new StoreMessageCommand- Parameters:
source
- who left the messagetarget
- the player name the message is formessage
- what the message ismessagetype
- N for NPCs, S for support, P for player
-
-
Method Details
-
execute
Description copied from class:AbstractDBCommand
processes the database request.- Specified by:
execute
in interfaceDBCommand
- Specified by:
execute
in classAbstractDBCommand
- Parameters:
transaction
- DBTransaction- Throws:
SQLException
- in case of an database error
-
targetCharacterExists
public boolean targetCharacterExists()checks if account name could be found - which tells if the character whom the message was for, existed- Returns:
- true if an account was found for that character name
-
isIgnored
public boolean isIgnored()is ignored- Returns:
- ignored
-
getTarget
To access the character name we queried- Returns:
- target the character who we checked for
-
getSource
To access the source message sender- Returns:
- source who sent the message
-
getMessage
To access the message- Returns:
- message
-
toString
returns a string suitable for debug output of this DBCommand.
-