org.apache.poi.hslf.record

## Class PositionDependentRecordContainer

- java.lang.Object
- - org.apache.poi.hslf.record.Record
  - - org.apache.poi.hslf.record.RecordContainer
    - - org.apache.poi.hslf.record.PositionDependentRecordContainer

- All Implemented Interfaces:
    GenericRecord, PositionDependentRecord
  Direct Known Subclasses:
    BinaryTagDataBlob, Document, DummyPositionSensitiveRecordWithChildren, Environment, SheetContainer

      public abstract class PositionDependentRecordContainer
      extends RecordContainer
      implements PositionDependentRecord

  A special (and dangerous) kind of Record Container, for which other Atoms care about where this one lives on disk. Will track its position on disk.

- - ### Field Summary

    - ### Fields inherited from class org.apache.poi.hslf.record.RecordContainer

      `_children`

    - ### Fields inherited from class org.apache.poi.hslf.record.Record

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PositionDependentRecordContainer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getLastOnDiskOffset()` Fetch our location on the disk, as of the last write out
    `int` | `getSheetId()` Fetch our sheet ID, as found from a PersistPtrHolder.
    `void` | `setLastOnDiskOffset(int offset)` Update the Record's idea of where on disk it lives, after a write out.
    `void` | `setSheetId(int id)` Set our sheet ID, as found from a PersistPtrHolder
    `void` | `updateOtherRecordReferences(java.util.Map<java.lang.Integer,java.lang.Integer> oldToNewReferencesLookup)` Since we're a container, we don't mind if other records move about.

    - ### Methods inherited from class org.apache.poi.hslf.record.RecordContainer

      `addChildAfter, addChildBefore, appendChildRecord, findFirstOfType, getChildRecords, getGenericProperties, handleParentAwareRecords, isAnAtom, moveChildBefore, moveChildrenAfter, moveChildrenBefore, removeChild, setChildRecord, writeOut`

    - ### Methods inherited from class org.apache.poi.hslf.record.Record

      `buildRecordAtOffset, createRecordForType, findChildRecords, getGenericChildren, getGenericRecordType, getRecordType, writeLittleEndian, writeLittleEndian, writeOut`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PositionDependentRecordContainer

          public PositionDependentRecordContainer()

  - ### Method Detail

    - #### getSheetId

          public int getSheetId()

      Fetch our sheet ID, as found from a PersistPtrHolder. Should match the RefId of our matching SlidePersistAtom

    - #### setSheetId

          public void setSheetId(int id)

      Set our sheet ID, as found from a PersistPtrHolder

    - #### getLastOnDiskOffset

          public int getLastOnDiskOffset()

      Fetch our location on the disk, as of the last write out
      Specified by:
        `getLastOnDiskOffset` in interface `PositionDependentRecord`

    - #### setLastOnDiskOffset

          public void setLastOnDiskOffset(int offset)

      Update the Record's idea of where on disk it lives, after a write out. Use with care...
      Specified by:
        `setLastOnDiskOffset` in interface `PositionDependentRecord`

    - #### updateOtherRecordReferences

          public void updateOtherRecordReferences(java.util.Map<java.lang.Integer,java.lang.Integer> oldToNewReferencesLookup)

      Since we're a container, we don't mind if other records move about. If we're told they have, just return straight off.
      Specified by:
        `updateOtherRecordReferences` in interface `PositionDependentRecord`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.