org.datanucleus.metadata
Class VersionStrategy

java.lang.Object
  extended by org.datanucleus.metadata.VersionStrategy
All Implemented Interfaces:
java.io.Serializable

public class VersionStrategy
extends java.lang.Object
implements java.io.Serializable

Three common strategies for versioning instances are supported by standard metadata. These include state-comparison, timestamp, and version-number.

See Also:
Serialized Form

Field Summary
static VersionStrategy DATE_TIME
          strategy="date-time"
static VersionStrategy NONE
          strategy="none"
static VersionStrategy STATE_IMAGE
          strategy="state-image"
static VersionStrategy VERSION_NUMBER
          strategy="version-number"
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
protected  int getType()
           
static VersionStrategy getVersionStrategy(java.lang.String value)
          Return VersionStrategy from String.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final VersionStrategy NONE
strategy="none"


STATE_IMAGE

public static final VersionStrategy STATE_IMAGE
strategy="state-image"


DATE_TIME

public static final VersionStrategy DATE_TIME
strategy="date-time"


VERSION_NUMBER

public static final VersionStrategy VERSION_NUMBER
strategy="version-number"

Method Detail

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

getType

protected int getType()

getVersionStrategy

public static VersionStrategy getVersionStrategy(java.lang.String value)
Return VersionStrategy from String.

Parameters:
value - strategy attribute value
Returns:
Instance of VersionStrategy. If value invalid, return null.


Copyright © 2011. All Rights Reserved.