Class SQLWarpsRepository

java.lang.Object
com.zetaplugins.essentialz.storage.repositories.Repository
com.zetaplugins.essentialz.storage.repositories.warps.SQLWarpsRepository
All Implemented Interfaces:
WarpsRepository
Direct Known Subclasses:
MySQLWarpsRepository, SQLiteWarpsRepository

public abstract class SQLWarpsRepository extends Repository implements WarpsRepository
  • Constructor Details

  • Method Details

    • initializeTable

      public void initializeTable()
      Description copied from class: Repository
      Initializes the database table(s) for the repository.
      Specified by:
      initializeTable in class Repository
    • load

      public WarpData load(String warpName)
      Description copied from interface: WarpsRepository
      Gets a warp by its name.
      Specified by:
      load in interface WarpsRepository
      Parameters:
      warpName - The name of the warp.
      Returns:
      The warp object, or null if not found.
    • save

      public void save(WarpData warpData)
      Description copied from interface: WarpsRepository
      Saves a warp to the storage system.
      Specified by:
      save in interface WarpsRepository
      Parameters:
      warpData - The warp to save.
    • getInserOrReplaceWarpStatement

      protected abstract String getInserOrReplaceWarpStatement()
    • delete

      public boolean delete(String warpName)
      Description copied from interface: WarpsRepository
      Deletes a warp from the storage system.
      Specified by:
      delete in interface WarpsRepository
      Parameters:
      warpName - The name of the warp to delete.
    • getAllWarpNames

      public List<String> getAllWarpNames()
      Description copied from interface: WarpsRepository
      Gets a list of all warp names.
      Specified by:
      getAllWarpNames in interface WarpsRepository
      Returns:
      A list of all warp names.