Interface PluginVersionStore

All Known Implementing Classes:
BootstrapPluginVersionStore, OfBizPluginVersionStore

public interface PluginVersionStore
Handles PluginVersion's persistence.
Since:
v3.13
  • Method Details

    • create

      PluginVersion create(PluginVersion pluginVersion)
      Creates a PluginVersion in the database. The id in the object will be ignored.
      Parameters:
      pluginVersion - contains the key, name, and version to be persisted.
      Returns:
      a PluginVersion with the database id populated.
      Throws:
      IllegalArgumentException - if pluginVersion is null.
    • update

      PluginVersion update(PluginVersion pluginVersion)
      Updates a plugin version in the datastore.
      Parameters:
      pluginVersion - contains the key, name, and version to update. The id will be used to find the record to update.
      Returns:
      a PluginVersion that represents the updated record.
      Throws:
      IllegalArgumentException - if pluginVersion or pluginVersion.getId is null or we can not find the record with the provided id.
    • delete

      boolean delete(Long pluginVersionId)
      Deletes a plugin version from the datastore. If the provided id does not resolve to an existing record then this method will return false and no records will be deleted.
      Parameters:
      pluginVersionId - identifies the plugin version record to delete, not null.
      Returns:
      true if the record was deleted, false otherwise.
      Throws:
      IllegalArgumentException - if the pluginVersionId is null.
    • getById

      PluginVersion getById(Long pluginVersionId)
      Gets the PluginVersion specified by the id.
      Parameters:
      pluginVersionId - identifies the plugin version record to retrieve.
      Returns:
      the PluginVersion with the corresponding id or null if the record is not found.
    • getAll

      List<PluginVersion> getAll()
      Returns a list of all PluginVersion's.
      Returns:
      a list of all PluginVersion's.
    • deleteByKey

      void deleteByKey(String pluginKey)
      Deletes any PluginVersions for the plugin with the given key.
      Parameters:
      pluginKey - the key for which to delete the version(s) (required)
    • save

      long save(PluginVersion pluginVersion)
      Persists the given PluginVersion, performing an insert or update according to whether a record for this plugin key already exists.
      Parameters:
      pluginVersion - the plugin version to save (required)
      Returns:
      the id of the saved row