|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flexive.shared.content.FxPK
public class FxPK
Primary key for FxContents
| Field Summary | |
|---|---|
protected long |
id
|
static int |
LIVE
Constant to select the version whose workflow step is flagged as live |
static int |
MAX
Constant to select the maximum available version |
static int |
NEW_ID
Id to use for new instances (flags them as new) |
protected int |
version
|
| Constructor Summary | |
|---|---|
FxPK()
Constructor for new FxContents |
|
FxPK(long id)
Ctor, version is initialized with MAX |
|
FxPK(long id,
int version)
Ctor |
|
| Method Summary | |
|---|---|
int |
compareTo(FxPK o)
|
static FxPK |
createNewPK()
Create a new primary key |
boolean |
equals(java.lang.Object obj)
Note: FxPKs with generic version information like LIVE or MAX
will return "false" if they are checked for equality with FxPKs that contain a distinct
version information. |
static FxPK |
fromObject(java.lang.Object value)
Extract a PK from the given object. |
static FxPK |
fromString(java.lang.String value)
Construct a primary key from a String |
long |
getId()
Getter for the id |
static java.util.List<java.lang.Long> |
getIds(java.util.Collection<? extends FxPK> pks)
Extracts the IDs of the given PK collection. |
TypeStorageMode |
getStorageMode()
Get the storage mode for this primary key. |
int |
getVersion()
Getter for the version. |
int |
hashCode()
|
boolean |
isDistinctVersion()
Does this primary key point to a distinct version or is it something like maximum or live version? |
boolean |
isNew()
Is this primary key for a new FxContent? |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NEW_ID
public static final int MAX
public static final int LIVE
Step.isLiveStep(),
Constant Field Valuesprotected long id
protected int version
| Constructor Detail |
|---|
public FxPK(long id,
int version)
id - idversion - versionpublic FxPK(long id)
MAX
id - idMAXpublic FxPK()
| Method Detail |
|---|
public boolean isNew()
public long getId()
public int getVersion()
MAX,
LIVEpublic TypeStorageMode getStorageMode()
public static FxPK createNewPK()
public boolean isDistinctVersion()
public java.lang.String toString()
toString in class java.lang.Objectpublic static FxPK fromString(java.lang.String value)
value - string value
java.lang.IllegalArgumentException - if the string does not represent a valid PK valuetoString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
LIVE or MAX
will return "false" if they are checked for equality with FxPKs that contain a distinct
version information. Consider using FxContent.matchesPk(FxPK) if appropriate.
equals in class java.lang.Objectpublic static FxPK fromObject(java.lang.Object value)
Extract a PK from the given object. Useful for scripting or JSF-related calls where the actual value type may vary.
Current, following types for value are supported:
FxPK - trivialFxReference - return the PK contained in the "best translation" for the current userFxSelectListItem - use the item's ID as an object ID and return the PKLong - return a new PK for the given object IDString - return a new PK based on the given PK string representation
value - the value to be interpreted as an FxPK obejct
public int compareTo(FxPK o)
compareTo in interface java.lang.Comparable<FxPK>public static java.util.List<java.lang.Long> getIds(java.util.Collection<? extends FxPK> pks)
pks - the PKs to be processed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||