Class MailDAO
java.lang.Object
net.flectone.pulse.data.database.dao.MailDAO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondatabase()Gets the database instance associated with this DAO.voidDeletes a mail message.getReceiver(FPlayer fPlayer) Gets mail messages received by a player.Gets mail messages sent by a player.Inserts a new mail message.sqlClass()Gets the SQL interface class for this DAO.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BaseDAO
getSQL, inTransaction, useCustomTransaction, useHandle, useTransaction, withHandle
-
Constructor Details
-
MailDAO
-
-
Method Details
-
database
-
sqlClass
-
insert
public @NonNull Optional<Mail> insert(@NonNull FPlayer sender, @NonNull FPlayer receiver, @NonNull String message) Inserts a new mail message.- Parameters:
sender- the player who sent the mailreceiver- the player who received the mailmessage- the mail message content- Returns:
- the created mail record, or empty if players are unknown
-
delete
Deletes a mail message.- Parameters:
mail- the mail record to delete
-
getReceiver
-
getSender
-