com.planet_ink.coffee_mud.core.database
Class DBInterface

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.database.DBInterface
All Implemented Interfaces:
CMObject, CMLibrary, DatabaseEngine, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DBInterface
extends java.lang.Object
implements DatabaseEngine


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.DatabaseEngine
DatabaseEngine.AckRecord, DatabaseEngine.AckStats, DatabaseEngine.DatabaseTables, DatabaseEngine.PlayerData, DatabaseEngine.PollData
 
Constructor Summary
DBInterface(DBConnector DB, java.util.Set<java.lang.String> privacyV)
           
 
Method Summary
 boolean activate()
          Activates the library.
 void addBackLogEntry(java.lang.String channelName, java.lang.String entry)
          Table category: DBBACKLOG Adds a CHANNEL message to the backlog table
 int compareTo(CMObject o)
           
 CMObject copyOf()
          Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.
 int DBCountJournal(java.lang.String journalID, java.lang.String from, java.lang.String to)
          Table category: DBJOURNALS Returns the number of messages found in the given journal optionally sent from the given user name, and/or optionally to the given user name.
 int DBCountPlayerData(java.lang.String section)
          Table category: DBPLAYERDATA Counts the number of rows of data/entries per section.
 int DBCountPlayerData(java.lang.String playerID, java.lang.String section)
          Table category: DBPLAYERDATA Counts the number of rows of data/entries
 int[] DBCountRoomMobsItems(java.lang.String roomID)
          Table category: DBMAP Counts the number of mobs and items in the room according to the database, and returns the counts as a numeric array where the first element is the number of mobs and the second the number of items.
 void DBCreateAbility(java.lang.String classID, java.lang.String typeClass, java.lang.String data)
          Table category: DBABILITY Creates a new entry in the generic ability (CMGAAC) table with the given unique ID and xml definition data.
 void DBCreateAccount(PlayerAccount account)
          Table category: DBPLAYERS Inserts a new row into the account record in the database.
 void DBCreateArea(Area A)
          Table category: DBMAP Creates a new area record in the database.
 void DBCreateCharacter(MOB mob)
          Table category: DBPLAYERS Creates the character record for the given mob in the CMCHAR table in the database, and updates the account record if any.
 void DBCreateClan(Clan C)
          Table category: DBCLANS Creates the given clan in the database.
 void DBCreateClass(java.lang.String classID, java.lang.String data)
          Table category: DBCHARCLASS Creates a new entry in the generic charclasses (CMCCAC) table with the given unique ID and xml definition data.
 DatabaseEngine.PlayerData DBCreatePlayerData(java.lang.String player, java.lang.String section, java.lang.String key, java.lang.String data)
          Table category: DBPLAYERDATA Creates a single player data entry.
 void DBCreatePoll(java.lang.String name, java.lang.String player, java.lang.String subject, java.lang.String description, java.lang.String optionXML, int flag, java.lang.String qualZapper, java.lang.String results, long expiration)
          Table category: DBPOLLS Creates a new poll in the DBPOLLS table.
 void DBCreateRace(java.lang.String raceID, java.lang.String data)
          Table category: DBRACE Creates a new entry in the generic races (CMGRAC) table with the given unique ID and xml definition data.
 void DBCreateRoom(Room room)
          Table category: DBMAP Creates the basic room object entry in the data.
 boolean DBCreateStat(long startTime, long endTime, java.lang.String data)
          Table category: DBSTATS Creates a days worth of stats in the CMSTAT table in the database.
 void DBCreateThisItem(java.lang.String roomID, Item thisItem)
          Table category: DBMAP Inserts the given item into the given room id in the database, regardless of its worthiness to be there.
 void DBCreateThisMOB(java.lang.String roomID, MOB thisMOB)
          Table category: DBMAP Inserts the given mob into the given room id in the database, regardless of its worthiness to be there.
 void DBCreateVFSFile(java.lang.String filename, int bits, java.lang.String creator, long updateTime, java.lang.Object data)
          Table category: DBVFS Creates a new file in the DBFS filesystem stored in the CBVFS table.
 void DBDeleteAbility(java.lang.String classID)
          Removes a generic ability from the CMGAAC table.
 void DBDeleteAccount(PlayerAccount account)
          Table category: DBPLAYERS Removes only the given account from the database.
 void DBDeleteAllPlayerData(java.lang.String name)
          Table category: DBPLAYERDATA Deletes all player data belonging to the player, of all types and sections, all over.
 void DBDeleteArea(Area A)
          Table category: DBMAP Removes the given area record from the database.
 void DBDeleteAreaAndRooms(Area A)
          Table category: DBMAP Removes the given area record from the database.
 void DBDeleteClan(Clan C)
          Table category: DBCLANS Removes the given clan, all of its items and records, membership, and everything about it from the database.
 void DBDeleteClass(java.lang.String classID)
          Table category: DBCHARCLASS Removes a generic charclass from the CMCCAC table.
 void DBDeleteItem(java.lang.String roomID, Item item)
          Table category: DBMAP Removes the given item, and only the given item, from the database records for the given room id.
 void DBDeleteJournal(java.lang.String journalID, java.lang.String msgKeyOrNull)
          Table category: DBJOURNALS Deletes enter a specific message, or all messages, from the given journal.
 void DBDeleteMOB(java.lang.String roomID, MOB mob)
          Table category: DBMAP Removes the given mob, and only the given mob, from the database records for the given room id.
 void DBDeletePlayerData(java.lang.String playerID, java.lang.String section)
          Table category: DBPLAYERDATA Deletes all of the data for the given player of the given section/type.
 void DBDeletePlayerData(java.lang.String playerID, java.lang.String section, java.lang.String key)
          Table category: DBPLAYERDATA Deletes what is probably a single player data entry, but could be more.
 void DBDeletePlayerOnly(java.lang.String mobName)
          Table category: DBPLAYERS Removes the character and clan affiliation records from the database and nothing else.
 void DBDeletePlayerPrivateJournalEntries(java.lang.String name)
          Table category: DBJOURNALS This message deletes all private messages with the given user id as a recipient.
 void DBDeletePlayerSectionData(java.lang.String section)
          Table category: DBPLAYERDATA Deletes all player data of the given section/type.
 void DBDeletePoll(java.lang.String name)
          Table category: DBPOLLS Deletes a poll, and all its options and results, forever.
 void DBDeleteRace(java.lang.String raceID)
          Table category: DBRACE Removes a generic race from the CMGRAC table.
 void DBDeleteRoom(Room room)
          Table category: DBMAP Deletes the room and all of its exits and contents from the database entirely.
 void DBDeleteStat(long startTime)
          Table category: DBSTATS Deletes a days worth of stats from the CMSTAT table in the database.
 void DBDeleteVFSFile(java.lang.String filename)
          Table category: DBVFS Deletes a file from the DBFS in the DBVFS table.
 java.util.List<java.lang.String> DBExpiredCharNameSearch(java.util.Set<java.lang.String> skipNames)
          Table category: DBPLAYERS If this system uses the character expiration system, then this method will scan all the players for expired characters, and return the list of names, or an empty list if there are none.
 Pair<java.lang.String,java.lang.Boolean> DBFetchEmailData(java.lang.String name)
          Table category: DBPLAYERS Returns the email address and autoforward flag for the player with the given name.
 Clan.MemberRecord DBGetClanMember(java.lang.String clan, java.lang.String name)
          Table category: DBCLANS Reads information about a single clan member of the given exact name from the clan of the given exact name.
 java.lang.String DBGetRealJournalName(java.lang.String possibleName)
          Table category: DBJOURNALS A silly function that queries the database for a journal of the given exact name, and if it is found, it returns it, otherwise it returns null.
 java.lang.String DBIsAreaName(java.lang.String name)
          Table category: DBMAP Checks for the database for an area with approximately the given name, returning the correct name if found, false otherwise.
 long[] DBJournalLatestDateNewerThan(java.lang.String journalID, java.lang.String to, long olderTime)
          Table category: DBJOURNALS This method returns a two dimensional array, where the first long is the update timestamp of the latest message in the journal, optionally to the given recipient, and the second long is the number of messages found that are newer than the given timestamp.
 java.util.List<PlayerAccount> DBListAccounts(java.lang.String mask)
          Table category: DBPLAYERS Populates and returns a list of player account objects that match the given lowercase substring.
 java.lang.String DBPlayerEmailSearch(java.lang.String email)
          Table category: DBPLAYERS Returns the name of the player with the given email address.
 void DBPlayerNameChange(java.lang.String oldName, java.lang.String newName)
          Table category: DBPLAYERS Renames all player records belonging to the old name to the new name.
 void DBPruneOldRaces()
          Table category: DBRACE Deletes entries in the generic race (CMGRAC) table that are older than RACEEXPIRATIONDAYS old (see ini file).
 int DBRawExecute(java.lang.String sql)
          Executes an arbitrary SQL statement against your main database and returns the response number/code.
 java.util.List<java.lang.String[]> DBRawQuery(java.lang.String sql)
          Executes an arbitrary SQL query against your main database and returns the results as a list of string arrays, where each array is a row, and each column is a column from the query.
 java.util.List<DatabaseEngine.AckRecord> DBReadAbilities()
          Table category: DBABILITY Reads all records from the CMGAAC table and returns the AckRecord for all of them in a list, to do with as you please.
 PlayerAccount DBReadAccount(java.lang.String Login)
          Table category: DBPLAYERS Loads an account with the given name from the database, populates a playeraccount object, and returns it.
 java.util.List<Clan> DBReadAllClans()
          Table category: DBCLANS Reads the entire list of clans, not including their stored items.
 java.util.List<DatabaseEngine.PlayerData> DBReadAllPlayerData(java.lang.String playerID)
          Table category: DBPLAYERDATA Just as it says, this method reads all player data, which is the only way to get all bank data at the same time, for example.
 void DBReadAllRooms(RoomnumberSet roomsToRead)
          Table category: DBMAP This method does a conventional boot load of all rooms and areas in the given set, including exits and content.
 void DBReadAreaData(Area A)
          Table category: DBMAP Reloads the basic data of the given area, with a prefilled Name.
 boolean DBReadAreaFull(java.lang.String areaName)
          Table category: DBMAP Reloads the given area by exact Name.
 Area DBReadAreaObject(java.lang.String areaName)
          Table category: DBMAP Reloads the basic data of the given area by exact Name.
 RoomnumberSet DBReadAreaRoomList(java.lang.String areaName, boolean reportStatus)
          Table category: DBMAP Reads all the room numbers for the area with the given name from the database and returns a compressed roomnumberset object.
 void DBReadArtifacts()
          Table category: DBPLAYERDATA Initializes the artifact ability tickers by reading them from the CMPDAT table, creating a Prop_Artifact ability, and setting it to start ticking.
 void DBReadCatalogs()
          Table category: DBMAP Loads both the mob and item catalogs into the catalog library.
 void DBReadClanItems(java.util.Map<java.lang.String,Clan> clans)
          Table category: DBCLANS Reads the entire list of clan items, and uses the map to get the clan object, and then adds the given item to both the clan object and to the World.
 java.util.List<Clan.MemberRecord> DBReadClanMembers(java.lang.String clan)
          Table category: DBCLANS Given an exact clan name, this method returns the entire membership as MemberRecords.
 java.util.List<DatabaseEngine.AckRecord> DBReadClasses()
          Table category: DBCHARCLASS Reads all records from the CMCCAC table and returns the AckRecord for all of them in a list, to do with as you please.
 void DBReadContent(java.lang.String roomID, Room thisRoom, boolean makeLive)
          Table category: DBMAP This method is used to load the content (items and mobs) of the given room id into the given room object, and optionally activate the contents to live use.
 void DBReadFollowers(MOB mob, boolean bringToLife)
          Table category: DBPLAYERS Loads the followers of the given mob and optionally brings them to life.
 JournalEntry DBReadJournalEntry(java.lang.String journalID, java.lang.String messageKey)
          Table category: DBJOURNALS Reads an individual message from the given journal by its message key.
 void DBReadJournalMetaData(java.lang.String journalID, JournalsLibrary.JournalMetaData metaData)
          Table category: DBJOURNALS Takes an empty JournalMetaData object, and the journal NAME and fills in the rest by querying the database.
 java.util.List<JournalEntry> DBReadJournalMsgsByCreateDate(java.lang.String journalID, boolean ascending)
          Table category: DBJOURNALS Returns all the messages in the given journal, optionally sorted by create date, ascending.
 java.util.List<JournalEntry> DBReadJournalMsgsByCreateDate(java.lang.String journalID, boolean ascending, int limit)
          Table category: DBJOURNALS Returns a limited number of messages from the given journal, optional sorted by create date, ascending.
 java.util.List<JournalEntry> DBReadJournalMsgsByCreateDate(java.lang.String journalID, boolean ascending, int limit, java.lang.String[] tos)
          Table category: DBJOURNALS Returns a limited number of messages from the given journal, optionally sorted by create date, ascending, but only those marked as TO the given string array.
 java.util.List<JournalEntry> DBReadJournalMsgsByUpdateDate(java.lang.String journalID, boolean ascending)
          Table category: DBJOURNALS Returns all the messages in the given journal, optionally sorted by update date, ascending.
 java.util.List<JournalEntry> DBReadJournalMsgsByUpdateDate(java.lang.String journalID, boolean ascending, int limit)
          Table category: DBJOURNALS Returns a limited number of messages from the given journal, optional sorted by update date, ascending.
 java.util.List<JournalEntry> DBReadJournalMsgsByUpdateDate(java.lang.String journalID, boolean ascending, int limit, java.lang.String[] tos)
          Table category: DBJOURNALS Returns a limited number of messages from the given journal, optionally sorted by update date, ascending, but only those marked as TO the given string array.
 java.util.List<JournalEntry> DBReadJournalMsgsNewerThan(java.lang.String journalID, java.lang.String to, long olderDate)
          Table category: DBJOURNALS Returns all the messages optionally sent to the given user (or ALL) that are newer than the given date.
 java.util.List<JournalEntry> DBReadJournalMsgsOlderThan(java.lang.String journalID, java.lang.String to, long newestDate)
          Table category: DBJOURNALS Returns all the messages optionally sent to the given user (or ALL) that are older than the given date.
 java.util.List<JournalEntry> DBReadJournalPageMsgs(java.lang.String journalID, java.lang.String parent, java.lang.String searchStr, long newerDate, int limit)
          Table category: DBJOURNALS Returns a window of messages from the given journal, either primary messages or replies to messages, sorted by date, that matches a search, and can be limited, and older (or newer) than a given timestamp.
 java.util.List<java.lang.String> DBReadJournals()
          Table category: DBJOURNALS Returns the list of every journalID in the database that has at least one message, or an intro.
 MOB DBReadPlayer(java.lang.String name)
          Table category: DBPLAYERS Reads and populates a player MOB object from the database.
 java.util.List<DatabaseEngine.PlayerData> DBReadPlayerData(java.lang.String player, java.util.List<java.lang.String> sections)
          Table category: DBPLAYERDATA Reads in all data for the given player which also belongs to any one of the given sections/data types.
 java.util.List<DatabaseEngine.PlayerData> DBReadPlayerData(java.lang.String playerID, java.lang.String section)
          Table category: DBPLAYERDATA Read a specific set of data for the given player, belonging to the given section
 java.util.List<DatabaseEngine.PlayerData> DBReadPlayerData(java.lang.String playerID, java.lang.String section, java.lang.String key)
          Table category: DBPLAYERDATA Reads what is probably a single player data entry, but could be more.
 java.util.List<java.lang.String> DBReadPlayerDataAuthorsBySection(java.lang.String section)
          Table category: DBPLAYERDATA Returns the list of unique authors for a given section
 java.util.List<DatabaseEngine.PlayerData> DBReadPlayerDataByKeyMask(java.lang.String section, java.lang.String keyMask)
          Table category: DBPLAYERDATA Reads a list of data entries in a given section and selecting keys by a regular expression.
 java.util.List<DatabaseEngine.PlayerData> DBReadPlayerDataEntry(java.lang.String key)
          Table category: DBPLAYERDATA Reads what is probably a single player data entry, but could be more?
 java.util.List<java.lang.String> DBReadPlayerDataPlayersBySection(java.lang.String section)
          Table category: DBPLAYERDATA Reads in all unique player names for all players for the given data type/section.
 java.util.List<DatabaseEngine.PlayerData> DBReadPlayerSectionData(java.lang.String section)
          Table category: DBPLAYERDATA Reads in all player data for all players for the given data type/section.
 DatabaseEngine.PollData DBReadPoll(java.lang.String name)
          Table category: DBPOLLS Reads the raw data for a specific poll of a given name.
 java.util.List<DatabaseEngine.PollData> DBReadPollList()
          Table category: DBPOLLS Reads the raw data for all the polls from DBPOLLs table.
 java.util.List<Quest> DBReadQuests()
          Table category: DBQUEST Reads all the Quest objects from the database and returns them as a list.
 java.util.List<DatabaseEngine.AckRecord> DBReadRaces()
          Table category: DBRACE Reads all records from the CMGRAC table and returns the AckRecord for all of them in a list, to do with as you please.
 Room DBReadRoom(java.lang.String roomID, boolean reportStatus)
          Table category: DBMAP Permanently Loads and returns a single Room object, without populating its contents yet.
 java.lang.String DBReadRoomDesc(java.lang.String roomID)
          Table category: DBMAP Reads the room description of the given room id and returns it.
 void DBReadRoomExits(java.lang.String roomID, Room room, boolean reportStatus)
          Table category: DBMAP Reads the exits of the room with the given room id and populates them into the given room object.
 java.lang.String DBReadRoomMOBMiscText(java.lang.String roomID, java.lang.String mobID)
          Table category: DBMAP Given a specific room id, and a specific mob id for that room (this is a unique coded string found only in the db, and loaded as the database id), this method returns the misctext for the mob.
 Room DBReadRoomObject(java.lang.String roomIDtoLoad, boolean reportStatus)
          Table category: DBMAP Read the Room object of the given roomID and returns the object.
 Room[] DBReadRoomObjects(java.lang.String areaName, boolean reportStatus)
          Table category: DBMAP Reads all the Room objects in the given area name and returns them as an array of rooms.
 void DBReadSpace()
          Table category: DBMAP Logs all the items in outer space into the space map
 CoffeeTableRow DBReadStat(long startTime)
          Table category: DBSTATS Reads a days worth of stats from the CMSTAT table in the database.
 java.util.List<CoffeeTableRow> DBReadStats(long startTime, long endTime)
          Table category: DBSTATS Read all or a group of statistic rows within a time range.
 CMFile.CMVFSDir DBReadVFSDirectory()
          Table category: DBVFS Reads the root of the VFS (DBFS) database filesystem.
 CMFile.CMVFSFile DBReadVFSFile(java.lang.String filename)
          Table category: DBVFS Reads the complete DBFS file record for the given filepath.
 void DBReCreate(Room room, java.lang.String oldID)
          Table category: DBMAP Changes the room ID of the given room in the database by updating all of the records with the old room id to instead use the new room id of the room given.
 DatabaseEngine.PlayerData DBReCreatePlayerData(java.lang.String name, java.lang.String section, java.lang.String key, java.lang.String xml)
          Table category: DBPLAYERDATA Creates or Updates a single player data entry.
 boolean DBReReadRoomData(Room room)
          Table category: DBMAP Reloads the title, description, affects, and other internal fields of the given room.
 java.util.List<MOB> DBScanFollowers(java.lang.String mobName)
          Table category: DBPLAYERS Queries and creates mob objects for all the followers of the player with the given name and returns the list.
 java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBScanPrideAccountWinners(int topThisMany, short scanCPUPercent)
          Table category: DBPLAYERS Re-builds the entire top-10 account tables from the database.
 java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBScanPridePlayerWinners(int topThisMany, short scanCPUPercent)
          Table category: DBPLAYERS Re-builds the entire top-10 player tables from the database.
 java.util.List<JournalEntry> DBSearchAllJournalEntries(java.lang.String journalID, java.lang.String searchStr)
          Table category: DBJOURNALS Searches all the messages in the journal for the search string as a (typically) case-insensitive substring of either the subject or the message text.
 void DBTouchJournalMessage(java.lang.String key)
          Table category: DBJOURNALS Updates the given journal message with an update time of the current date/timestamp.
 void DBTouchJournalMessage(java.lang.String key, long newDate)
          Table category: DBJOURNALS Updates the given journal message with a specific update time of the given date/timestamp
 void DBUpdateAccount(PlayerAccount account)
          Table category: DBPLAYERS Updates an existing account record in the database by altering its key fields in the existing record.
 void DBUpdateArea(java.lang.String areaID, Area A)
          Table category: DBMAP Updates the area record in the database with the given areaID with the data from the given area object.
 void DBUpdateClan(Clan C)
          Table category: DBCLANS Updates the given clan objects record in the database.
 void DBUpdateClanDonates(java.lang.String clan, java.lang.String name, double adjGold, int adjXP)
          Table category: DBCLANS Updates the clan-donation counts for the clan member of the given exact name for the given exact clan
 void DBUpdateClanItems(Clan C)
          Table category: DBCLANS Updates the external clan items in the database for the given clan by deleting all the records and re-inserting them.
 void DBUpdateClanKills(java.lang.String clan, java.lang.String name, int adjMobKills, int adjPlayerKills)
          Table category: DBCLANS Updates the clan-kill counts for the clan member of the given exact name for the given exact clan
 void DBUpdateClanMembership(java.lang.String name, java.lang.String clan, int role)
          Table category: DBCLANS Updates the Role of the clan member of the given exact name for the given exact clan.
 void DBUpdateEmail(MOB mob)
          Table category: DBPLAYERS Updates the email address of the given player in the database.
 void DBUpdateExits(Room room)
          Table category: DBMAP Resaves the given rooms exit objects, and linkages to other rooms.
 void DBUpdateFollowers(MOB mob)
          Table category: DBPLAYERS This method deletes and re-saves the non-player npc followers of the given player mob.
 void DBUpdateItem(java.lang.String roomID, Item item)
          Table category: DBMAP Assuming the given item is savable, this method will update the database record for the given item in the given room by deleting the item from the room's database record and re-creating it in it.
 void DBUpdateItems(Room room)
          Table category: DBMAP Updates all of the savable items in the given room by removing all item records from the database and re-inserting all of the current item records back in.
 void DBUpdateJournal(java.lang.String journalID, JournalEntry entry)
          Table category: DBJOURNALS Updates the entire database record for the given journal entry, which must have already been created.
 void DBUpdateJournal(java.lang.String key, java.lang.String subject, java.lang.String msg, long newAttributes)
          Table category: DBJOURNALS Updates the existing journal message record in the database.
 void DBUpdateJournalMessageViews(java.lang.String key, int views)
          Table category: DBJOURNALS Sets the number of views for the given specific journal message.
 void DBUpdateJournalMetaData(java.lang.String journalID, JournalsLibrary.JournalMetaData metaData)
          Table category: DBJOURNALS Primarily for forum journals, this method updates all of the given meta data, such as the intro, and so forth by deleting the old record and re-inserting it into the database.
 void DBUpdateMessageReplies(java.lang.String key, int numReplies)
          Table category: DBJOURNALS For forum journals, updates the number of replies registered with the parent message represented by the given message Key.
 void DBUpdateMOB(java.lang.String roomID, MOB mob)
          Table category: DBMAP Assuming the given mob is savable, this method will update the database record for the given mob in the given room by deleting the mob from the room's database record and re-creating him in it.
 void DBUpdateMOBs(Room room)
          Table category: DBMAP Deletes all mobs from the given room from the database and then adds all mobs currently in the room which are savable back to the database.
 void DBUpdatePassword(java.lang.String name, java.lang.String password)
          Table category: DBPLAYERS Updates the password of the given player in the database.
 void DBUpdatePlayer(MOB mob)
          Table category: DBPLAYERS Does a complete update of the given player mob, including their items, abilities, and account.
 void DBUpdatePlayerAbilities(MOB mob)
          Table category: DBPLAYERS Updates only the ability records in the database for the given player.
 void DBUpdatePlayerData(java.lang.String key, java.lang.String xml)
          Table category: DBPLAYERDATA Updates what is probably a single player data entry, but could be more, by setting the xml data itself for a given key.
 void DBUpdatePlayerItems(MOB mob)
          Table category: DBPLAYERS Updates only the item/inventory/equipment records in the database for the given player.
 void DBUpdatePlayerMOBOnly(MOB mob)
          Table category: DBPLAYERS Updates only the base mob data in the database for the given player.
 void DBUpdatePlayerPlayerStats(MOB mob)
          Table category: DBPLAYERS Updates only the player stats record for the given player.
 void DBUpdatePoll(java.lang.String oldName, java.lang.String name, java.lang.String player, java.lang.String subject, java.lang.String description, java.lang.String optionXML, int flag, java.lang.String qualZapper, java.lang.String results, long expiration)
          Table category: DBPOLLS Updates and/or renames a poll in the DBPOLLS table.
 void DBUpdatePollResults(java.lang.String name, java.lang.String results)
          Table category: DBPOLLS Updates the results xml array for an existing poll.
 void DBUpdateQuest(Quest Q)
          Table category: DBQUEST Updates the given quest in the database by deleting the old one and re-inserting this one.
 void DBUpdateQuests(java.util.List<Quest> quests)
          Table category: DBQUEST Updates the entire complete quest list by deleting all quests from the database and re-inserting the given list of quests.
 void DBUpdateRoom(Room room)
          Table category: DBMAP Updates only the room object for the given room, not the items or content -- just the title, description, behaviors and properties, that sort of thing.
 boolean DBUpdateStat(long startTime, java.lang.String data)
          Table category: DBSTATS Updates a single days worth of stats in the CMSTAT table in the database.
 void DBUpdateTheseItems(Room room, java.util.List<Item> items)
          Table category: DBMAP Deletes all items from the given room from the database and then adds the given items to the database.
 void DBUpdateTheseMOBs(Room room, java.util.List<MOB> mobs)
          Table category: DBMAP Deletes all mobs from the given room from the database and then adds the given mobs to the database.
 void DBUpSertVFSFile(java.lang.String filename, int bits, java.lang.String creator, long updateTime, java.lang.Object data)
          Table category: DBVFS Creates or updates a file in the DBFS filesystem stored in the CBVFS table.
 PlayerLibrary.ThinnerPlayer DBUserSearch(java.lang.String Login)
          Table category: DBPLAYERS Attempts to return an extremely thin player record by searching the database for a character with the exact given name.
 void DBWrite(java.lang.String journalID, JournalEntry entry)
           
 void DBWriteJournal(java.lang.String journalID, JournalEntry entry)
          Table category: DBJOURNALS Creates a new entry in the journal.
 void DBWriteJournal(java.lang.String journalID, java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String message)
          Table category: DBJOURNALS Creates a new entry in this journal.
 void DBWriteJournalChild(java.lang.String journalID, java.lang.String journalSource, java.lang.String from, java.lang.String to, java.lang.String parentKey, java.lang.String subject, java.lang.String message)
          Table category: DBJOURNALS Writes a new journal message/entry to the database.
 void DBWriteJournalEmail(java.lang.String mailBoxID, java.lang.String journalSource, java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String message)
          Table category: DBJOURNALS Writes a new journal entry formatted for the email system and generates a new message key.
 JournalEntry DBWriteJournalReply(java.lang.String journalID, java.lang.String key, java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String message)
          Table category: DBJOURNALS Adds to an existing journal entry by taking on a fake/stupid reply as a text appendage to the main message.
 java.lang.String errorStatus()
          Returns the database status, formatted for html.
 java.util.List<Pair<java.lang.String,java.lang.Long>> getBackLogEntries(java.lang.String channelName, int newestToSkip, int numToReturn)
          Table category: DBBACKLOG Returns a list of channel messages for the given channel and criteria.
 DBConnector getConnector()
          Returns the connector object to the database, allowing SQL statements to be run.
 java.util.List<PlayerLibrary.ThinPlayer> getExtendedUserList()
          Table category: DBPLAYERS Returns the list of all characters as thinplayer objects.
 TickClient getServiceClient()
          If this library has a service thread, this method returns the TickClient object associated with that service.
 PlayerLibrary.ThinPlayer getThinUser(java.lang.String name)
          Table category: DBPLAYERS Returns a ThinPlayer object with information about the character with the given name.
 java.util.List<java.lang.String> getUserList()
          Table category: DBPLAYERS Returns a list of all the characters in the database.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 boolean isConnected()
          Returns whether the database is connected.
 java.lang.String L(java.lang.String str, java.lang.String... xs)
          Localize an internal string -- shortcut.
 java.lang.String name()
          The displayable name of this object.
 CMObject newInstance()
          Returns a new instance of this class.
 int pingAllConnections()
          "Pings" all connections to the database by issueing a "SELECT 1 FROM CMCHAR".
 int pingAllConnections(long overrideTimeoutIntervalMillis)
          "Pings" all connections to the database by issueing a "SELECT 1 FROM CMCHAR", if the connection has not seen any action in the given number of milliseconds.
 void propertiesLoaded()
          This method is called whenever system properties are altered by the user.
 void resetConnections()
          Forces all existing database connections to be closed, and then re-open.
 boolean shutdown()
          Shuts down the library.
 void trimBackLogEntries(java.lang.String[] channels, int maxMessages, long oldestTime)
          Table category: DBBACKLOG This is a periodic maintenance method which will go through the list of unique channel names, and trim them according to the maximum number of messages to retain (absolute), and the oldest message to return (absolute timestamp -- no 0 nonsense).
 java.util.List<PlayerLibrary.ThinPlayer> vassals(java.lang.String liegeID)
          Table category: DBPLAYERS Attempts to return a list of all characters who are listed as vassals of the character with the given exact name.
 java.util.List<PlayerLibrary.ThinPlayer> worshippers(java.lang.String deityID)
          Table category: DBPLAYERS Attempts to return a list of all characters who are listed as worshippers of the deity with the given exact name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBInterface

