|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.metadata.VersionStrategy
public class VersionStrategy
Three common strategies for versioning instances are supported by standard metadata. These include state-comparison, timestamp, and version-number. state-image involves comparing the values in specific columns to determine if the database row was changed. date-time involves comparing the value in a date-time column in the table. The first time in a transaction the row is updated, the timestamp value is updated to the current time. version-number involves comparing the value in a numeric column in the table. The first time in a transaction the row is updated, the version-number column value is incremented.
| Field Summary | |
|---|---|
static VersionStrategy |
DATE_TIME
strategy="date-time" |
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 |
|---|
public static final VersionStrategy STATE_IMAGE
public static final VersionStrategy DATE_TIME
public static final VersionStrategy VERSION_NUMBER
| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the reference object with which to compare.
public java.lang.String toString()
toString in class java.lang.Objectprotected int getType()
public static VersionStrategy getVersionStrategy(java.lang.String value)
value - strategy attribute value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||