|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.metadata.MCRObjectID
public final class MCRObjectID
This class holds all informations and methods to handle the MyCoRe Object ID. The MyCoRe Object ID is a special ID to identify each metadata object with three parts, they are the project identifier, the type identifier and a string with a number.
| Field Summary | |
|---|---|
protected static MCRConfiguration |
CONFIG
|
static int |
MAX_LENGTH
public constant value for the MCRObjectID length |
| Constructor Summary | |
|---|---|
MCRObjectID()
The constructor for an empty MCRObjectId. |
|
MCRObjectID(String id)
The constructor for MCRObjectID from a given string. |
|
| Method Summary | |
|---|---|
boolean |
equals(MCRObjectID in)
This method check this data again the input and retuns the result as boolean. |
boolean |
equals(Object in)
This method check this data again the input and retuns the result as boolean. |
String |
getBase()
This method get the basic string with project_id_ type_id. |
String |
getId()
This method get the ID string with project_id_ type_id_number. |
static MCRObjectID |
getLastID(String base_id)
Returns the last ID used or reserved for the given object base type. |
int |
getNumberAsInteger()
This method get the integer with number. |
String |
getNumberAsString()
This method get the string with number. |
String |
getProjectId()
This method get the string with project_id. |
String |
getTypeId()
This method get the string with type_id. |
int |
hashCode()
returns getId().hashCode() |
boolean |
isValid()
This method return the validation value of a MCRObjectId. |
static void |
isValidOrDie(String id)
This method checks the value of a MCRObjectId. |
boolean |
setID(String id)
This method return the validation value of a MCRObjectId and store the components in this class. |
void |
setNextFreeId()
The method set the MCRObjectID from a given base ID string. |
void |
setNextFreeId(String base_id)
The method set the MCRObjectID from a given base ID string. |
void |
setNextFreeId(String base_id,
int maxInWorkflow)
|
boolean |
setNumber(int num)
This method set a new number in a existing MCRObjectID. |
boolean |
setType(String type)
This method set a new type in a existing MCRObjectID. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_LENGTH
protected static MCRConfiguration CONFIG
| Constructor Detail |
|---|
public MCRObjectID()
public MCRObjectID(String id)
throws MCRException
MCRException - if the given string is not valid.| Method Detail |
|---|
public void setNextFreeId()
throws MCRException
MCRException - if the given string is not valid or can't connect to the
MCRXMLTableManager.
public void setNextFreeId(String base_id)
throws MCRException
base_id - the basic ID
MCRException - if the given string is not valid or can't connect to the
MCRXMLTableManager.
public void setNextFreeId(String base_id,
int maxInWorkflow)
throws MCRException
MCRExceptionpublic static MCRObjectID getLastID(String base_id)
public final boolean setType(String type)
type - the new typepublic final boolean setNumber(int num)
num - the new numberpublic final String getProjectId()
public final String getTypeId()
public final String getNumberAsString()
public final int getNumberAsInteger()
public String getBase()
public String getId()
public boolean isValid()
public final boolean setID(String id)
id - the MCRObjectId
public static void isValidOrDie(String id)
id - the MCRObjectId
MCRException - if ID is not validpublic boolean equals(MCRObjectID in)
in - the MCRObjectID to check
public boolean equals(Object in)
equals in class Objectin - the MCRObjectID to check
Object.equals(Object)public String toString()
toString in class ObjectgetId(),
Object.toString()public int hashCode()
hashCode in class ObjectgetId(),
Object.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||