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 TypeMethodDescriptionbooleanContext id (if any).static IObjectIdgetContextLessObjectId(ILocalId localId) Return context-less object id for given local id.static IObjectIdgetCrossContextObjectId(IContextId contextId, ILocalId localId) Return cross-context object id for given context id and local id.Local id.static IObjectIdgetObjectIdFromPrototypeLessString(String normId, LocalId.IPrototypeResolver resolver) Return object id for given prototype-less normalized string representation.static IObjectIdgetObjectIdFromString(String normId) Return object id for given normalized string representation.final inthashCode()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 isnullIllegalArgumentException- 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 isnullIllegalArgumentException- if resolver isnullIllegalArgumentException- if given string is not prototype-less normalized string representation
-
getContextId
Description copied from interface:IObjectIdContext id (if any).- Specified by:
getContextIdin interfaceIObjectId- Returns:
- context id or
null
-
getLocalId
Description copied from interface:IObjectIdLocal id.- Specified by:
getLocalIdin interfaceIObjectId- Returns:
- local id
-
removeContextId
Description copied from interface:IObjectIdRemove context id (if any) from this object id and return new object id.- Specified by:
removeContextIdin interfaceIObjectId- Returns:
- new context-less object id
-
removeRevision
Description copied from interface:IObjectIdRemove revision (if any) from this object id's local id and return new object id.- Specified by:
removeRevisionin interfaceIObjectId- Returns:
- new object id with revision removed from its local id
-
setContextId
Description copied from interface:IObjectIdSet context id of this object id and return new object id.- Specified by:
setContextIdin interfaceIObjectId- Parameters:
contextId- context id- Returns:
- new cross-context object id
-
toNormalizedString
Description copied from interface:IObjectIdReturn normalized string representation of this object id.- Specified by:
toNormalizedStringin interfaceIObjectId- Returns:
- normalized string
-
toPrototypeLessNormalizedString
Description copied from interface:IObjectIdReturn prototype-less normalized string representation of this object id.- Specified by:
toPrototypeLessNormalizedStringin interfaceIObjectId- Returns:
- normalized string
-
equals
-
hashCode
public final int hashCode() -
toString
-
setLocalId
Description copied from interface:IObjectIdSet local id of this object id and return new object id- Specified by:
setLocalIdin interfaceIObjectId- Parameters:
localId- local id- Returns:
- new object id
-
setRevision
Description copied from interface:IObjectIdSet the revision of this object ID and return a new object ID.- Specified by:
setRevisionin interfaceIObjectId
-