com.planet_ink.coffee_mud.core.database
Class MOBloader

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.database.MOBloader

public class MOBloader
extends java.lang.Object


Field Summary
protected  DBConnector DB
           
protected  Room emptyRoom
           
 
Constructor Summary
MOBloader(DBConnector newDB)
           
 
Method Summary
protected  void addFollowerDependent(PhysicalAgent P, PairList<PhysicalAgent,java.lang.String> list, java.lang.String parent)
           
 java.util.List<Clan.MemberRecord> DBClanMembers(java.lang.String clan)
           
 void DBCreateAccount(PlayerAccount account)
           
 void DBCreateCharacter(MOB mob)
           
 void DBDeleteAccount(PlayerAccount account)
           
 void DBDeleteCharOnly(java.lang.String mobName)
           
 java.util.List<java.lang.String> DBExpiredCharNameSearch(java.util.Set<java.lang.String> skipNames)
           
 Pair<java.lang.String,java.lang.Boolean> DBFetchEmailData(java.lang.String name)
           
protected  java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBFindPrideWinners(int topThisMany, short scanCPUPercent, boolean players)
           
 Clan.MemberRecord DBGetClanMember(java.lang.String clan, java.lang.String name)
           
 java.util.List<PlayerAccount> DBListAccounts(java.lang.String mask)
           
 void DBNameChange(java.lang.String oldName, java.lang.String newName)
           
 java.lang.String DBPlayerEmailSearch(java.lang.String email)
           
 MOB DBRead(java.lang.String name)
           
 PlayerAccount DBReadAccount(java.lang.String login)
           
 void DBReadFollowers(MOB mob, boolean bringToLife)
           
 MOB DBReadUserOnly(java.lang.String name, java.lang.String[] locationID)
           
 java.util.List<MOB> DBScanFollowers(java.lang.String name)
           
 java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBScanPrideAccountWinners(int topThisMany, short scanCPUPercent)
           
 java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBScanPridePlayerWinners(int topThisMany, short scanCPUPercent)
           
 void DBUpdate(MOB mob)
           
 void DBUpdateAbilities(MOB mob)
           
 void DBUpdateAccount(PlayerAccount account)
           
 void DBUpdateClanDonates(java.lang.String clan, java.lang.String name, double adjGold, int adjXP)
           
 void DBUpdateClanKills(java.lang.String clan, java.lang.String name, int adjMobKills, int adjPlayerKills)
           
 void DBUpdateClanMembership(java.lang.String name, java.lang.String clan, int role)
           
 void DBUpdateEmail(MOB mob)
           
 void DBUpdateFollowers(MOB mob)
           
 void DBUpdateItems(MOB mob)
           
 void DBUpdateJustMOB(MOB mob)
           
 void DBUpdateJustPlayerStats(MOB mob)
           
 void DBUpdatePassword(java.lang.String name, java.lang.String password)
           
 PlayerLibrary.ThinnerPlayer DBUserSearch(java.lang.String login)
           
protected  DBConnector.DBPreparedBatchEntry doBulkInsert(java.lang.StringBuilder str, java.util.List<java.lang.String> clobs, java.lang.String sql, java.lang.String clob)
           
protected  java.lang.String getDBItemUpdateString(MOB mob, Item thisItem)
           
 java.util.List<PlayerLibrary.ThinPlayer> getExtendedUserList()
           
protected  java.lang.String getShortID(Environmental E)
           
 PlayerLibrary.ThinPlayer getThinUser(java.lang.String name)
           
 java.util.List<java.lang.String> getUserList()
           
 PlayerAccount MakeAccount(java.lang.String username, java.sql.ResultSet R)
           
