Cumulus4j API
(1.2.0-SNAPSHOT)

org.cumulus4j.store.datastoreversion.command
Class MinimumCumulus4jVersion

java.lang.Object
  extended by org.cumulus4j.store.datastoreversion.AbstractDatastoreVersionCommand
      extended by org.cumulus4j.store.datastoreversion.command.MinimumCumulus4jVersion
All Implemented Interfaces:
DatastoreVersionCommand

public class MinimumCumulus4jVersion
extends AbstractDatastoreVersionCommand


Constructor Summary
MinimumCumulus4jVersion()
           
 
Method Summary
 void apply(CommandApplyParam commandApplyParam)
          Perform the upgrade or do whatever this command has to do.
 int getCommandVersion()
          Get the version of this command.
 int getCommandVersionMajor()
           
 int getCommandVersionMinor()
           
 int getCommandVersionRelease()
           
 int getCommandVersionSerial()
           
 boolean isFinal()
          Is this command final, i.e.
static void main(String[] args)
           
 
Methods inherited from class org.cumulus4j.store.datastoreversion.AbstractDatastoreVersionCommand
getCommandID, isKeyStoreDependent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinimumCumulus4jVersion

public MinimumCumulus4jVersion()
Method Detail

getCommandVersion

public int getCommandVersion()
Get the version of this command.

This version must be incremented, if this command is modified!

Note, that a final command cannot be modified!!! You can only modify a final command if this command was newly introduced in the current SNAPSHOT. Never modify a command after it was released!!!

The version returned by the implementation of this method in MinimumCumulus4jVersion is the lowest version of cumulus4j that runs with the current datastore.

In other words: This version here must be set to the current Cumulus4j version, if a lower version of Cumulus4j cannot be used with the datastore structure represented by the current source code, anymore.

This version is composed of the following parts:

For example, the 3rd non-downgradable change to the version 9.08.07-SNAPSHOT would result in the numeric result 90807002 (the serial starts at 0, hence 3rd change = 2). This number is not incremented at the release of 9.08.07! It is only incremented, if the data structure changes in a way that prevents older versions from operating!

Returns:
the version of this command.

getCommandVersionMajor

public int getCommandVersionMajor()

getCommandVersionMinor

public int getCommandVersionMinor()

getCommandVersionRelease

public int getCommandVersionRelease()

getCommandVersionSerial

public int getCommandVersionSerial()

isFinal

public boolean isFinal()
Description copied from interface: DatastoreVersionCommand
Is this command final, i.e. applied only once, or should this command be applied again, when the commandVersion was incremented?

Specified by:
isFinal in interface DatastoreVersionCommand
Overrides:
isFinal in class AbstractDatastoreVersionCommand
Returns:
true, if this command is final; false otherwise.

apply

public void apply(CommandApplyParam commandApplyParam)
Description copied from interface: DatastoreVersionCommand
Perform the upgrade or do whatever this command has to do.

Parameters:
commandApplyParam - various arguments bundled for better compatibility with future extensions. Never null.

main

public static void main(String[] args)

Cumulus4j API
(1.2.0-SNAPSHOT)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.