Interface ModelObject

All Superinterfaces:
CanRender<Renderer<? extends Renderer<?>>>, HasFields, HasReference<ModelEntityReference>, ModelEntity
All Known Subinterfaces:
Baseline, BaselineCollection, Category, Document, ModelObjectBase<T,R>, Plan, Project, RichPage, TestRun, TimePoint, UpdatableBaseline, UpdatableBaselineCollection, UpdatableCategory, UpdatableDocument, UpdatableModelObject, UpdatableModelObjectBase<T,R>, UpdatablePlan, UpdatableProject, UpdatableRichPage, UpdatableTestRun, UpdatableTimePoint, UpdatableUser, UpdatableUserGroup, UpdatableWikiPage, UpdatableWorkItem, User, UserGroup, WikiPage, WorkItem

public interface ModelObject extends ModelEntity, HasFields
Since:
3.9.0
  • Method Details

    • getReference

      @NotNull ModelObjectReference getReference()
      Returns a reference including the requested and actual revisions. If you are not interested in those, consider using the much faster getReferenceToCurrent() method.
      Specified by:
      getReference in interface HasReference<ModelEntityReference>
    • getReferenceToCurrent

      @NotNull ModelObjectReference getReferenceToCurrent()
      Returns a reference without the requested and actual revisions, so it is much faster than getReference(), because it does not have to read the actual revisions.
    • getUpdatable

      @NotNull UpdatableModelObject getUpdatable(@NotNull WriteTransaction transaction)
    • history

      @NotNull IterableWithSize<? extends ModelObjectReference> history()
      Returns history of object. If object is versioned (has requested revision) then history up to this revision will be returned. The history list is sorted from the oldest (coming first) to the newest (last).
    • fields

      @NotNull Fields fields()
      Specified by:
      fields in interface HasFields
    • resolve

      void resolve()
    • forget

      void forget()
    • can

      @NotNull ModelObjectPermissions can()
      Specified by:
      can in interface ModelEntity
      Since:
      3.9.1
    • getOldApi

      @NotNull @GwtIncompatible com.polarion.platform.persistence.model.IPObject getOldApi()
    • label

      @NotNull String label()
      Returns some non empty user friendly label of the object. It does not throw exception when the object is unresolvable or user has no permission to read it, but instead just returns the id.
      Since:
      3.9.2
    • copyFieldsTo

      @NotNull CopyCommand copyFieldsTo(@NotNull UpdatableModelObject target)
      Returns:
      CopyCommand for setting and executing copy action
      Since:
      3.10.0