public class ManageUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
backup(String dbName,
Database copyFromDB)
Creates a new backup sqlite file with the data of copyFromDB.
|
static void |
clearAndCopy(Database clearAndCopyToDB,
Database copyFromDB)
Clears a database and copies data from other database to that database.
|
static Database |
getDB(Plan plugin,
String dbName) |
static Collection<UUID> |
getUUIDS(Database db)
Get the saved UUIDs in a hashset
|
public static void backup(String dbName, Database copyFromDB) throws DatabaseInitException, SQLException
dbName
- Name of database (mysql/sqlite)copyFromDB
- Database you want to backup.DatabaseInitException
SQLException
public static Collection<UUID> getUUIDS(Database db)
db
- Database to get UUIDs frompublic static void clearAndCopy(Database clearAndCopyToDB, Database copyFromDB) throws SQLException
clearAndCopyToDB
- Database that will be cleared data will be copied
to.copyFromDB
- Database where data will be copied fromSQLException
public static Database getDB(Plan plugin, String dbName) throws DatabaseInitException
DatabaseInitException
Copyright © 2017. All rights reserved.