public DBInterface(DBConnector DB,
                   java.util.Set<java.lang.String> privacyV)
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

name

public java.lang.String name()
Description copied from interface: CMObject
The displayable name of this object. May be modified by phyStats() object. Is derived from the Name().

Specified by:
name in interface CMObject
Returns:
the modified final name of this object on the map.
See Also:
Environmental.Name()

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

L

public java.lang.String L(java.lang.String str,
                          java.lang.String... xs)
Description copied from interface: CMLibrary
Localize an internal string -- shortcut. Same as calling:

Specified by:
L in interface CMLibrary
Parameters:
str - the string to translate
xs - the array of variables to replace
Returns:
the translated string, with all variables in place
See Also:
Call with the string to translate, which may contain variables of the form @x1, @x2, etc. The array in xs is then used to replace the variables AFTER the string is translated.

getConnector

public DBConnector getConnector()
Description copied from interface: DatabaseEngine
Returns the connector object to the database, allowing SQL statements to be run.

Specified by:
getConnector in interface DatabaseEngine
Returns:
the connector object to the database

activate

public boolean activate()
Description copied from interface: CMLibrary
Activates the library. This is called after the mud is booted, but before connections are accepted.

Specified by:
activate in interface CMLibrary
Returns:
true if activation was successful, false if you're screwed
See Also:
CMLibrary.shutdown()

