Class DataBaseBackup

java.lang.Object
com.jk.data.backup.DataBaseBackup
Direct Known Subclasses:
AutomaticDBBackup

public class DataBaseBackup extends Object
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
    Modifier and Type
    Field
    Description
    static final String
    Represents the folder where backups will be stored.
    static final String
    Represents whether the automatic backups are enabled or disabled.
  • Constructor Summary

    Constructors
    Constructor
    Description
    This method constructs a new DataBaseBackup.
    This method constructs a new DataBaseBackup with a specified data source.
  • Method Summary

    Modifier and Type
    Method
    Description
    This 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
    main(String[] args)
    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
    This method needs further implementation to work as intended.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BACKUPS_FOLDER

      public static final String 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

      public static final String 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 new DataBaseBackup.
    • DataBaseBackup

      public DataBaseBackup(JKDataSource dataSource)
      This method constructs a new DataBaseBackup with a specified data source.
      Parameters:
      dataSource - Specifies the data source to use for the backup.
  • Method Details

    • main

      public static void main(String[] args)
      This is the main method, currently its empty and does nothing.
      Parameters:
      args - the command-line arguments.
    • getOutputPath

      public String 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

      public void setOutputPath(String outputPath)
      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).