Class SimpleRow

Object
SimpleRow
All Implemented Interfaces:
StructureRow

@Internal public class SimpleRow extends Object implements StructureRow
  • Field Details

    • myRowId

      protected final long myRowId
    • myItemId

      @NotNull protected final ItemIdentity myItemId
    • mySemantics

      protected final long mySemantics
    • myResolver

      @NotNull protected final ItemResolver myResolver
  • Method Details

    • create

      @NotNull public static StructureRow create(long rowId, @NotNull ItemIdentity itemId, long semantics, @Nullable ItemResolver resolver)
    • create

      public static StructureRow create(long rowId, ItemIdentity itemId, long semantics, @Nullable ItemResolver resolver, ItemAccessMode accessMode)
    • create

      public static StructureRow create(long rowId, ItemIdentity itemId, long semantics, @Nullable ItemResolver resolver, boolean skipAccessCheck)
    • getRowId

      public long getRowId()
      Description copied from interface: StructureRow
      Returns row ID, a positive number.
      Specified by:
      getRowId in interface StructureRow
    • getItemId

      @NotNull public ItemIdentity getItemId()
      Description copied from interface: StructureRow
      Returns item ID for the item shown in this row.
      Specified by:
      getItemId in interface StructureRow
    • getSemantics

      public long getSemantics()
      Description copied from interface: StructureRow
      Returns row's semantics.
      Specified by:
      getSemantics in interface StructureRow
    • getQualifier

      protected String getQualifier()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getItem

      @Nullable public <I> I getItem(@NotNull Class<I> itemClass)
      Description copied from interface: StructureRow

      Tries to resolve the item based on its ID, that is, get an object that represents this item. Resolution includes checking the current user's access to that item, unless the row is created with an additional flag indicating that the access check should be skipped.

      This method may return null in many different cases:

      • The item does not exist.
      • The item is not accessible by the current user.
      • The instance of StructureRow was created with the ItemAccessMode.ITEM_NOT_NEEDED flag.
      • The plugin module that is responsible for this type of items is disabled or missing.
      • Item's object type is not reducible to itemClass.
      Specified by:
      getItem in interface StructureRow
      Type Parameters:
      I - type of item's objects
      Parameters:
      itemClass - expected class of the item's object
      Returns:
      the item's object, or null
    • resolve

      protected Object resolve()
    • tryMakeUnchecked

      public static StructureRow tryMakeUnchecked(StructureRow r)