shutdown

public boolean shutdown()
Description copied from interface: CMLibrary
Shuts down the library. Called at system shutdown time obviously, but is sometimes called just to reset the library.

Specified by:
shutdown in interface CMLibrary
Returns:
true if shutdown was successful, false if there's nothing you can do about it
See Also:
CMLibrary.activate()

propertiesLoaded

public void propertiesLoaded()
Description copied from interface: CMLibrary
This method is called whenever system properties are altered by the user. This allows the library to react to any important properties they monitor.

Specified by:
propertiesLoaded in interface CMLibrary

getServiceClient

public TickClient getServiceClient()
Description copied from interface: CMLibrary
If this library has a service thread, this method returns the TickClient object associated with that service. Normally returns null, since most libraries don't set themselves up to receive thread time.

Specified by:
getServiceClient in interface CMLibrary
Returns:
null, or the TickClient for the service
See Also:
TickClient

vassals

public java.util.List<PlayerLibrary.ThinPlayer> vassals(java.lang.String liegeID)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Attempts to return a list of all characters who are listed as vassals of the character with the given exact name. Vassals are characters that are SERVEing another player.

Specified by:
vassals in interface DatabaseEngine
Parameters:
liegeID - the character name who would be the liege
Returns:
a list containing as many thin vassal records

worshippers

public java.util.List<PlayerLibrary.ThinPlayer> worshippers(java.lang.String deityID)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Attempts to return a list of all characters who are listed as worshippers of the deity with the given exact name.

Specified by:
worshippers in interface DatabaseEngine
Parameters:
deityID - the exact name of the deity to look for
Returns:
a list containing as many thin worshipper records

getUserList

public java.util.List<java.lang.String> getUserList()
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Returns a list of all the characters in the database. Each and every one.

Specified by:
getUserList in interface DatabaseEngine
Returns:
the list of all character names

isConnected

public boolean isConnected()
Description copied from interface: DatabaseEngine
Returns whether the database is connected.

Specified by:
isConnected in interface DatabaseEngine
Returns:
whether the database is connected.

DBReadAllClans

public java.util.List<Clan> DBReadAllClans()
Description copied from interface: DatabaseEngine
Table category: DBCLANS Reads the entire list of clans, not including their stored items. The list of clans is then returned for adding to the official list, or whatever.

Specified by:
DBReadAllClans in interface DatabaseEngine
Returns:
the official list of clan objects
See Also:
Clan, DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBUpdateClan(Clan), DatabaseEngine.DBUpdateClanItems(Clan), DatabaseEngine.DBDeleteClan(Clan), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBCreateClan(Clan)

DBReadClanItems

public void DBReadClanItems(java.util.Map<java.lang.String,Clan> clans)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Reads the entire list of clan items, and uses the map to get the clan object, and then adds the given item to both the clan object and to the World.

Specified by:
DBReadClanItems in interface DatabaseEngine
Parameters:
clans - the map of clanids to clan objects
See Also:
Clan, DatabaseEngine.DBReadAllClans(), DatabaseEngine.DBUpdateClan(Clan), DatabaseEngine.DBUpdateClanItems(Clan), DatabaseEngine.DBDeleteClan(Clan), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBCreateClan(Clan)

DBReadClanMembers

public java.util.List<Clan.MemberRecord> DBReadClanMembers(java.lang.String clan)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Given an exact clan name, this method returns the entire membership as MemberRecords.

Specified by:
DBReadClanMembers in interface DatabaseEngine
Parameters:
clan - the name of the clan to read members for
Returns:
the list of all the clans members
See Also:
Clan.MemberRecord, DatabaseEngine.DBGetClanMember(String, String), DatabaseEngine.DBUpdateClanMembership(String, String, int), DatabaseEngine.DBUpdateClanKills(String, String, int, int)

DBUpdateClanMembership

public void DBUpdateClanMembership(java.lang.String name,
                                   java.lang.String clan,
                                   int role)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Updates the Role of the clan member of the given exact name for the given exact clan.

Specified by:
DBUpdateClanMembership in interface DatabaseEngine
Parameters:
name - the name of the member to update
clan - the name of the clan to update a member for
role - the new role constant
See Also:
DatabaseEngine.DBReadClanMembers(String), DatabaseEngine.DBGetClanMember(String, String), DatabaseEngine.DBUpdateClanKills(String, String, int, int)

DBUpdateClanKills

public void DBUpdateClanKills(java.lang.String clan,
                              java.lang.String name,
                              int adjMobKills,
                              int adjPlayerKills)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Updates the clan-kill counts for the clan member of the given exact name for the given exact clan

Specified by:
DBUpdateClanKills in interface DatabaseEngine
Parameters:
clan - the name of the clan to update a member for
name - the name of the member to update
adjMobKills - the number of ADDITIONAL (plus or minus) clan mob kills
adjPlayerKills - the number of ADDITIONAL (plus or minus) clan pvp kills

DBUpdateClanDonates

public void DBUpdateClanDonates(java.lang.String clan,
                                java.lang.String name,
                                double adjGold,
                                int adjXP)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Updates the clan-donation counts for the clan member of the given exact name for the given exact clan

Specified by:
DBUpdateClanDonates in interface DatabaseEngine
Parameters:
clan - the name of the clan to update a member for
name - the name of the member to update
adjGold - the number of ADDITIONAL (plus or minus) clan gold donations
adjXP - the number of ADDITIONAL (plus or minus) clan xp adjustments

DBGetClanMember

