public class ManageUtils extends Object
Constructor and Description |
---|
ManageUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
backup(String dbName,
Database copyFromDB)
Creates a new backup sqlite file with the data of copyFromDB.
|
static boolean |
clearAndCopy(Database clearAndCopyToDB,
Database copyFromDB,
Collection<UUID> fromDBsavedUUIDs)
Clears a database and copies data from other database to that database.
|
static Collection<UUID> |
getUUIDS(Database db)
Get the saved UUIDs in a hashset
|
static boolean |
importOnTime(HashMap<UUID,Long> onTimeData,
Plan plugin)
Import OnTime plugin data to the provided DataCacheHandler, and save
cache.
|
public static boolean backup(String dbName, Database copyFromDB)
dbName
- Name of database (mysql/sqlite)copyFromDB
- Database you want to backup.public static boolean importOnTime(HashMap<UUID,Long> onTimeData, Plan plugin)
onTimeData
- PlayTime data of Ontimeplugin
- Current instance of Planpublic static Collection<UUID> getUUIDS(Database db)
db
- Database to get UUIDs frompublic static boolean clearAndCopy(Database clearAndCopyToDB, Database copyFromDB, Collection<UUID> fromDBsavedUUIDs)
clearAndCopyToDB
- Database that will be cleared data will be copied
to.copyFromDB
- Database where data will be copied fromfromDBsavedUUIDs
- UUID collection of saved uuids in the copyFromDBCopyright © 2017. All rights reserved.