Class ObjectId
java.lang.Object
com.polarion.subterra.base.data.identification.ObjectId
- All Implemented Interfaces:
IObjectId
,Serializable
- Author:
- Stepan Roh, Polarion Software
- See Also:
-
Field Summary
Fields inherited from interface com.polarion.subterra.base.data.identification.IObjectId
CONTEXT_DELIM, CONTEXT_DELIM_CHAR
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Context id (if any).static IObjectId
getContextLessObjectId
(ILocalId localId) Return context-less object id for given local id.static IObjectId
getCrossContextObjectId
(IContextId contextId, ILocalId localId) Return cross-context object id for given context id and local id.Local id.static IObjectId
getObjectIdFromPrototypeLessString
(String normId, LocalId.IPrototypeResolver resolver) Return object id for given prototype-less normalized string representation.static IObjectId
getObjectIdFromString
(String normId) Return object id for given normalized string representation.final int
hashCode()
Remove context id (if any) from this object id and return new object id.Remove revision (if any) from this object id's local id and return new object id.setContextId
(IContextId contextId) Set context id of this object id and return new object id.setLocalId
(ILocalId localId) Set local id of this object id and return new object idsetRevision
(String revision) Set the revision of this object ID and return a new object ID.Return normalized string representation of this object id.Return prototype-less normalized string representation of this object id.toString()
-
Method Details
-
getCrossContextObjectId
Return cross-context object id for given context id and local id.- Parameters:
contextId
- context idlocalId
- local id- Returns:
- object id
- Throws:
IllegalArgumentException
- if contextId is nullIllegalArgumentException
- if localId is null
-
getContextLessObjectId
Return context-less object id for given local id.- Parameters:
localId
- local id- Returns:
- object id
- Throws:
IllegalArgumentException
- if localId is null
-
getObjectIdFromString
Return object id for given normalized string representation.- Parameters:
normId
- normalized string representation- Returns:
- object id
- Throws:
IllegalArgumentException
- if normId isnull
IllegalArgumentException
- if given string is not normalized string representation
-
getObjectIdFromPrototypeLessString
public static IObjectId getObjectIdFromPrototypeLessString(String normId, LocalId.IPrototypeResolver resolver) Return object id for given prototype-less normalized string representation.- Parameters:
normId
- normalized string representationresolver
- prototype resolver- Returns:
- object id
- Throws:
IllegalArgumentException
- if normId isnull
IllegalArgumentException
- if resolver isnull
IllegalArgumentException
- if given string is not prototype-less normalized string representation
-
getContextId
Description copied from interface:IObjectId
Context id (if any).- Specified by:
getContextId
in interfaceIObjectId
- Returns:
- context id or
null
-
getLocalId
Description copied from interface:IObjectId
Local id.- Specified by:
getLocalId
in interfaceIObjectId
- Returns:
- local id
-
removeContextId
Description copied from interface:IObjectId
Remove context id (if any) from this object id and return new object id.- Specified by:
removeContextId
in interfaceIObjectId
- Returns:
- new context-less object id
-
removeRevision
Description copied from interface:IObjectId
Remove revision (if any) from this object id's local id and return new object id.- Specified by:
removeRevision
in interfaceIObjectId
- Returns:
- new object id with revision removed from its local id
-
setContextId
Description copied from interface:IObjectId
Set context id of this object id and return new object id.- Specified by:
setContextId
in interfaceIObjectId
- Parameters:
contextId
- context id- Returns:
- new cross-context object id
-
toNormalizedString
Description copied from interface:IObjectId
Return normalized string representation of this object id.- Specified by:
toNormalizedString
in interfaceIObjectId
- Returns:
- normalized string
-
toPrototypeLessNormalizedString
Description copied from interface:IObjectId
Return prototype-less normalized string representation of this object id.- Specified by:
toPrototypeLessNormalizedString
in interfaceIObjectId
- Returns:
- normalized string
-
equals
-
hashCode
public final int hashCode() -
toString
-
setLocalId
Description copied from interface:IObjectId
Set local id of this object id and return new object id- Specified by:
setLocalId
in interfaceIObjectId
- Parameters:
localId
- local id- Returns:
- new object id
-
setRevision
Description copied from interface:IObjectId
Set the revision of this object ID and return a new object ID.- Specified by:
setRevision
in interfaceIObjectId
-