public class ControllerSync extends Object
Modifier and Type | Field and Description |
---|---|
(package private) List<Database> |
dbList
list of databases
|
(package private) DatabaseFacade |
facade
facade patern for the database connection
|
Constructor and Description |
---|
ControllerSync()
Creates a new controller
|
Modifier and Type | Method and Description |
---|---|
void |
connect(String url,
String user,
String pass,
String dbName)
Creates a new connection to the database
|
String[][] |
getDBlist()
Search for avaliables databases
|
void |
startSync(String user,
String pass,
Cell[][] cells,
String tableName,
String url,
Observer observer)
Start the sync between application and database
|
DatabaseFacade facade
public ControllerSync()
public String[][] getDBlist() throws FileNotFoundException
FileNotFoundException
public void startSync(String user, String pass, Cell[][] cells, String tableName, String url, Observer observer)
user
- usernamepass
- username's passwordcells
- cells to be synctableName
- name of the tableurl
- database urlobserver
- the observer object