Class ModelObjectReferenceBase<T extends ModelObjectBase<T,R>,R extends ModelObjectReferenceBase<T,R>>
java.lang.Object
com.polarion.alm.shared.api.model.ModelEntityReferenceBase<T,R>
com.polarion.alm.shared.api.model.ModelObjectReferenceBase<T,R>
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable,ModelEntityReference,ModelObjectReference,Serializable
- Direct Known Subclasses:
BaselineReference,ModelObjectReferenceWithUpdatable
public abstract class ModelObjectReferenceBase<T extends ModelObjectBase<T,R>,R extends ModelObjectReferenceBase<T,R>>
extends ModelEntityReferenceBase<T,R>
implements ModelObjectReference
Generic implementation of
ModelObjectReference interface. Should be used only in rare cases of generic code where unchecked cast would be otherwise needed.- Since:
- 3.9.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal StringReturns the revision from which the object was actually read even when theModelObjectReference.requestedRevision()was null.booleanget(ReadOnlyTransaction transaction) Returns the entity referenced by this reference.Returns the reference to current revision of the object, in other words reference without requested revision and actual revision.final TgetCurrent(ReadOnlyTransaction transaction) Returns the current object ignoring bothModelObjectReference.requestedRevision()andModelObjectReference.actualRevision().abstract TgetFromRevision(ReadOnlyTransaction transaction, String requestedRevision) final TgetOriginal(ReadOnlyTransaction transaction) Returns the object fromModelObjectReference.requestedRevision()orModelObjectReference.actualRevision()if either of them is not null (checked in this order), otherwise returns the current object same as by callingModelObjectReference.getCurrent(ReadOnlyTransaction).abstract RgetWithRevision(String requestedRevision) Returns the reference to the same object, but with differentModelObjectReference.requestedRevision(), theModelObjectReference.actualRevision()of the returned reference is null.inthashCode()It is shortcut forModelObjectReference.scope().Scope.projectId()final Stringfinal StringtoString()Methods inherited from interface com.polarion.alm.shared.api.model.ModelObjectReference
prototype, scope, toPath
-
Method Details
-
actualRevision
Description copied from interface:ModelObjectReferenceReturns the revision from which the object was actually read even when theModelObjectReference.requestedRevision()was null. This value does not have impact inObject.hashCode()andObject.equals(Object)methods.
Never returns empty string or string containing only white space characters.- Specified by:
actualRevisionin interfaceModelObjectReference
-
requestedRevision
- Specified by:
requestedRevisionin interfaceModelObjectReference- Returns:
- revision which was requested by user. Never returns empty string or string containing only white space characters.
-
getWithRevision
Description copied from interface:ModelObjectReferenceReturns the reference to the same object, but with differentModelObjectReference.requestedRevision(), theModelObjectReference.actualRevision()of the returned reference is null.- Specified by:
getWithRevisionin interfaceModelObjectReference- See Also:
-
getCurrent
Description copied from interface:ModelObjectReferenceReturns the reference to current revision of the object, in other words reference without requested revision and actual revision. It is shortcut for callingModelObjectReference.getWithRevision(String)with null- Specified by:
getCurrentin interfaceModelObjectReference
-
hashCode
public int hashCode() -
equals
-
toString
- Overrides:
toStringin classModelEntityReferenceBase<T extends ModelObjectBase<T,R>, R extends ModelObjectReferenceBase<T, R>>
-
projectId
Description copied from interface:ModelObjectReferenceIt is shortcut forModelObjectReference.scope().Scope.projectId()- Specified by:
projectIdin interfaceModelObjectReference