Package com.palmergames.bukkit.towny.db
Class TownySQLSource
java.lang.Object
com.palmergames.bukkit.towny.db.TownyDataSource
com.palmergames.bukkit.towny.db.TownyDatabaseHandler
com.palmergames.bukkit.towny.db.TownySQLSource
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.palmergames.bukkit.towny.db.TownyDatabaseHandler
BACKUP_DATE_FORMAT, queryQueueFields inherited from class com.palmergames.bukkit.towny.db.TownyDataSource
plugin, universe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancleanup()booleanBuild the SQL string and execute to DELETEvoiddeleteDistrict(District district) voiddeleteHibernatedResident(UUID uuid) voiddeleteJail(Jail jail) voiddeleteNation(Nation nation) voiddeletePlotGroup(PlotGroup group) voiddeleteResident(Resident resident) voiddeleteTown(Town town) voiddeleteTownBlock(TownBlock townBlock) voiddeleteWorld(TownyWorld world) voidcom.zaxxer.hikari.HikariDataSourcebooleanisReady()booleanbooleanloadDistrict(District district) booleanbooleanbooleanbooleanbooleanbooleanloadNation(Nation nation) booleanbooleanbooleanloadPlotGroup(PlotGroup group) booleanbooleanbooleanloadResident(Resident resident) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanloadWorld(TownyWorld world) booleanbooleanbooleanqueueDeleteDB(String tb_name, Map<String, ?> args) booleanbooleanbooleansaveDistrict(District district) booleansaveHibernatedResident(UUID uuid, long registered) booleanbooleansaveNation(Nation nation) booleansavePlotGroup(PlotGroup group) booleansaveResident(Resident resident) booleanbooleansaveTownBlock(TownBlock townBlock) booleansaveWorld(TownyWorld world) booleanBuild the SQL string and execute to INSERT/UPDATEMethods inherited from class com.palmergames.bukkit.towny.db.TownyDatabaseHandler
backup, deleteFile, deletePlotData, generateReplacementName, getLegacyPlotFilename, hasPlotData, loadPlotData, loadPlotData, loadRegenList, mergeNation, mergeTown, newNation, newNation, newResident, newResident, newWorld, removeDistrict, removeJail, removeNation, removePlotGroup, removeResident, removeTown, removeTownBlock, removeTownBlocks, removeWorld, renameDistrict, renameGroup, renameNation, renamePlayer, renameTown, savePlotData, saveRegenList, serializeMetadata, toUUIDArray, toUUIDListMethods inherited from class com.palmergames.bukkit.towny.db.TownyDataSource
loadAll, removeNation, removeNation, removeTown, removeTown, removeTown, saveAll, saveAllWorlds, saveDistricts, saveJails, saveNations, savePlotGroups, saveQueues, saveResidents, saveTownBlocks, saveTowns, saveWorlds
-
Constructor Details
-
TownySQLSource
-
-
Method Details
-
finishTasks
public void finishTasks()- Overrides:
finishTasksin classTownyDatabaseHandler
-
isReady
public boolean isReady()- Returns:
- Whether the datasource is initialized and running.
-
getConnection
- Returns:
- A connection from the pool
- Throws:
SQLException
-
updateDB
Build the SQL string and execute to INSERT/UPDATE- Parameters:
tb_name- - Database Table name.args- - Arguments.keys- - Table keys.- Returns:
- true if the update was successful.
-
queueUpdateDB
-
DeleteDB
Build the SQL string and execute to DELETE- Parameters:
tb_name- - Database Table nameargs- - Arguments- Returns:
- true if the delete was a success.
-
queueDeleteDB
-
cleanup
public boolean cleanup()- Overrides:
cleanupin classTownyDataSource
-
loadTownBlockList
public boolean loadTownBlockList()- Specified by:
loadTownBlockListin classTownyDataSource
-
loadResidentList
public boolean loadResidentList()- Specified by:
loadResidentListin classTownyDataSource
-
loadTownList
public boolean loadTownList()- Specified by:
loadTownListin classTownyDataSource
-
loadNationList
public boolean loadNationList()- Specified by:
loadNationListin classTownyDataSource
-
loadWorldList
public boolean loadWorldList()- Specified by:
loadWorldListin classTownyDataSource
-
loadPlotGroupList
public boolean loadPlotGroupList()- Specified by:
loadPlotGroupListin classTownyDataSource
-
loadDistrictList
public boolean loadDistrictList()- Specified by:
loadDistrictListin classTownyDataSource
-
loadJailList
public boolean loadJailList()- Specified by:
loadJailListin classTownyDataSource
-
loadResidents
public boolean loadResidents()- Overrides:
loadResidentsin classTownyDataSource
-
loadResident
- Specified by:
loadResidentin classTownyDataSource
-
loadTowns
public boolean loadTowns()- Overrides:
loadTownsin classTownyDataSource
-
loadTown
- Specified by:
loadTownin classTownyDataSource
-
loadNations
public boolean loadNations()- Overrides:
loadNationsin classTownyDataSource
-
loadNation
- Specified by:
loadNationin classTownyDataSource
-
loadWorlds
public boolean loadWorlds()- Overrides:
loadWorldsin classTownyDataSource
-
loadWorld
- Specified by:
loadWorldin classTownyDataSource
-
loadTownBlocks
public boolean loadTownBlocks()- Specified by:
loadTownBlocksin classTownyDataSource
-
loadPlotGroups
public boolean loadPlotGroups()- Overrides:
loadPlotGroupsin classTownyDataSource
-
loadDistricts
public boolean loadDistricts()- Overrides:
loadDistrictsin classTownyDataSource
-
loadCooldowns
public boolean loadCooldowns()- Specified by:
loadCooldownsin classTownyDataSource
-
saveCooldowns
public boolean saveCooldowns()- Specified by:
saveCooldownsin classTownyDataSource
-
loadPlotGroup
- Specified by:
loadPlotGroupin classTownyDataSource
-
loadDistrict
- Specified by:
loadDistrictin classTownyDataSource
-
loadJails
public boolean loadJails()- Overrides:
loadJailsin classTownyDataSource
-
loadJail
- Specified by:
loadJailin classTownyDataSource
-
saveResident
- Specified by:
saveResidentin classTownyDataSource
-
saveHibernatedResident
- Specified by:
saveHibernatedResidentin classTownyDataSource
-
saveTown
- Specified by:
saveTownin classTownyDataSource
-
savePlotGroup
- Specified by:
savePlotGroupin classTownyDataSource
-
saveDistrict
- Specified by:
saveDistrictin classTownyDataSource
-
saveNation
- Specified by:
saveNationin classTownyDataSource
-
saveWorld
- Specified by:
saveWorldin classTownyDataSource
-
saveTownBlock
- Specified by:
saveTownBlockin classTownyDataSource
-
saveJail
- Specified by:
saveJailin classTownyDataSource
-
deleteResident
- Specified by:
deleteResidentin classTownyDataSource
-
deleteHibernatedResident
- Specified by:
deleteHibernatedResidentin classTownyDataSource
-
deleteTown
- Specified by:
deleteTownin classTownyDataSource
-
deleteNation
- Specified by:
deleteNationin classTownyDataSource
-
deleteWorld
- Specified by:
deleteWorldin classTownyDataSource
-
deleteTownBlock
- Specified by:
deleteTownBlockin classTownyDataSource
-
deletePlotGroup
- Specified by:
deletePlotGroupin classTownyDataSource
-
deleteDistrict
- Specified by:
deleteDistrictin classTownyDataSource
-
deleteJail
- Specified by:
deleteJailin classTownyDataSource
-
getHibernatedResidentRegistered
- Specified by:
getHibernatedResidentRegisteredin classTownyDataSource
-
getHikariDataSource
public com.zaxxer.hikari.HikariDataSource getHikariDataSource()
-