public Clan.MemberRecord DBGetClanMember(java.lang.String clan,
                                         java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Reads information about a single clan member of the given exact name from the clan of the given exact name.

Specified by:
DBGetClanMember in interface DatabaseEngine
Parameters:
clan - the name of the clan to read a member for
name - the name of the member to read in
Returns:
the member record, or null
See Also:
Clan.MemberRecord, DatabaseEngine.DBReadClanMembers(String), DatabaseEngine.DBUpdateClanMembership(String, String, int), DatabaseEngine.DBUpdateClanKills(String, String, int, int)

DBUpdateClan

public void DBUpdateClan(Clan C)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Updates the given clan objects record in the database. Does not update the clan items, however.

Specified by:
DBUpdateClan in interface DatabaseEngine
Parameters:
C - the clan to update
See Also:
Clan, DatabaseEngine.DBReadAllClans(), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBUpdateClanItems(Clan), DatabaseEngine.DBDeleteClan(Clan), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBCreateClan(Clan)

DBUpdateClanItems

public void DBUpdateClanItems(Clan C)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Updates the external clan items in the database for the given clan by deleting all the records and re-inserting them.

Specified by:
DBUpdateClanItems in interface DatabaseEngine
Parameters:
C - the clan whose items to update
See Also:
Clan, DatabaseEngine.DBReadAllClans(), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBUpdateClan(Clan), DatabaseEngine.DBDeleteClan(Clan), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBCreateClan(Clan)

DBDeleteClan

public void DBDeleteClan(Clan C)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Removes the given clan, all of its items and records, membership, and everything about it from the database.

Specified by:
DBDeleteClan in interface DatabaseEngine
Parameters:
C - the clan to delete
See Also:
Clan, DatabaseEngine.DBReadAllClans(), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBUpdateClan(Clan), DatabaseEngine.DBUpdateClanItems(Clan), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBCreateClan(Clan)

DBCreateClan

public void DBCreateClan(Clan C)
Description copied from interface: DatabaseEngine
Table category: DBCLANS Creates the given clan in the database.

Specified by:
DBCreateClan in interface DatabaseEngine
Parameters:
C - the clan to create
See Also:
Clan, DatabaseEngine.DBReadAllClans(), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBUpdateClan(Clan), DatabaseEngine.DBUpdateClanItems(Clan), DatabaseEngine.DBReadClanItems(Map), DatabaseEngine.DBDeleteClan(Clan)

DBUpdateEmail

public void DBUpdateEmail(MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Updates the email address of the given player in the database. Does not update the account system.

Specified by:
DBUpdateEmail in interface DatabaseEngine
Parameters:
mob - the mob containing the email addy to change

DBPlayerEmailSearch

public java.lang.String DBPlayerEmailSearch(java.lang.String email)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Returns the name of the player with the given email address.

Specified by:
DBPlayerEmailSearch in interface DatabaseEngine
Parameters:
email - the email address to look for
Returns:
the name of the player, or null if not found

DBUpdatePassword

public void DBUpdatePassword(java.lang.String name,
                             java.lang.String password)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Updates the password of the given player in the database. Does not update the account system.

Specified by:
DBUpdatePassword in interface DatabaseEngine
Parameters:
name - the mob name containing the pw to change
password - the new password string

DBFetchEmailData

public Pair<java.lang.String,java.lang.Boolean> DBFetchEmailData(java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Returns the email address and autoforward flag for the player with the given name. Does not check accounts. Does, however, check the cache, so its not necessarily a db check.

Specified by:
DBFetchEmailData in interface DatabaseEngine
Parameters:
name - the name of the player to get info for
Returns:
the email address and autoforward flag

DBUpdatePlayerAbilities

public void DBUpdatePlayerAbilities(MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Updates only the ability records in the database for the given player. This also includes effects, behaviors, and scripts on players, but nothing else.

Specified by:
DBUpdatePlayerAbilities in interface DatabaseEngine
Parameters:
mob - the player to update

DBUpdatePlayerItems

public void DBUpdatePlayerItems(MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Updates only the item/inventory/equipment records in the database for the given player. Nothing else.

Specified by:
DBUpdatePlayerItems in interface DatabaseEngine
Parameters:
mob - the player to update

DBUpdateFollowers

public void DBUpdateFollowers(MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS This method deletes and re-saves the non-player npc followers of the given player mob.

Specified by:
DBUpdateFollowers in interface DatabaseEngine
Parameters:
mob - the mob whose followers to save

DBUpdateAccount

public void DBUpdateAccount(PlayerAccount account)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Updates an existing account record in the database by altering its key fields in the existing record.

Specified by:
DBUpdateAccount in interface DatabaseEngine
Parameters:
account - the account to update

DBCreateAccount

public void DBCreateAccount(PlayerAccount account)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Inserts a new row into the account record in the database. Only works the first time for a given account name

Specified by:
DBCreateAccount in interface DatabaseEngine
Parameters:
account - the account to insert

DBReadAccount

public PlayerAccount DBReadAccount(java.lang.String Login)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Loads an account with the given name from the database, populates a playeraccount object, and returns it. Does not load players, only the account record.

Specified by:
DBReadAccount in interface DatabaseEngine
Parameters:
Login - the name of the account to load
Returns:
the player account object

DBListAccounts

public java.util.List<PlayerAccount> DBListAccounts(java.lang.String mask)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Populates and returns a list of player account objects that match the given lowercase substring. Does this by doing a full scan. :/

Specified by:
DBListAccounts in interface DatabaseEngine
Parameters:
mask - lowercase substring to search for or null
Returns:
the list of playeraccount objects

DBScanPrideAccountWinners

public java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBScanPrideAccountWinners(int topThisMany,
                                                                                              short scanCPUPercent)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Re-builds the entire top-10 account tables from the database. It returns a two dimensional array of lists of accounts and their scores, in reverse sorted order by score. The first dimension of the array is the time period ordinal (month, year, whatever), and the second is the pridestat ordinal. The cpu percent is the percent (0-100) of each second of work to spend actually working. The balance is spent sleeping.

Specified by:
DBScanPrideAccountWinners in interface DatabaseEngine
Parameters:
topThisMany - the number of items in each list
scanCPUPercent - the percent (0-100) to spend working
Returns:
the arrays of lists of top winner accounts
See Also:
TimeClock.TimePeriod, AccountStats.PrideStat

DBScanPridePlayerWinners

public java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBScanPridePlayerWinners(int topThisMany,
                                                                                             short scanCPUPercent)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Re-builds the entire top-10 player tables from the database. It returns a two dimensional array of lists of players and their scores, in reverse sorted order by score. The first dimension of the array is the time period ordinal (month, year, whatever), and the second is the pridestat ordinal. The cpu percent is the percent (0-100) of each second of work to spend actually working. The balance is spent sleeping.

Specified by:
DBScanPridePlayerWinners in interface DatabaseEngine
Parameters:
topThisMany - the number of items in each list
scanCPUPercent - the percent (0-100) to spend working
Returns:
the arrays of lists of top winner players
See Also:
TimeClock.TimePeriod, AccountStats.PrideStat

DBPlayerNameChange

public void DBPlayerNameChange(java.lang.String oldName,
                               java.lang.String newName)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Renames all player records belonging to the old name to the new name. Does nothing to existing cached objects, and the new name better not already exist!

Specified by:
DBPlayerNameChange in interface DatabaseEngine
Parameters:
oldName - the previous existing name in the db
newName - the new name to change them to

DBReadAreaData

public void DBReadAreaData(Area A)
Description copied from interface: DatabaseEngine
Table category: DBMAP Reloads the basic data of the given area, with a prefilled Name. It does not load or alter rooms or anything like that, only the internal variables of the area.

Specified by:
DBReadAreaData in interface DatabaseEngine
Parameters:
A - the area to reload
See Also:
DatabaseEngine.DBIsAreaName(String), DatabaseEngine.DBReadAreaRoomList(String, boolean), DatabaseEngine.DBReadAreaObject(String), DatabaseEngine.DBReadAreaFull(String)

DBIsAreaName

public java.lang.String DBIsAreaName(java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBMAP Checks for the database for an area with approximately the given name, returning the correct name if found, false otherwise.

Specified by:
DBIsAreaName in interface DatabaseEngine
Parameters:
name - the name to search for (hopefully case insensitive)
Returns:
the real name, case-correct, or NULL if not found
See Also:
DatabaseEngine.DBReadAreaData(Area), DatabaseEngine.DBReadAreaRoomList(String, boolean), DatabaseEngine.DBReadAreaObject(String), DatabaseEngine.DBReadAreaFull(String)

DBReadRoom

public Room DBReadRoom(java.lang.String roomID,
                       boolean reportStatus)
Description copied from interface: DatabaseEngine
Table category: DBMAP Permanently Loads and returns a single Room object, without populating its contents yet. This is often done in preparation to read the content, the exits, or both. It sets the area and room ID, as if the room will have a permanent home in the game.

Specified by:
DBReadRoom in interface DatabaseEngine
Parameters:
roomID - the room id of the room object to load
reportStatus - true to populate global status, false otherwise
Returns:
the room loaded, or null if it could not be
See Also:
DatabaseEngine.DBReadContent(String, Room, boolean), DatabaseEngine.DBReReadRoomData(Room), DatabaseEngine.DBReadRoomObject(String, boolean)

DBReadAreaFull

public boolean DBReadAreaFull(java.lang.String areaName)
Description copied from interface: DatabaseEngine
Table category: DBMAP Reloads the given area by exact Name. This includes the rooms, and the mobs, and the items, and it adds it to the map. It's complete and total and working.

Specified by:
DBReadAreaFull in interface DatabaseEngine
Parameters:
areaName - the name of the area to load
See Also:
DatabaseEngine.DBIsAreaName(String), DatabaseEngine.DBReadAreaRoomList(String, boolean), DatabaseEngine.DBReadAreaData(Area), DatabaseEngine.DBReadAreaObject(String)

DBReadAllRooms

public void DBReadAllRooms(RoomnumberSet roomsToRead)
Description copied from interface: DatabaseEngine
Table category: DBMAP This method does a conventional boot load of all rooms and areas in the given set, including exits and content. Thin areas are not loaded, as normal. Logging and status are as boot. Rooms and Areas are added to the map.

Specified by:
DBReadAllRooms in interface DatabaseEngine
Parameters:
roomsToRead - null to read all, or the set of rooms to read

DBCountRoomMobsItems

public int[] DBCountRoomMobsItems(java.lang.String roomID)
Description copied from interface: DatabaseEngine
Table category: DBMAP Counts the number of mobs and items in the room according to the database, and returns the counts as a numeric array where the first element is the number of mobs and the second the number of items.

Specified by:
DBCountRoomMobsItems in interface DatabaseEngine
Parameters:
roomID - the room id to return counts for
Returns:
the counts as a 2 entry array

DBReadRoomObjects

public Room[] DBReadRoomObjects(java.lang.String areaName,
                                boolean reportStatus)
Description copied from interface: DatabaseEngine
Table category: DBMAP Reads all the Room objects in the given area name and returns them as an array of rooms. It does not load the item or mob contents. The rooms are not actually added to the Area or the map.

Specified by:
DBReadRoomObjects in interface DatabaseEngine
Parameters:
areaName - the area name of rooms to load
reportStatus - true to populate global status, false otherwise
Returns:
the rooms loaded

DBReadRoomObject

public Room DBReadRoomObject(java.lang.String roomIDtoLoad,
                             boolean reportStatus)
Description copied from interface: DatabaseEngine
Table category: DBMAP Read the Room object of the given roomID and returns the object. It does not load the contents. The difference between this and dbreadroom is beyond me. I don't think this method actually adds the room to an area or to the map.

Specified by:
DBReadRoomObject in interface DatabaseEngine
Parameters:
roomIDtoLoad - the id of the room to load
reportStatus - true to populate global status, false otherwise
Returns:
the room loaded, or null if it could not be
See Also:
DatabaseEngine.DBReadRoom(String, boolean)

DBReReadRoomData

public boolean DBReReadRoomData(Room room)
Description copied from interface: DatabaseEngine
Table category: DBMAP Reloads the title, description, affects, and other internal fields of the given room.

Specified by:
DBReReadRoomData in interface DatabaseEngine
Parameters:
room - the room to re-read dat afor
Returns:
true, unless something went wrong

DBReadRoomExits

public void DBReadRoomExits(java.lang.String roomID,
                            Room room,
                            boolean reportStatus)
Description copied from interface: DatabaseEngine
Table category: DBMAP Reads the exits of the room with the given room id and populates them into the given room object. It also connects each exit to the room if it can get to it through the given rooms area object.

Specified by:
DBReadRoomExits in interface DatabaseEngine
Parameters:
roomID - the room id
room - the room object to populate
reportStatus - true to populate global status, false otherwise

DBReadCatalogs

public void DBReadCatalogs()
Description copied from interface: DatabaseEngine
Table category: DBMAP Loads both the mob and item catalogs into the catalog library.

Specified by:
DBReadCatalogs in interface DatabaseEngine

DBReadSpace

public void DBReadSpace()
Description copied from interface: DatabaseEngine
Table category: DBMAP Logs all the items in outer space into the space map

Specified by:
DBReadSpace in interface DatabaseEngine

DBReadContent

public void DBReadContent(java.lang.String roomID,
                          Room thisRoom,
                          boolean makeLive)
Description copied from interface: DatabaseEngine
Table category: DBMAP This method is used to load the content (items and mobs) of the given room id into the given room object, and optionally activate the contents to live use. startItemRejuv() is not called, however.

Specified by:
DBReadContent in interface DatabaseEngine
Parameters:
roomID - the id of the room to load
thisRoom - the room object to load the content into (required!)
makeLive - true to bring the mobs to life, false to leave them dead.

DBReadAreaObject

public Area DBReadAreaObject(java.lang.String areaName)
Description copied from interface: DatabaseEngine
Table category: DBMAP Reloads the basic data of the given area by exact Name. It does not load or alter rooms or anything like that, only the internal variables of the area. Does not add the area to the map.

Specified by:
DBReadAreaObject in interface DatabaseEngine
Parameters:
areaName - the name of the area to load
See Also:
DatabaseEngine.DBIsAreaName(String), DatabaseEngine.DBReadAreaRoomList(String, boolean), DatabaseEngine.DBReadAreaData(Area), DatabaseEngine.DBReadAreaFull(String)

DBReadAreaRoomList

public RoomnumberSet DBReadAreaRoomList(java.lang.String areaName,
                                        boolean reportStatus)
Description copied from interface: DatabaseEngine
Table category: DBMAP Reads all the room numbers for the area with the given name from the database and returns a compressed roomnumberset object.

Specified by:
DBReadAreaRoomList in interface DatabaseEngine
Parameters:
areaName - the name of the area to load numbers from
reportStatus - true to update the global status, false otherwise
Returns:
the rooms in this area, as a compressed set
See Also:
RoomnumberSet

DBCreateThisItem

public void DBCreateThisItem(java.lang.String roomID,
                             Item thisItem)
Description copied from interface: DatabaseEngine
Table category: DBMAP Inserts the given item into the given room id in the database, regardless of its worthiness to be there.

Specified by:
DBCreateThisItem in interface DatabaseEngine
Parameters:
roomID - the room id to save the item at
thisItem - the item to save

DBCreateThisMOB

public void DBCreateThisMOB(java.lang.String roomID,
                            MOB thisMOB)
Description copied from interface: DatabaseEngine
Table category: DBMAP Inserts the given mob into the given room id in the database, regardless of its worthiness to be there.

Specified by:
DBCreateThisMOB in interface DatabaseEngine
Parameters:
roomID - the room id to save the mob at
thisMOB - the mob to save

DBUpdateExits

public void DBUpdateExits(Room room)
Description copied from interface: DatabaseEngine
Table category: DBMAP Resaves the given rooms exit objects, and linkages to other rooms.

Specified by:
DBUpdateExits in interface DatabaseEngine
Parameters:
room - the room whose exits to save

DBReadQuests

public java.util.List<Quest> DBReadQuests()
Description copied from interface: DatabaseEngine
Table category: DBQUEST Reads all the Quest objects from the database and returns them as a list. The Quests are pre-parsed and ready to go.

Specified by:
DBReadQuests in interface DatabaseEngine
Returns:
the list of quests
See Also:
DatabaseEngine.DBUpdateQuests(List), DatabaseEngine.DBUpdateQuest(Quest), Quest

DBUpdateQuest

public void DBUpdateQuest(Quest Q)
Description copied from interface: DatabaseEngine
Table category: DBQUEST Updates the given quest in the database by deleting the old one and re-inserting this one.

Specified by:
DBUpdateQuest in interface DatabaseEngine
Parameters:
Q - the quest to update
See Also:
DatabaseEngine.DBUpdateQuests(List), DatabaseEngine.DBReadQuests(), Quest

DBUpdateQuests

public void DBUpdateQuests(java.util.List<Quest> quests)
Description copied from interface: DatabaseEngine
Table category: DBQUEST Updates the entire complete quest list by deleting all quests from the database and re-inserting the given list of quests.

Specified by:
DBUpdateQuests in interface DatabaseEngine
Parameters:
quests - the list of quests to end up with
See Also:
Quest, DatabaseEngine.DBUpdateQuest(Quest), DatabaseEngine.DBReadQuests()

DBReadRoomMOBMiscText

public java.lang.String DBReadRoomMOBMiscText(java.lang.String roomID,
                                              java.lang.String mobID)
Description copied from interface: DatabaseEngine
Table category: DBMAP Given a specific room id, and a specific mob id for that room (this is a unique coded string found only in the db, and loaded as the database id), this method returns the misctext for the mob.

Specified by:
DBReadRoomMOBMiscText in interface DatabaseEngine
Parameters:
roomID - the room id
mobID - the unique mob string for that room
Returns:
the misc text of the mob
See Also:
Environmental.text(), DBIdentifiable.databaseID()

DBReadRoomDesc

public java.lang.String DBReadRoomDesc(java.lang.String roomID)
Description copied from interface: DatabaseEngine
Table category: DBMAP Reads the room description of the given room id and returns it.

Specified by:
DBReadRoomDesc in interface DatabaseEngine
Parameters:
roomID - the room id of the description to read
Returns:
the description, or null

DBUpdateTheseMOBs

public void DBUpdateTheseMOBs(Room room,
                              java.util.List<MOB> mobs)
Description copied from interface: DatabaseEngine
Table category: DBMAP Deletes all mobs from the given room from the database and then adds the given mobs to the database.

Specified by:
DBUpdateTheseMOBs in interface DatabaseEngine
Parameters:
room - the savable room
mobs - the mobs in the room that need saving
See Also:
DatabaseEngine.DBUpdateMOBs(Room)

DBUpdateTheseItems

public void DBUpdateTheseItems(Room room,
                               java.util.List<Item> items)
Description copied from interface: DatabaseEngine
Table category: DBMAP Deletes all items from the given room from the database and then adds the given items to the database.

Specified by:
DBUpdateTheseItems in interface DatabaseEngine
Parameters:
room - the savable room
items - the items in the room that need saving

DBUpdateMOBs

public void DBUpdateMOBs(Room room)
Description copied from interface: DatabaseEngine
Table category: DBMAP Deletes all mobs from the given room from the database and then adds all mobs currently in the room which are savable back to the database.

Specified by:
DBUpdateMOBs in interface DatabaseEngine
Parameters:
room - the savable room
See Also:
DatabaseEngine.DBUpdateTheseMOBs(Room, List)

DBDeletePlayerPrivateJournalEntries

public void DBDeletePlayerPrivateJournalEntries(java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS This message deletes all private messages with the given user id as a recipient. This is all the messages TO the given user, which might include other kinds of user documents, such as email, bank accounts, mail, and the like.

Specified by:
DBDeletePlayerPrivateJournalEntries in interface DatabaseEngine
Parameters:
name - the name of the user to delete journal entries from

DBUpdateJournal

public void DBUpdateJournal(java.lang.String journalID,
                            JournalEntry entry)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Updates the entire database record for the given journal entry, which must have already been created.

Specified by:
DBUpdateJournal in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal
entry - the complete entry record
See Also:
JournalEntry, DatabaseEngine.DBReadJournals(), DatabaseEngine.DBReadJournalEntry(String, String), DatabaseEngine.DBWriteJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, String, String, String, String), DatabaseEngine.DBDeleteJournal(String, String), DatabaseEngine.DBUpdateJournal(String, String, String, long)

DBUpdateJournalMetaData

public void DBUpdateJournalMetaData(java.lang.String journalID,
                                    JournalsLibrary.JournalMetaData metaData)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Primarily for forum journals, this method updates all of the given meta data, such as the intro, and so forth by deleting the old record and re-inserting it into the database.

Specified by:
DBUpdateJournalMetaData in interface DatabaseEngine
Parameters:
journalID - the name of the journals whose stats to update
metaData - the metadata to resave into the database
See Also:
DatabaseEngine.DBReadJournalMetaData(String, com.planet_ink.coffee_mud.Libraries.interfaces.JournalsLibrary.JournalMetaData), DatabaseEngine.DBUpdateMessageReplies(String, int)

DBReadJournalMetaData

public void DBReadJournalMetaData(java.lang.String journalID,
                                  JournalsLibrary.JournalMetaData metaData)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Takes an empty JournalMetaData object, and the journal NAME and fills in the rest by querying the database.

Specified by:
DBReadJournalMetaData in interface DatabaseEngine
Parameters:
journalID - the name of the journals whose stats to update
metaData - the created metadata object to fill in
See Also:
DatabaseEngine.DBUpdateMessageReplies(String, int), DatabaseEngine.DBUpdateJournalMetaData(String, com.planet_ink.coffee_mud.Libraries.interfaces.JournalsLibrary.JournalMetaData)

DBGetRealJournalName

public java.lang.String DBGetRealJournalName(java.lang.String possibleName)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS A silly function that queries the database for a journal of the given exact name, and if it is found, it returns it, otherwise it returns null.

Specified by:
DBGetRealJournalName in interface DatabaseEngine
Parameters:
possibleName - the possible name of a journal
Returns:
null, or the name returned

DBDeleteJournal

public void DBDeleteJournal(java.lang.String journalID,
                            java.lang.String msgKeyOrNull)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Deletes enter a specific message, or all messages, from the given journal. Deleting all messages deletes the journal. Take care, because of the null thing, this method is dangerous. :)

Specified by:
DBDeleteJournal in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal
msgKeyOrNull - the message key, or null to delete ALL messages
See Also:
DatabaseEngine.DBReadJournals(), DatabaseEngine.DBReadJournalEntry(String, String), DatabaseEngine.DBUpdateJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, String, String, String, String), DatabaseEngine.DBUpdateJournal(String, String, String, long)

DBReadJournals

public java.util.List<java.lang.String> DBReadJournals()
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns the list of every journalID in the database that has at least one message, or an intro.

Specified by:
DBReadJournals in interface DatabaseEngine
Returns:
the list of every journal ID
See Also:
DatabaseEngine.DBUpdateJournal(String, JournalEntry), DatabaseEngine.DBReadJournalEntry(String, String), DatabaseEngine.DBWriteJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, String, String, String, String), DatabaseEngine.DBDeleteJournal(String, String), DatabaseEngine.DBUpdateJournal(String, String, String, long)

DBReadJournalEntry

public JournalEntry DBReadJournalEntry(java.lang.String journalID,
                                       java.lang.String messageKey)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Reads an individual message from the given journal by its message key.

Specified by:
DBReadJournalEntry in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal
messageKey - the message key
Returns:
the complete journal entry, or null if it wasn't found
See Also:
JournalEntry, DatabaseEngine.DBReadJournals(), DatabaseEngine.DBUpdateJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, String, String, String, String), DatabaseEngine.DBDeleteJournal(String, String), DatabaseEngine.DBUpdateJournal(String, String, String, long)

DBUpdateMessageReplies

public void DBUpdateMessageReplies(java.lang.String key,
                                   int numReplies)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS For forum journals, updates the number of replies registered with the parent message represented by the given message Key.

Specified by:
DBUpdateMessageReplies in interface DatabaseEngine
Parameters:
key - the key of the parent op message
numReplies - the new number of replies to register
See Also:
DatabaseEngine.DBReadJournalMetaData(String, com.planet_ink.coffee_mud.Libraries.interfaces.JournalsLibrary.JournalMetaData), DatabaseEngine.DBUpdateJournalMetaData(String, com.planet_ink.coffee_mud.Libraries.interfaces.JournalsLibrary.JournalMetaData)

DBReadJournalMsgsByUpdateDate

public java.util.List<JournalEntry> DBReadJournalMsgsByUpdateDate(java.lang.String journalID,
                                                                  boolean ascending)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns all the messages in the given journal, optionally sorted by update date, ascending. This is a legacy method, and should be used with care.

Specified by:
DBReadJournalMsgsByUpdateDate in interface DatabaseEngine
Parameters:
journalID - the journal to read all the messages from
ascending - true to order the read entries by date
Returns:
the list of all the messages in this journal, an empty list, or null on error
See Also:
DatabaseEngine.DBReadJournalMsgsByUpdateDate(String, boolean, int), DatabaseEngine.DBReadJournalMsgsByUpdateDate(String, boolean, int, String[])

DBReadJournalMsgsByUpdateDate

public java.util.List<JournalEntry> DBReadJournalMsgsByUpdateDate(java.lang.String journalID,
                                                                  boolean ascending,
                                                                  int limit)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns a limited number of messages from the given journal, optional sorted by update date, ascending.

Specified by:
DBReadJournalMsgsByUpdateDate in interface DatabaseEngine
Parameters:
journalID - the journal to read all the messages from
ascending - true to order the read entries by date
limit - the number of messages to return, max
Returns:
the list of the messages in this journal, an empty list, or null on error
See Also:
DatabaseEngine.DBReadJournalMsgsByUpdateDate(String, boolean), DatabaseEngine.DBReadJournalMsgsByUpdateDate(String, boolean, int, String[])

DBReadJournalMsgsByUpdateDate

public java.util.List<JournalEntry> DBReadJournalMsgsByUpdateDate(java.lang.String journalID,
                                                                  boolean ascending,
                                                                  int limit,
                                                                  java.lang.String[] tos)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns a limited number of messages from the given journal, optionally sorted by update date, ascending, but only those marked as TO the given string array.

Specified by:
DBReadJournalMsgsByUpdateDate in interface DatabaseEngine
Parameters:
journalID - the journal to read all the messages from
ascending - true to order the read entries by date
limit - the number of messages to return, max
tos - return only messages marked TO one of the names in this array
Returns:
the list of the messages in this journal, an empty list, or null on error
See Also:
DatabaseEngine.DBReadJournalMsgsByUpdateDate(String, boolean, int), DatabaseEngine.DBReadJournalMsgsByUpdateDate(String, boolean)

DBReadJournalMsgsByCreateDate

public java.util.List<JournalEntry> DBReadJournalMsgsByCreateDate(java.lang.String journalID,
                                                                  boolean ascending)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns all the messages in the given journal, optionally sorted by create date, ascending. This is a legacy method, and should be used with care.

Specified by:
DBReadJournalMsgsByCreateDate in interface DatabaseEngine
Parameters:
journalID - the journal to read all the messages from
ascending - true to order the read entries by date
Returns:
the list of all the messages in this journal, an empty list, or null on error
See Also:
DatabaseEngine.DBReadJournalMsgsByCreateDate(String, boolean, int), DatabaseEngine.DBReadJournalMsgsByCreateDate(String, boolean, int, String[])

DBReadJournalMsgsByCreateDate

public java.util.List<JournalEntry> DBReadJournalMsgsByCreateDate(java.lang.String journalID,
                                                                  boolean ascending,
                                                                  int limit)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns a limited number of messages from the given journal, optional sorted by create date, ascending.

Specified by:
DBReadJournalMsgsByCreateDate in interface DatabaseEngine
Parameters:
journalID - the journal to read all the messages from
ascending - true to order the read entries by date
limit - the number of messages to return, max
Returns:
the list of the messages in this journal, an empty list, or null on error
See Also:
DatabaseEngine.DBReadJournalMsgsByCreateDate(String, boolean), DatabaseEngine.DBReadJournalMsgsByUpdateDate(String, boolean, int, String[])

DBReadJournalMsgsByCreateDate

public java.util.List<JournalEntry> DBReadJournalMsgsByCreateDate(java.lang.String journalID,
                                                                  boolean ascending,
                                                                  int limit,
                                                                  java.lang.String[] tos)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns a limited number of messages from the given journal, optionally sorted by create date, ascending, but only those marked as TO the given string array.

Specified by:
DBReadJournalMsgsByCreateDate in interface DatabaseEngine
Parameters:
journalID - the journal to read all the messages from
ascending - true to order the read entries by date
limit - the number of messages to return, max
tos - return only messages marked TO one of the names in this array
Returns:
the list of the messages in this journal, an empty list, or null on error
See Also:
DatabaseEngine.DBReadJournalMsgsByCreateDate(String, boolean, int), DatabaseEngine.DBReadJournalMsgsByCreateDate(String, boolean)

DBSearchAllJournalEntries

public java.util.List<JournalEntry> DBSearchAllJournalEntries(java.lang.String journalID,
                                                              java.lang.String searchStr)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Searches all the messages in the journal for the search string as a (typically) case-insensitive substring of either the subject or the message text. Returns up to 100 journal entries that form a match.

Specified by:
DBSearchAllJournalEntries in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal to search
searchStr - the search substring
Returns:
the list of journal entries that match

DBReadJournalMsgsNewerThan

public java.util.List<JournalEntry> DBReadJournalMsgsNewerThan(java.lang.String journalID,
                                                               java.lang.String to,
                                                               long olderDate)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns all the messages optionally sent to the given user (or ALL) that are newer than the given date.

Specified by:
DBReadJournalMsgsNewerThan in interface DatabaseEngine
Parameters:
journalID - the name/ID of the journal/forum
to - NULL, ALL, or a user the messages were sent to
olderDate - the date beyond which to return messages for
Returns:
the list of messages that were found
See Also:
DatabaseEngine.DBReadJournalMsgsOlderThan(String, String, long)

DBReadJournalMsgsOlderThan

public java.util.List<JournalEntry> DBReadJournalMsgsOlderThan(java.lang.String journalID,
                                                               java.lang.String to,
                                                               long newestDate)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns all the messages optionally sent to the given user (or ALL) that are older than the given date.

Specified by:
DBReadJournalMsgsOlderThan in interface DatabaseEngine
Parameters:
journalID - the name/ID of the journal/forum
to - NULL, ALL, or a user the messages were sent to
newestDate - the date before which to return messages for
Returns:
the list of messages that were found
See Also:
DatabaseEngine.DBReadJournalMsgsNewerThan(String, String, long)

DBReadJournalPageMsgs

public java.util.List<JournalEntry> DBReadJournalPageMsgs(java.lang.String journalID,
                                                          java.lang.String parent,
                                                          java.lang.String searchStr,
                                                          long newerDate,
                                                          int limit)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns a window of messages from the given journal, either primary messages or replies to messages, sorted by date, that matches a search, and can be limited, and older (or newer) than a given timestamp.

Specified by:
DBReadJournalPageMsgs in interface DatabaseEngine
Parameters:
journalID - the name of the journal/forum to load from
parent - the parent message (for getting replies), or null
searchStr - the string to search for in the msg/subject, or null
newerDate - 0 for all real msgs, parent for newer than timestamp, otherwise before timestamp
limit - the maximum number of messages to return
Returns:
the journal entries/messages that match this query

DBCountJournal

public int DBCountJournal(java.lang.String journalID,
                          java.lang.String from,
                          java.lang.String to)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Returns the number of messages found in the given journal optionally sent from the given user name, and/or optionally to the given user name.

Specified by:
DBCountJournal in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal
from - NULL, or the user id of a user the messages are from
to - NULL, or the user id of a user the messages are to
Returns:
the number of messages found

DBJournalLatestDateNewerThan

public long[] DBJournalLatestDateNewerThan(java.lang.String journalID,
                                           java.lang.String to,
                                           long olderTime)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS This method returns a two dimensional array, where the first long is the update timestamp of the latest message in the journal, optionally to the given recipient, and the second long is the number of messages found that are newer than the given timestamp.

Specified by:
DBJournalLatestDateNewerThan in interface DatabaseEngine
Parameters:
journalID - the journal id/name to search
to - NULL, or ALL, or the recipient name
olderTime - the time After which to count messages
Returns:
the array with latest update timestamp, and the number of newer msgs

DBWriteJournal

public void DBWriteJournal(java.lang.String journalID,
                           JournalEntry entry)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Creates a new entry in the journal. If the entries key already exists, this will make an error. If the entries key is null, however, it will generate a new one.

Specified by:
DBWriteJournal in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal
entry - the enttry to create
See Also:
JournalEntry, DatabaseEngine.DBReadJournals(), DatabaseEngine.DBReadJournalEntry(String, String), DatabaseEngine.DBUpdateJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, String, String, String, String), DatabaseEngine.DBDeleteJournal(String, String), DatabaseEngine.DBUpdateJournal(String, String, String, long)

DBWriteJournal

public void DBWriteJournal(java.lang.String journalID,
                           java.lang.String from,
                           java.lang.String to,
                           java.lang.String subject,
                           java.lang.String message)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Creates a new entry in this journal. Will generate a new key.

Specified by:
DBWriteJournal in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal
from - the author of the message
to - who the message is to, such as ALL
subject - the subject of the message
message - the message to write
See Also:
DatabaseEngine.DBReadJournals(), DatabaseEngine.DBReadJournalEntry(String, String), DatabaseEngine.DBUpdateJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, JournalEntry), DatabaseEngine.DBDeleteJournal(String, String), DatabaseEngine.DBUpdateJournal(String, String, String, long)

DBWriteJournalEmail

public void DBWriteJournalEmail(java.lang.String mailBoxID,
                                java.lang.String journalSource,
                                java.lang.String from,
                                java.lang.String to,
                                java.lang.String subject,
                                java.lang.String message)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Writes a new journal entry formatted for the email system and generates a new message key.

Specified by:
DBWriteJournalEmail in interface DatabaseEngine
Parameters:
mailBoxID - the journal name/id of the email system MAILBOX
journalSource - the name/id of the journal that originated the message
from - who the author of the email
to - the recipient
subject - the subject of the message
message - the email message
See Also:
CMProps.Str.MAILBOX

DBWriteJournalChild

public void DBWriteJournalChild(java.lang.String journalID,
                                java.lang.String journalSource,
                                java.lang.String from,
                                java.lang.String to,
                                java.lang.String parentKey,
                                java.lang.String subject,
                                java.lang.String message)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Writes a new journal message/entry to the database. One which is probably a reply to a parent message, denoted by the parentKey, which is the message key of the parent. This method also updates the number of replies being tracked for the given parent message.

Specified by:
DBWriteJournalChild in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal/forum
journalSource - the originating name/id of an originating journal?
from - who the message is written by, a user id
to - who the message is to, or ALL
parentKey - the message key of the parent message this is a reply to
subject - the subject of the reply message
message - the message text of the reply message

DBWrite

public void DBWrite(java.lang.String journalID,
                    JournalEntry entry)

DBWriteJournalReply

public JournalEntry DBWriteJournalReply(java.lang.String journalID,
                                        java.lang.String key,
                                        java.lang.String from,
                                        java.lang.String to,
                                        java.lang.String subject,
                                        java.lang.String message)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Adds to an existing journal entry by taking on a fake/stupid reply as a text appendage to the main message. I should do something better some day, and I did to forums right, but, well, that's how these still are, just like Zelch 64 1.0.

Specified by:
DBWriteJournalReply in interface DatabaseEngine
Parameters:
journalID - the name/id of the journal
key - the key of the message to append to
from - who the Reply is from
to - who the recipient of the reply is
subject - the subject of the reply
message - the reply text
Returns:
the updated journal entry

DBUpdateJournal

public void DBUpdateJournal(java.lang.String key,
                            java.lang.String subject,
                            java.lang.String msg,
                            long newAttributes)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Updates the existing journal message record in the database. Nothing is optional, it updates all of the given fields.

Specified by:
DBUpdateJournal in interface DatabaseEngine
Parameters:
key - the unique message key
subject - the new message subject
msg - the new message text
newAttributes - the new message attributes bitmap
See Also:
DatabaseEngine.DBReadJournals(), DatabaseEngine.DBReadJournalEntry(String, String), DatabaseEngine.DBUpdateJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, JournalEntry), DatabaseEngine.DBWriteJournal(String, String, String, String, String), DatabaseEngine.DBDeleteJournal(String, String)

