com.atlassian.jira.plugin
Class BootstrapPluginVersionStore

java.lang.Object
  extended by com.atlassian.jira.plugin.BootstrapPluginVersionStore
All Implemented Interfaces:
PluginVersionStore

public class BootstrapPluginVersionStore
extends Object
implements PluginVersionStore

Bootstrap NOP implementation of the PluginVersionStore.

Since:
v4.4

Constructor Summary
BootstrapPluginVersionStore()
           
 
Method Summary
 PluginVersion create(PluginVersion pluginVersion)
          Creates a PluginVersion in the database.
 boolean delete(Long pluginVersionId)
          Deletes a plugin version from the datastore.
 void deleteByKey(String pluginKey)
          Deletes any PluginVersions for the plugin with the given key.
 List<PluginVersion> getAll()
          Returns a list of all PluginVersion's.
 PluginVersion getById(Long pluginVersionId)
          Gets the PluginVersion specified by the id.
 long save(PluginVersion pluginVersion)
          Persists the given PluginVersion, performing an insert or update according to whether a record for this plugin key already exists.
 PluginVersion update(PluginVersion pluginVersion)
          Updates a plugin version in the datastore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BootstrapPluginVersionStore

public BootstrapPluginVersionStore()
Method Detail

create

public PluginVersion create(PluginVersion pluginVersion)
Description copied from interface: PluginVersionStore
Creates a PluginVersion in the database. The id in the object will be ignored.

Specified by:
create in interface PluginVersionStore
Parameters:
pluginVersion - contains the key, name, and version to be persisted.
Returns:
a PluginVersion with the database id populated.

update

public PluginVersion update(PluginVersion pluginVersion)
Description copied from interface: PluginVersionStore
Updates a plugin version in the datastore.

Specified by:
update in interface PluginVersionStore
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.

delete

public boolean delete(Long pluginVersionId)
Description copied from interface: PluginVersionStore
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.

Specified by:
delete in interface PluginVersionStore
Parameters:
pluginVersionId - identifies the plugin version record to delete, not null.
Returns:
true if the record was deleted, false otherwise.

getById

public PluginVersion getById(Long pluginVersionId)
Description copied from interface: PluginVersionStore
Gets the PluginVersion specified by the id.

Specified by:
getById in interface PluginVersionStore
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

public List<PluginVersion> getAll()
Description copied from interface: PluginVersionStore
Returns a list of all PluginVersion's.

Specified by:
getAll in interface PluginVersionStore
Returns:
a list of all PluginVersion's.

deleteByKey

public void deleteByKey(String pluginKey)
Description copied from interface: PluginVersionStore
Deletes any PluginVersions for the plugin with the given key.

Specified by:
deleteByKey in interface PluginVersionStore
Parameters:
pluginKey - the key for which to delete the version(s) (required)

save

public long save(PluginVersion pluginVersion)
Description copied from interface: PluginVersionStore
Persists the given PluginVersion, performing an insert or update according to whether a record for this plugin key already exists.

Specified by:
save in interface PluginVersionStore
Parameters:
pluginVersion - the plugin version to save (required)
Returns:
the id of the saved row


Copyright © 2002-2014 Atlassian. All Rights Reserved.