Package com.jk.data.backup
Class DataBaseBackup
java.lang.Object
com.jk.data.backup.DataBaseBackup
- Direct Known Subclasses:
AutomaticDBBackup
This class is used for performing database backups.
This class provides methods to start the backup process and configure backup settings.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThis method constructs a newDataBaseBackup
.DataBaseBackup
(JKDataSource dataSource) This method constructs a newDataBaseBackup
with a specified data source. -
Method Summary
Modifier and TypeMethodDescriptionThis method gets the output path where the backups will be saved.boolean
This method checks whether the backup data are to be compressed or not.static void
This is the main method, currently its empty and does nothing.void
setCompress
(boolean compress) This method specify whether the backup data are to be compressed or not.void
setOutputPath
(String outputPath) This method changes the backup output path.void
start()
This method needs further implementation to work as intended.
-
Field Details
-
BACKUPS_FOLDER
Represents the folder where backups will be stored.This constant is used to access and set the backups folder in the configuration.
- See Also:
-
IS_AUTOMATIC_BACKUP
Represents whether the automatic backups are enabled or disabled.This is used to access and set the automatic backup setting in the configuration.
- See Also:
-
-
Constructor Details
-
DataBaseBackup
public DataBaseBackup()This method constructs a newDataBaseBackup
. -
DataBaseBackup
This method constructs a newDataBaseBackup
with a specified data source.- Parameters:
dataSource
- Specifies the data source to use for the backup.
-
-
Method Details
-
main
This is the main method, currently its empty and does nothing.- Parameters:
args
- the command-line arguments.
-
getOutputPath
This method gets the output path where the backups will be saved.- Returns:
- output path where the backup data will be saved.
-
isCompress
public boolean isCompress()This method checks whether the backup data are to be compressed or not.- Returns:
- true, if it is compress-enabled, false otherwise.
-
setCompress
public void setCompress(boolean compress) This method specify whether the backup data are to be compressed or not.- Parameters:
compress
- Indicates the new compressing rule, whether its enabled (true) or disabled (false).
-
setOutputPath
This method changes the backup output path.- Parameters:
outputPath
- Specifies the new output path.
-
start
public void start()This method needs further implementation to work as intended.This method is to be implemented (TBI).
-