DBUpdateJournalMessageViews

public void DBUpdateJournalMessageViews(java.lang.String key,
                                        int views)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Sets the number of views for the given specific journal message.

Specified by:
DBUpdateJournalMessageViews in interface DatabaseEngine
Parameters:
key - the message key of the message to update
views - the number of views to mark.

DBTouchJournalMessage

public void DBTouchJournalMessage(java.lang.String key)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Updates the given journal message with an update time of the current date/timestamp.

Specified by:
DBTouchJournalMessage in interface DatabaseEngine
Parameters:
key - the message to touch.

DBTouchJournalMessage

public void DBTouchJournalMessage(java.lang.String key,
                                  long newDate)
Description copied from interface: DatabaseEngine
Table category: DBJOURNALS Updates the given journal message with a specific update time of the given date/timestamp

Specified by:
DBTouchJournalMessage in interface DatabaseEngine
Parameters:
key - the key of the message to touch
newDate - the date/time to set the message update time to

DBCreateRoom

public void DBCreateRoom(Room room)
Description copied from interface: DatabaseEngine
Table category: DBMAP Creates the basic room object entry in the data. Does not save content or exits, just the room object stuff.

Specified by:
DBCreateRoom in interface DatabaseEngine
Parameters:
room - the room to save

DBUpdateRoom