protected  PlayerLibrary.ThinPlayer parseThinUser(java.sql.ResultSet R)
           
 java.util.List<PlayerLibrary.ThinPlayer> vassals(java.lang.String liegeName)
           
 java.util.List<PlayerLibrary.ThinPlayer> worshippers(java.lang.String deityID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DB

protected DBConnector DB

emptyRoom

protected Room emptyRoom
Constructor Detail

MOBloader

public MOBloader(DBConnector newDB)
Method Detail

DBReadUserOnly

public MOB DBReadUserOnly(java.lang.String name,
                          java.lang.String[] locationID)

DBRead

public MOB DBRead(java.lang.String name)

getUserList

public java.util.List<java.lang.String> getUserList()

parseThinUser

protected PlayerLibrary.ThinPlayer parseThinUser(java.sql.ResultSet R)

getThinUser

public PlayerLibrary.ThinPlayer getThinUser(java.lang.String name)

getExtendedUserList

public java.util.List<PlayerLibrary.ThinPlayer> getExtendedUserList()

vassals

public java.util.List<PlayerLibrary.ThinPlayer> vassals(java.lang.String liegeName)

worshippers

public java.util.List<PlayerLibrary.ThinPlayer> worshippers(java.lang.String deityID)

DBScanFollowers

public java.util.List<MOB> DBScanFollowers(java.lang.String name)

DBReadFollowers

public void DBReadFollowers(MOB mob,
                            boolean bringToLife)

DBUpdateEmail

public void DBUpdateEmail(MOB mob)

DBGetClanMember

public Clan.MemberRecord DBGetClanMember(java.lang.String clan,
                                         java.lang.String name)

DBClanMembers

public java.util.List<Clan.MemberRecord> DBClanMembers(java.lang.String clan)

DBUpdateClanMembership

public void DBUpdateClanMembership(java.lang.String name,
                                   java.lang.String clan,
                                   int role)

DBUpdateClanKills

public void DBUpdateClanKills(java.lang.String clan,
                              java.lang.String name,
                              int adjMobKills,
                              int adjPlayerKills)

DBUpdateClanDonates

public void DBUpdateClanDonates(java.lang.String clan,
                                java.lang.String name,
                                double adjGold,
                                int adjXP)

DBUpdate

public void DBUpdate(MOB mob)

DBUpdatePassword

public void DBUpdatePassword(java.lang.String name,
                             java.lang.String password)

DBUpdateJustPlayerStats

public void DBUpdateJustPlayerStats(MOB mob)

DBUpdateJustMOB

public void DBUpdateJustMOB(MOB mob)

getShortID

protected java.lang.String getShortID(Environmental E)

getDBItemUpdateString

protected java.lang.String getDBItemUpdateString(MOB mob,
                                                 Item thisItem)

doBulkInsert

protected DBConnector.DBPreparedBatchEntry doBulkInsert(java.lang.StringBuilder str,
                                                        java.util.List<java.lang.String> clobs,
                                                        java.lang.String sql,
                                                        java.lang.String clob)

DBUpdateItems

public void DBUpdateItems(MOB mob)

DBFindPrideWinners

protected java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBFindPrideWinners(int topThisMany,
                                                                                          short scanCPUPercent,
                                                                                          boolean players)

DBScanPridePlayerWinners

public java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBScanPridePlayerWinners(int topThisMany,
                                                                                             short scanCPUPercent)

DBScanPrideAccountWinners

public java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] DBScanPrideAccountWinners(int topThisMany,
                                                                                              short scanCPUPercent)

addFollowerDependent

protected void addFollowerDependent(PhysicalAgent P,
                                    PairList<PhysicalAgent,java.lang.String> list,
                                    java.lang.String parent)

DBUpdateFollowers

public void DBUpdateFollowers(MOB mob)

DBNameChange

public void DBNameChange(java.lang.String oldName,
                         java.lang.String newName)

DBDeleteCharOnly

public void DBDeleteCharOnly(java.lang.String mobName)

DBUpdateAbilities

public void DBUpdateAbilities(MOB mob)

DBCreateCharacter

public void DBCreateCharacter(MOB mob)

DBUpdateAccount

public void DBUpdateAccount(PlayerAccount account)

DBDeleteAccount

public void DBDeleteAccount(PlayerAccount account)

DBCreateAccount

public void DBCreateAccount(PlayerAccount account)

MakeAccount

public PlayerAccount MakeAccount(java.lang.String username,
                                 java.sql.ResultSet R)
                          throws java.sql.SQLException
Throws:
java.sql.SQLException

DBReadAccount

public PlayerAccount DBReadAccount(java.lang.String login)

DBListAccounts

public java.util.List<PlayerAccount> DBListAccounts(java.lang.String mask)

DBExpiredCharNameSearch

public java.util.List<java.lang.String> DBExpiredCharNameSearch(java.util.Set<java.lang.String> skipNames)

DBUserSearch

public PlayerLibrary.ThinnerPlayer DBUserSearch(java.lang.String login)

DBFetchEmailData

public Pair<java.lang.String,java.lang.Boolean> DBFetchEmailData(java.lang.String name)

DBPlayerEmailSearch

public java.lang.String DBPlayerEmailSearch(java.lang.String email)