public void DBUpdateRoom(Room room)
Description copied from interface: DatabaseEngine
Table category: DBMAP Updates only the room object for the given room, not the items or content -- just the title, description, behaviors and properties, that sort of thing. No exits either. Just the room.

Specified by:
DBUpdateRoom in interface DatabaseEngine
Parameters:
room - the room that needs resaving.

DBUpdatePlayer

public void DBUpdatePlayer(MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Does a complete update of the given player mob, including their items, abilities, and account. Followers are not included.

Specified by:
DBUpdatePlayer in interface DatabaseEngine
Parameters:
mob - the player mob to update

DBExpiredCharNameSearch

public java.util.List<java.lang.String> DBExpiredCharNameSearch(java.util.Set<java.lang.String> skipNames)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS If this system uses the character expiration system, then this method will scan all the players for expired characters, and return the list of names, or an empty list if there are none. The skipNames is a list of protected names that are never expired.

Specified by:
DBExpiredCharNameSearch in interface DatabaseEngine
Parameters:
skipNames - the names to never expire, or null
Returns:
the list of expired names, or an empty list

DBUpdatePlayerPlayerStats

public void DBUpdatePlayerPlayerStats(MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Updates only the player stats record for the given player. These are player-unique variables, such as the prompt.

Specified by:
DBUpdatePlayerPlayerStats in interface DatabaseEngine
Parameters:
mob - the player to update

DBUpdatePlayerMOBOnly

public void DBUpdatePlayerMOBOnly(MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Updates only the base mob data in the database for the given player. This includes playerstat data and clan affiliation records, but not items, or abilities, or other such stuff.

Specified by:
DBUpdatePlayerMOBOnly in interface DatabaseEngine
Parameters:
mob - the player mob to update

DBUpdateMOB

public void DBUpdateMOB(java.lang.String roomID,
                        MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBMAP Assuming the given mob is savable, this method will update the database record for the given mob in the given room by deleting the mob from the room's database record and re-creating him in it.

Specified by:
DBUpdateMOB in interface DatabaseEngine
Parameters:
roomID - the id of the room that the mob was in
mob - the mob to save

DBUpdateItem

public void DBUpdateItem(java.lang.String roomID,
                         Item item)
Description copied from interface: DatabaseEngine
Table category: DBMAP Assuming the given item is savable, this method will update the database record for the given item in the given room by deleting the item from the room's database record and re-creating it in it.

Specified by:
DBUpdateItem in interface DatabaseEngine
Parameters:
roomID - the id of the room that the item was in
item - the item to save

DBDeleteMOB

public void DBDeleteMOB(java.lang.String roomID,
                        MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBMAP Removes the given mob, and only the given mob, from the database records for the given room id.

Specified by:
DBDeleteMOB in interface DatabaseEngine
Parameters:
roomID - the id of the room that the mob was in
mob - the mob to remove

DBDeleteItem

public void DBDeleteItem(java.lang.String roomID,
                         Item item)
Description copied from interface: DatabaseEngine
Table category: DBMAP Removes the given item, and only the given item, from the database records for the given room id.

Specified by:
DBDeleteItem in interface DatabaseEngine
Parameters:
roomID - the id of the room that the item was in
item - the item to remove

DBUpdateItems

public void DBUpdateItems(Room room)
Description copied from interface: DatabaseEngine
Table category: DBMAP Updates all of the savable items in the given room by removing all item records from the database and re-inserting all of the current item records back in.

Specified by:
DBUpdateItems in interface DatabaseEngine
Parameters:
room - the room to update

DBReCreate

public void DBReCreate(Room room,
                       java.lang.String oldID)
Description copied from interface: DatabaseEngine
Table category: DBMAP Changes the room ID of the given room in the database by updating all of the records with the old room id to instead use the new room id of the room given.

Specified by:
DBReCreate in interface DatabaseEngine
Parameters:
room - the room with the new id
oldID - the old room id

DBUserSearch

public PlayerLibrary.ThinnerPlayer DBUserSearch(java.lang.String Login)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Attempts to return an extremely thin player record by searching the database for a character with the exact given name.

Specified by:
DBUserSearch in interface DatabaseEngine
Parameters:
Login - the name to look for
Returns:
null if not found, or a thinner player record

DBCreateArea

public void DBCreateArea(Area A)
Description copied from interface: DatabaseEngine
Table category: DBMAP Creates a new area record in the database. Only does the area record, not the rooms.

Specified by:
DBCreateArea in interface DatabaseEngine
Parameters:
A - the area to create.

DBDeleteArea

public void DBDeleteArea(Area A)
Description copied from interface: DatabaseEngine
Table category: DBMAP Removes the given area record from the database. Only does the area record, not the rooms.

Specified by:
DBDeleteArea in interface DatabaseEngine
Parameters:
A - the area to destroy.

DBDeleteAreaAndRooms

public void DBDeleteAreaAndRooms(Area A)
Description copied from interface: DatabaseEngine
Table category: DBMAP Removes the given area record from the database. Also removes all the proper rooms from the DB, along with exits, items, and characters in those rooms.

Specified by:
DBDeleteAreaAndRooms in interface DatabaseEngine
Parameters:
A - the area to destroy.

DBUpdateArea

public void DBUpdateArea(java.lang.String areaID,
                         Area A)
Description copied from interface: DatabaseEngine
Table category: DBMAP Updates the area record in the database with the given areaID with the data from the given area object. The areaID and the name of the area can be different for area renamings.

Specified by:
DBUpdateArea in interface DatabaseEngine
Parameters:
areaID - the current db area name
A - the area data to save

DBDeleteRoom

public void DBDeleteRoom(Room room)
Description copied from interface: DatabaseEngine
Table category: DBMAP Deletes the room and all of its exits and contents from the database entirely.

Specified by:
DBDeleteRoom in interface DatabaseEngine
Parameters:
room - the room to blow away

DBReadPlayer

public MOB DBReadPlayer(java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Reads and populates a player MOB object from the database. Does not include followers, but does items and abilities.

Specified by:
DBReadPlayer in interface DatabaseEngine
Parameters:
name - the name of the player
Returns:
the player mob object, or null

getExtendedUserList

public java.util.List<PlayerLibrary.ThinPlayer> getExtendedUserList()
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Returns the list of all characters as thinplayer objects. This is the whole bloody list.

Specified by:
getExtendedUserList in interface DatabaseEngine
Returns:
the list of all players
See Also:
PlayerLibrary.ThinPlayer

getThinUser

public PlayerLibrary.ThinPlayer getThinUser(java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Returns a ThinPlayer object with information about the character with the given name.

Specified by:
getThinUser in interface DatabaseEngine
Parameters:
name - the name of the character to return.
Returns:
the thin player of this user, or null if not found
See Also:
PlayerLibrary.ThinPlayer

DBReadFollowers

public void DBReadFollowers(MOB mob,
                            boolean bringToLife)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Loads the followers of the given mob and optionally brings them to life. This will query and create the follower mob objects, add them to the given mob at the very least.

Specified by:
DBReadFollowers in interface DatabaseEngine
Parameters:
mob - the mob whose players to load
bringToLife - true to bring them to life, false not
See Also:
DatabaseEngine.DBScanFollowers(String)

DBScanFollowers

public java.util.List<MOB> DBScanFollowers(java.lang.String mobName)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Queries and creates mob objects for all the followers of the player with the given name and returns the list. It does not bring them to life, add to to any mob, or start them ticking. It just makes and returns the mob objects.

Specified by:
DBScanFollowers in interface DatabaseEngine
Parameters:
mobName - the name of the mob to return
Returns:
the list of follower mob objects
See Also:
DatabaseEngine.DBReadFollowers(MOB, boolean)

DBDeletePlayerOnly

public void DBDeletePlayerOnly(java.lang.String mobName)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Removes the character and clan affiliation records from the database and nothing else. Not abilities, or items, or followers, or anything else... there are other methods for that. This just does in the char record and clan affiliation.

Specified by:
DBDeletePlayerOnly in interface DatabaseEngine
Parameters:
mobName - the mob to delete

DBDeleteAccount

public void DBDeleteAccount(PlayerAccount account)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Removes only the given account from the database. Does not delete players or any player data.

Specified by:
DBDeleteAccount in interface DatabaseEngine
Parameters:
account - the account to delete

DBCreateCharacter

public void DBCreateCharacter(MOB mob)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERS Creates the character record for the given mob in the CMCHAR table in the database, and updates the account record if any. Does not handle items, followers, abilities, or anything else -- just the base character record.

Specified by:
DBCreateCharacter in interface DatabaseEngine
Parameters:
mob - the character to create

DBDeleteAllPlayerData

public void DBDeleteAllPlayerData(java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Deletes all player data belonging to the player, of all types and sections, all over. BOOM.

Specified by:
DBDeleteAllPlayerData in interface DatabaseEngine
Parameters:
name - the user id/name of the player to delete all data of
See Also:
DatabaseEngine.DBReadAllPlayerData(String)

DBReadAllPlayerData

public java.util.List<DatabaseEngine.PlayerData> DBReadAllPlayerData(java.lang.String playerID)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Just as it says, this method reads all player data, which is the only way to get all bank data at the same time, for example.

Specified by:
DBReadAllPlayerData in interface DatabaseEngine
Parameters:
playerID - the user id of the player to read all data for
Returns:
all of this players data.
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBDeleteAllPlayerData(String)

DBReadPlayerData

public java.util.List<DatabaseEngine.PlayerData> DBReadPlayerData(java.lang.String playerID,
                                                                  java.lang.String section)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Read a specific set of data for the given player, belonging to the given section

Specified by:
DBReadPlayerData in interface DatabaseEngine
Parameters:
playerID - the user id for the player to read data for
section - the section/type of data to read.
Returns:
the data for the player in the section
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBCountPlayerData(String, String), DatabaseEngine.DBDeletePlayerData(String, String), DatabaseEngine.DBReadPlayerData(String, List)

DBReadPlayerDataByKeyMask

public java.util.List<DatabaseEngine.PlayerData> DBReadPlayerDataByKeyMask(java.lang.String section,
                                                                           java.lang.String keyMask)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Reads a list of data entries in a given section and selecting keys by a regular expression. This is a scanning call by section.

Specified by:
DBReadPlayerDataByKeyMask in interface DatabaseEngine
Parameters:
section - the section/type of data to return
keyMask - the regular expression to match against keys
Returns:
the player data entries returned.
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBReadPlayerData(String, String, String), DatabaseEngine.DBReadPlayerDataEntry(String)

DBReadPlayerDataEntry

public java.util.List<DatabaseEngine.PlayerData> DBReadPlayerDataEntry(java.lang.String key)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Reads what is probably a single player data entry, but could be more?

Specified by:
DBReadPlayerDataEntry in interface DatabaseEngine
Parameters:
key - the key of the specific entry(s) to return
Returns:
the player data entry to return
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBReadPlayerDataByKeyMask(String, String), DatabaseEngine.DBReadPlayerData(String, String, String)

DBCountPlayerData

public int DBCountPlayerData(java.lang.String playerID,
                             java.lang.String section)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Counts the number of rows of data/entries

Specified by:
DBCountPlayerData in interface DatabaseEngine
Parameters:
playerID - the user id of the player to count the data of
section - the section/type of data to count
Returns:
the number of entries for the given player and section
See Also:
DatabaseEngine.DBReadPlayerData(String, String), DatabaseEngine.DBDeletePlayerData(String, String), DatabaseEngine.DBReadPlayerData(String, List)

DBCountPlayerData

public int DBCountPlayerData(java.lang.String section)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Counts the number of rows of data/entries per section.

Specified by:
DBCountPlayerData in interface DatabaseEngine
Parameters:
section - the cross-player section of data
Returns:
the number of entries for the given section
See Also:
DatabaseEngine.DBReadPlayerData(String, String), DatabaseEngine.DBDeletePlayerData(String, String), DatabaseEngine.DBReadPlayerData(String, List)

DBReadPlayerDataAuthorsBySection

public java.util.List<java.lang.String> DBReadPlayerDataAuthorsBySection(java.lang.String section)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Returns the list of unique authors for a given section

Specified by:
DBReadPlayerDataAuthorsBySection in interface DatabaseEngine
Parameters:
section - the cross-player section of data
Returns:
the unique authors for a given section
See Also:
DatabaseEngine.DBReadPlayerData(String, String), DatabaseEngine.DBDeletePlayerData(String, String), DatabaseEngine.DBReadPlayerData(String, List)

DBReadPlayerData

public java.util.List<DatabaseEngine.PlayerData> DBReadPlayerData(java.lang.String playerID,
                                                                  java.lang.String section,
                                                                  java.lang.String key)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Reads what is probably a single player data entry, but could be more. All fields are required.

Specified by:
DBReadPlayerData in interface DatabaseEngine
Parameters:
playerID - the name/userid of the player to read data for
section - the section/type of data to return
key - the key of the specific entry(s) to return
Returns:
the player data entry to return
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBReadPlayerDataByKeyMask(String, String), DatabaseEngine.DBReadPlayerDataEntry(String)

DBReadPlayerSectionData

public java.util.List<DatabaseEngine.PlayerData> DBReadPlayerSectionData(java.lang.String section)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Reads in all player data for all players for the given data type/section. Use this sparingly!

Specified by:
DBReadPlayerSectionData in interface DatabaseEngine
Parameters:
section - the section, type of data to delete
Returns:
the player data in the given section for all players
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBReadPlayerDataPlayersBySection(String), DatabaseEngine.DBDeletePlayerSectionData(String)

DBReadPlayerDataPlayersBySection

public java.util.List<java.lang.String> DBReadPlayerDataPlayersBySection(java.lang.String section)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Reads in all unique player names for all players for the given data type/section.

Specified by:
DBReadPlayerDataPlayersBySection in interface DatabaseEngine
Parameters:
section - the section to read player names for
Returns:
the list of all unique names in this section
See Also:
DatabaseEngine.DBReadPlayerSectionData(String), DatabaseEngine.DBDeletePlayerSectionData(String)

DBReadPlayerData

public java.util.List<DatabaseEngine.PlayerData> DBReadPlayerData(java.lang.String player,
                                                                  java.util.List<java.lang.String> sections)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Reads in all data for the given player which also belongs to any one of the given sections/data types.

Specified by:
DBReadPlayerData in interface DatabaseEngine
Parameters:
player - the user id of the player to delete the data of
sections - the sections/types of data to return records for
Returns:
the player data records that match the player and sections
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBReadPlayerData(String, String), DatabaseEngine.DBCountPlayerData(String, String), DatabaseEngine.DBDeletePlayerData(String, String)

DBDeletePlayerData

public void DBDeletePlayerData(java.lang.String playerID,
                               java.lang.String section)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Deletes all of the data for the given player of the given section/type.

Specified by:
DBDeletePlayerData in interface DatabaseEngine
Parameters:
playerID - the user id of the player to delete the data of
section - the section/type of data to delete
See Also:
DatabaseEngine.DBReadPlayerData(String, String), DatabaseEngine.DBCountPlayerData(String, String), DatabaseEngine.DBReadPlayerData(String, List)

DBDeletePlayerData

public void DBDeletePlayerData(java.lang.String playerID,
                               java.lang.String section,
                               java.lang.String key)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Deletes what is probably a single player data entry, but could be more. All fields are required.

Specified by:
DBDeletePlayerData in interface DatabaseEngine
Parameters:
playerID - the name/userid of the player to delete data for
section - the section/type of data to delete
key - the key of the specific entry(s) to delete
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBUpdatePlayerData(String, String), DatabaseEngine.DBReCreatePlayerData(String, String, String, String)

DBDeletePlayerSectionData

public void DBDeletePlayerSectionData(java.lang.String section)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Deletes all player data of the given section/type.

Specified by:
DBDeletePlayerSectionData in interface DatabaseEngine
Parameters:
section - the section, type of data to delete
See Also:
DatabaseEngine.DBReadPlayerDataPlayersBySection(String), DatabaseEngine.DBReadPlayerSectionData(String)

DBReCreatePlayerData

public DatabaseEngine.PlayerData DBReCreatePlayerData(java.lang.String name,
                                                      java.lang.String section,
                                                      java.lang.String key,
                                                      java.lang.String xml)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Creates or Updates a single player data entry. This is the same as an upset where, if the key already exists, an update is done, otherwise an insert is done. All fields are required.

Specified by:
DBReCreatePlayerData in interface DatabaseEngine
Parameters:
name - the userid/player id of the entry to create/update
section - the section/type of data to create/update
key - the key of the specific entry(s) to create/update
xml - the new data to save for this entry.
Returns:
the filled in PlayerData record, for both create and update
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBReCreatePlayerData(String, String, String, String), DatabaseEngine.DBCreatePlayerData(String, String, String, String)

DBUpdatePlayerData

public void DBUpdatePlayerData(java.lang.String key,
                               java.lang.String xml)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Updates what is probably a single player data entry, but could be more, by setting the xml data itself for a given key. All fields are required.

Specified by:
DBUpdatePlayerData in interface DatabaseEngine
Parameters:
key - the key of the specific entry(s) to update
xml - the new data to save for this entry.
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBDeletePlayerData(String, String, String), DatabaseEngine.DBReCreatePlayerData(String, String, String, String)

DBCreatePlayerData

public DatabaseEngine.PlayerData DBCreatePlayerData(java.lang.String player,
                                                    java.lang.String section,
                                                    java.lang.String key,
                                                    java.lang.String data)
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Creates a single player data entry. All fields are required.

Specified by:
DBCreatePlayerData in interface DatabaseEngine
Parameters:
player - the userid/player id of the entry to create
section - the section/type of data to create
key - the key of the specific entry(s) to create
data - the new xml to save for this entry.
Returns:
the filled in PlayerData record
See Also:
DatabaseEngine.PlayerData, DatabaseEngine.DBReCreatePlayerData(String, String, String, String), DatabaseEngine.DBCreatePlayerData(String, String, String, String)

DBReadRaces

public java.util.List<DatabaseEngine.AckRecord> DBReadRaces()
Description copied from interface: DatabaseEngine
Table category: DBRACE Reads all records from the CMGRAC table and returns the AckRecord for all of them in a list, to do with as you please. These are the generic races.

Specified by:
DBReadRaces in interface DatabaseEngine
Returns:
the generic race records
See Also:
DatabaseEngine.AckRecord, DatabaseEngine.DBPruneOldRaces(), DatabaseEngine.DBDeleteRace(String), DatabaseEngine.DBCreateRace(String, String)

DBPruneOldRaces

public void DBPruneOldRaces()
Description copied from interface: DatabaseEngine
Table category: DBRACE Deletes entries in the generic race (CMGRAC) table that are older than RACEEXPIRATIONDAYS old (see ini file).

Specified by:
DBPruneOldRaces in interface DatabaseEngine
See Also:
DatabaseEngine.DBReadRaces(), DatabaseEngine.DBDeleteRace(String), DatabaseEngine.DBCreateRace(String, String)

DBDeleteRace

public void DBDeleteRace(java.lang.String raceID)
Description copied from interface: DatabaseEngine
Table category: DBRACE Removes a generic race from the CMGRAC table.

Specified by:
DBDeleteRace in interface DatabaseEngine
Parameters:
raceID - the ID of the race to delete
See Also:
DatabaseEngine.DBReadRaces(), DatabaseEngine.DBPruneOldRaces(), DatabaseEngine.DBCreateRace(String, String)

DBCreateRace

public void DBCreateRace(java.lang.String raceID,
                         java.lang.String data)
Description copied from interface: DatabaseEngine
Table category: DBRACE Creates a new entry in the generic races (CMGRAC) table with the given unique ID and xml definition data.

Specified by:
DBCreateRace in interface DatabaseEngine
Parameters:
raceID - the unique RaceID
data - the xml data defining the generic race
See Also:
DatabaseEngine.DBReadRaces(), DatabaseEngine.DBPruneOldRaces(), DatabaseEngine.DBDeleteRace(String)

DBReadClasses

public java.util.List<DatabaseEngine.AckRecord> DBReadClasses()
Description copied from interface: DatabaseEngine
Table category: DBCHARCLASS Reads all records from the CMCCAC table and returns the AckRecord for all of them in a list, to do with as you please. These are the generic charclasses.

Specified by:
DBReadClasses in interface DatabaseEngine
Returns:
the generic charclass records
See Also:
DatabaseEngine.AckRecord, DatabaseEngine.DBDeleteClass(String), DatabaseEngine.DBCreateClass(String, String)

DBDeleteClass

public void DBDeleteClass(java.lang.String classID)
Description copied from interface: DatabaseEngine
Table category: DBCHARCLASS Removes a generic charclass from the CMCCAC table.

Specified by:
DBDeleteClass in interface DatabaseEngine
Parameters:
classID - the ID of the charclass to delete
See Also:
DatabaseEngine.DBReadClasses(), DatabaseEngine.DBCreateClass(String, String)

DBCreateClass

public void DBCreateClass(java.lang.String classID,
                          java.lang.String data)
Description copied from interface: DatabaseEngine
Table category: DBCHARCLASS Creates a new entry in the generic charclasses (CMCCAC) table with the given unique ID and xml definition data.

Specified by:
DBCreateClass in interface DatabaseEngine
Parameters:
classID - the unique CharClassID
data - the xml data defining the generic charclass
See Also:
DatabaseEngine.DBReadClasses(), DatabaseEngine.DBDeleteClass(String)

DBReadAbilities

public java.util.List<DatabaseEngine.AckRecord> DBReadAbilities()
Description copied from interface: DatabaseEngine
Table category: DBABILITY Reads all records from the CMGAAC table and returns the AckRecord for all of them in a list, to do with as you please. These are the generic abilities.

Specified by:
DBReadAbilities in interface DatabaseEngine
Returns:
the generic ability records
See Also:
DatabaseEngine.AckRecord, DatabaseEngine.DBDeleteAbility(String), DatabaseEngine.DBCreateAbility(String, String, String)

DBDeleteAbility

public void DBDeleteAbility(java.lang.String classID)
Description copied from interface: DatabaseEngine
Removes a generic ability from the CMGAAC table.

Specified by:
DBDeleteAbility in interface DatabaseEngine
Parameters:
classID - the ID of the ability to delete
See Also:
DatabaseEngine.DBReadAbilities(), DatabaseEngine.DBCreateAbility(String, String, String)

DBCreateAbility

public void DBCreateAbility(java.lang.String classID,
                            java.lang.String typeClass,
                            java.lang.String data)
Description copied from interface: DatabaseEngine
Table category: DBABILITY Creates a new entry in the generic ability (CMGAAC) table with the given unique ID and xml definition data.

Specified by:
DBCreateAbility in interface DatabaseEngine
Parameters:
classID - the unique AbilityID
typeClass - the Ability class ID to base off of (GenAbility, etc.)
data - the xml data defining the generic ability
See Also:
DatabaseEngine.DBReadAbilities(), DatabaseEngine.DBDeleteAbility(String)

DBReadArtifacts

public void DBReadArtifacts()
Description copied from interface: DatabaseEngine
Table category: DBPLAYERDATA Initializes the artifact ability tickers by reading them from the CMPDAT table, creating a Prop_Artifact ability, and setting it to start ticking.

Specified by:
DBReadArtifacts in interface DatabaseEngine

DBReadStat

public CoffeeTableRow DBReadStat(long startTime)
Description copied from interface: DatabaseEngine
Table category: DBSTATS Reads a days worth of stats from the CMSTAT table in the database. Returning as a CofeeTableRow object populated with the days data. The start time has the correct date, and an hr/min/sec/ms of 0s.

Specified by:
DBReadStat in interface DatabaseEngine
Parameters:
startTime - the timestamp of the day start
Returns:
the row of data for that day.
See Also:
DatabaseEngine.DBUpdateStat(long, String), DatabaseEngine.DBDeleteStat(long), DatabaseEngine.DBCreateStat(long, long, String), DatabaseEngine.DBReadStats(long, long), CoffeeTableRow

DBDeleteStat

public void DBDeleteStat(long startTime)
Description copied from interface: DatabaseEngine
Table category: DBSTATS Deletes a days worth of stats from the CMSTAT table in the database. The start time has the correct date, and an hr/min/sec/ms of 0s.

Specified by:
DBDeleteStat in interface DatabaseEngine
Parameters:
startTime - the timestamp of the day to delete
See Also:
DatabaseEngine.DBUpdateStat(long, String), DatabaseEngine.DBCreateStat(long, long, String), DatabaseEngine.DBReadStats(long, long), DatabaseEngine.DBReadStat(long)

DBCreateStat

public boolean DBCreateStat(long startTime,
                            long endTime,
                            java.lang.String data)
Description copied from interface: DatabaseEngine
Table category: DBSTATS Creates a days worth of stats in the CMSTAT table in the database. The start time has the correct date, and an hr/min/sec/ms of 0s. The end time is whatever.

Specified by:
DBCreateStat in interface DatabaseEngine
Parameters:
startTime - the timestamp of the day start
endTime - the timestamp of the day end
data - the xml data to insert.
Returns:
true if insert was successful, false otherwise
See Also:
DatabaseEngine.DBUpdateStat(long, String), DatabaseEngine.DBDeleteStat(long), DatabaseEngine.DBReadStats(long, long), DatabaseEngine.DBReadStat(long)

DBUpdateStat

public boolean DBUpdateStat(long startTime,
                            java.lang.String data)
Description copied from interface: DatabaseEngine
Table category: DBSTATS Updates a single days worth of stats in the CMSTAT table in the database. The start time has the correct date, and an hr/min/sec/ms of 0s.

Specified by:
DBUpdateStat in interface DatabaseEngine
Parameters:
startTime - the timestamp of the day start
data - the xml data to use.
Returns:
true if the update succeeded, false otherwise
See Also:
DatabaseEngine.DBDeleteStat(long), DatabaseEngine.DBCreateStat(long, long, String), DatabaseEngine.DBReadStats(long, long), DatabaseEngine.DBReadStat(long)

DBReadStats

public java.util.List<CoffeeTableRow> DBReadStats(long startTime,
                                                  long endTime)
Description copied from interface: DatabaseEngine
Table category: DBSTATS Read all or a group of statistic rows within a time range. Each row represents a rl 'day' of data.

Specified by:
DBReadStats in interface DatabaseEngine
Parameters:
startTime - the timestamp of the first row
endTime - 0, or the end time of the last row.
Returns:
the group of statistics requested.
See Also:
DatabaseEngine.DBUpdateStat(long, String), DatabaseEngine.DBDeleteStat(long), DatabaseEngine.DBCreateStat(long, long, String), DatabaseEngine.DBReadStat(long), CoffeeTableRow

errorStatus

public java.lang.String errorStatus()
Description copied from interface: DatabaseEngine
Returns the database status, formatted for html.

Specified by:
errorStatus in interface DatabaseEngine
Returns:
the database status, formatted for html.

resetConnections

public void resetConnections()
Description copied from interface: DatabaseEngine
Forces all existing database connections to be closed, and then re-open.

Specified by:
resetConnections in interface DatabaseEngine

pingAllConnections

public int pingAllConnections(long overrideTimeoutIntervalMillis)
Description copied from interface: DatabaseEngine
"Pings" all connections to the database by issueing a "SELECT 1 FROM CMCHAR", if the connection has not seen any action in the given number of milliseconds.

Specified by:
pingAllConnections in interface DatabaseEngine
Parameters:
overrideTimeoutIntervalMillis - the connection timeout
Returns:
the number of connections pinged

pingAllConnections

public int pingAllConnections()
Description copied from interface: DatabaseEngine
"Pings" all connections to the database by issueing a "SELECT 1 FROM CMCHAR".

Specified by:
pingAllConnections in interface DatabaseEngine
Returns:
the number of connections pinged

DBCreatePoll

public void DBCreatePoll(java.lang.String name,
                         java.lang.String player,
                         java.lang.String subject,
                         java.lang.String description,
                         java.lang.String optionXML,
                         int flag,
                         java.lang.String qualZapper,
                         java.lang.String results,
                         long expiration)
Description copied from interface: DatabaseEngine
Table category: DBPOLLS Creates a new poll in the DBPOLLS table. Most of the arguments are self explanatory.

Specified by:
DBCreatePoll in interface DatabaseEngine
Parameters:
name - the unique name of the poll
player - the user/character id of the creator
subject - the title/subject of the poll
description - the long descriptions
optionXML - choices format <OPTIONS><OPTION>option text...
flag - flag bitmap, see Poll.FLAG_ABSTAIN
qualZapper - the zapper mask for who can answer the poll
results - <RESULTS><RESULT><USER><IP><ANS>
expiration - the rl date/timestamp of when the poll auto-closes
See Also:
Poll, Poll.FLAG_ABSTAIN, DatabaseEngine.DBUpdatePoll(String, String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePollResults(String, String), DatabaseEngine.DBDeletePoll(String), DatabaseEngine.DBReadPollList(), DatabaseEngine.DBReadPoll(String)

DBUpdatePoll

public void DBUpdatePoll(java.lang.String oldName,
                         java.lang.String name,
                         java.lang.String player,
                         java.lang.String subject,
                         java.lang.String description,
                         java.lang.String optionXML,
                         int flag,
                         java.lang.String qualZapper,
                         java.lang.String results,
                         long expiration)
Description copied from interface: DatabaseEngine
Table category: DBPOLLS Updates and/or renames a poll in the DBPOLLS table. Most of the arguments are self explanatory.

Specified by:
DBUpdatePoll in interface DatabaseEngine
Parameters:
oldName - required, the unique old name of the poll, or current name
name - the unique new name of the poll, or the current one
player - the user/character id of the creator
subject - the title/subject of the poll
description - the long descriptions
optionXML - choices format <OPTIONS><OPTION>option text...
flag - flag bitmap, see Poll.FLAG_ABSTAIN
qualZapper - the zapper mask for who can answer the poll
results - xml doc: <RESULTS><RESULT><USER><IP><ANS>
expiration - the rl date/timestamp of when the poll auto-closes
See Also:
Poll, Poll.FLAG_ABSTAIN, DatabaseEngine.DBCreatePoll(String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePollResults(String, String), DatabaseEngine.DBDeletePoll(String), DatabaseEngine.DBReadPollList(), DatabaseEngine.DBReadPoll(String)

DBUpdatePollResults

public void DBUpdatePollResults(java.lang.String name,
                                java.lang.String results)
Description copied from interface: DatabaseEngine
Table category: DBPOLLS Updates the results xml array for an existing poll. Called when a new result is added, removed, or modified.

Specified by:
DBUpdatePollResults in interface DatabaseEngine
Parameters:
name - the unique name of the poll
results - xml doc: <RESULTS><RESULT><USER><IP><ANS>
See Also:
Poll, Poll.FLAG_ABSTAIN, DatabaseEngine.DBCreatePoll(String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePoll(String, String, String, String, String, String, int, String, String, long), DatabaseEngine.DBDeletePoll(String), DatabaseEngine.DBReadPollList(), DatabaseEngine.DBReadPoll(String)

DBDeletePoll

public void DBDeletePoll(java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBPOLLS Deletes a poll, and all its options and results, forever.

Specified by:
DBDeletePoll in interface DatabaseEngine
Parameters:
name - the unique name of the poll to kill
See Also:
Poll, Poll.FLAG_ABSTAIN, DatabaseEngine.DBCreatePoll(String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePoll(String, String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePollResults(String, String), DatabaseEngine.DBReadPollList(), DatabaseEngine.DBReadPoll(String)

DBReadPollList

public java.util.List<DatabaseEngine.PollData> DBReadPollList()
Description copied from interface: DatabaseEngine
Table category: DBPOLLS Reads the raw data for all the polls from DBPOLLs table.

Specified by:
DBReadPollList in interface DatabaseEngine
Returns:
the list of PollData objects
See Also:
DatabaseEngine.PollData, Poll, Poll.FLAG_ABSTAIN, DatabaseEngine.DBCreatePoll(String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePoll(String, String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePollResults(String, String), DatabaseEngine.DBDeletePoll(String), DatabaseEngine.DBReadPoll(String)

DBReadPoll

public DatabaseEngine.PollData DBReadPoll(java.lang.String name)
Description copied from interface: DatabaseEngine
Table category: DBPOLLS Reads the raw data for a specific poll of a given name.

Specified by:
DBReadPoll in interface DatabaseEngine
Parameters:
name - the unique name of the poll to read
Returns:
the raw poll data for that poll, as a PollData object
See Also:
DatabaseEngine.PollData, Poll, Poll.FLAG_ABSTAIN, DatabaseEngine.DBCreatePoll(String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePoll(String, String, String, String, String, String, int, String, String, long), DatabaseEngine.DBUpdatePollResults(String, String), DatabaseEngine.DBDeletePoll(String), DatabaseEngine.DBReadPoll(String)

DBReadVFSDirectory

public CMFile.CMVFSDir DBReadVFSDirectory()
Description copied from interface: DatabaseEngine
Table category: DBVFS Reads the root of the VFS (DBFS) database filesystem. It returns the CMFile.CMVFSDir virtual object describing the database filesystem root and its contents.

Specified by:
DBReadVFSDirectory in interface DatabaseEngine
Returns:
the dbfs root filesystem
See Also:
CMFile.CMVFSDir, DatabaseEngine.DBReadVFSFile(String), DatabaseEngine.DBCreateVFSFile(String, int, String, long, Object), DatabaseEngine.DBUpSertVFSFile(String, int, String, long, Object), DatabaseEngine.DBDeleteVFSFile(String)

DBReadVFSFile

public CMFile.CMVFSFile DBReadVFSFile(java.lang.String filename)
Description copied from interface: DatabaseEngine
Table category: DBVFS Reads the complete DBFS file record for the given filepath. The path does not begin with a /.

Specified by:
DBReadVFSFile in interface DatabaseEngine
Parameters:
filename - the path of the file to read
Returns:
the complete file record, including data
See Also:
CMFile.CMVFSFile, DatabaseEngine.DBReadVFSDirectory(), DatabaseEngine.DBCreateVFSFile(String, int, String, long, Object), DatabaseEngine.DBUpSertVFSFile(String, int, String, long, Object), DatabaseEngine.DBDeleteVFSFile(String)

DBCreateVFSFile

public void DBCreateVFSFile(java.lang.String filename,
                            int bits,
                            java.lang.String creator,
                            long updateTime,
                            java.lang.Object data)
Description copied from interface: DatabaseEngine
Table category: DBVFS Creates a new file in the DBFS filesystem stored in the CBVFS table. The filename does not begin with a /. The data may be a String, StringBuffer, or byte array. The bits are found in CMFile.

Specified by:
DBCreateVFSFile in interface DatabaseEngine
Parameters:
filename - the full name/path
bits - toggle bits about the file
creator - the character id of the file creator/owner
updateTime - the timestamp of the files creation/update time
data - the file content, String, StringBuffer, or byte array
See Also:
CMFile.VFS_MASK_MASKSAVABLE, DatabaseEngine.DBReadVFSDirectory(), DatabaseEngine.DBReadVFSFile(String), DatabaseEngine.DBUpSertVFSFile(String, int, String, long, Object), DatabaseEngine.DBDeleteVFSFile(String)

DBUpSertVFSFile

public void DBUpSertVFSFile(java.lang.String filename,
                            int bits,
                            java.lang.String creator,
                            long updateTime,
                            java.lang.Object data)
Description copied from interface: DatabaseEngine
Table category: DBVFS Creates or updates a file in the DBFS filesystem stored in the CBVFS table. The filename does not begin with a /. The data may be a String, StringBuffer, or byte array. The bits are found in CMFile.

Specified by:
DBUpSertVFSFile in interface DatabaseEngine
Parameters:
filename - the full name/path
bits - toggle bits about the file
creator - the character id of the file creator/owner
updateTime - the timestamp of the files creation/update time
data - the file content, String, StringBuffer, or byte array
See Also:
CMFile.VFS_MASK_MASKSAVABLE, DatabaseEngine.DBReadVFSDirectory(), DatabaseEngine.DBReadVFSFile(String), DatabaseEngine.DBCreateVFSFile(String, int, String, long, Object), DatabaseEngine.DBDeleteVFSFile(String)

DBDeleteVFSFile

public void DBDeleteVFSFile(java.lang.String filename)
Description copied from interface: DatabaseEngine
Table category: DBVFS Deletes a file from the DBFS in the DBVFS table. The path does not begin with a /.

Specified by:
DBDeleteVFSFile in interface DatabaseEngine
Parameters:
filename - the full path filename of the file to kill
See Also:
DatabaseEngine.DBReadVFSDirectory(), DatabaseEngine.DBReadVFSFile(String), DatabaseEngine.DBCreateVFSFile(String, int, String, long, Object), DatabaseEngine.DBUpSertVFSFile(String, int, String, long, Object)

getBackLogEntries

public java.util.List<Pair<java.lang.String,java.lang.Long>> getBackLogEntries(java.lang.String channelName,
                                                                               int newestToSkip,
                                                                               int numToReturn)
Description copied from interface: DatabaseEngine
Table category: DBBACKLOG Returns a list of channel messages for the given channel and criteria. The list returned includes the message, and the timestamp of the message. The list is date-sorted, so list returns can ge "paged" by setting the number to skip and the number to return.

Specified by:
getBackLogEntries in interface DatabaseEngine
Parameters:
channelName - the unique name of the channel to return messages from
newestToSkip - the number of "newest" messages to skip
numToReturn - the number of total messages to return
Returns:
a list of applicable messages, coded as string,timestamp
See Also:
DatabaseEngine.addBackLogEntry(String, String), DatabaseEngine.trimBackLogEntries(String[], int, long)

trimBackLogEntries

public void trimBackLogEntries(java.lang.String[] channels,
                               int maxMessages,
                               long oldestTime)
Description copied from interface: DatabaseEngine
Table category: DBBACKLOG This is a periodic maintenance method which will go through the list of unique channel names, and trim them according to the maximum number of messages to retain (absolute), and the oldest message to return (absolute timestamp -- no 0 nonsense). Both criteria will be used in the trimming.

Specified by:
trimBackLogEntries in interface DatabaseEngine
Parameters:
channels - the list of channels to go through.
maxMessages - the maximum number of messages to retain
oldestTime - the oldest message to retain
See Also:
DatabaseEngine.getBackLogEntries(String, int, int), DatabaseEngine.addBackLogEntry(String, String)

addBackLogEntry

public void addBackLogEntry(java.lang.String channelName,
                            java.lang.String entry)
Description copied from interface: DatabaseEngine
Table category: DBBACKLOG Adds a CHANNEL message to the backlog table

Specified by:
addBackLogEntry in interface DatabaseEngine
Parameters:
channelName - the unique name of the channel
entry - message
See Also:
DatabaseEngine.getBackLogEntries(String, int, int), DatabaseEngine.trimBackLogEntries(String[], int, long)

DBRawExecute

public int DBRawExecute(java.lang.String sql)
                 throws CMException
Description copied from interface: DatabaseEngine
Executes an arbitrary SQL statement against your main database and returns the response number/code.

Specified by:
DBRawExecute in interface DatabaseEngine
Parameters:
sql - the SQL statement
Returns:
the exec response number (usually num rows)
Throws:
CMException - any errors that occur

DBRawQuery

public java.util.List<java.lang.String[]> DBRawQuery(java.lang.String sql)
                                              throws CMException
Description copied from interface: DatabaseEngine
Executes an arbitrary SQL query against your main database and returns the results as a list of string arrays, where each array is a row, and each column is a column from the query.

Specified by:
DBRawQuery in interface DatabaseEngine
Parameters:
sql - the SQL query
Returns:
the results of the query
Throws:
CMException - any errors that occur