Class RowManagerImpl

  • All Implemented Interfaces:
    RowManager

    public class RowManagerImpl
    extends Object
    implements RowManager
    Manages SQL rows during an insert/update/delete process.
    Author:
    Abe White
    • Constructor Detail

      • RowManagerImpl

        public RowManagerImpl​(boolean order)
        Constructor.
        Parameters:
        order - whether to keep track of the order in which rows are added
    • Method Detail

      • hasAutoAssignConstraints

        public boolean hasAutoAssignConstraints()
        Whether any primary rows have auto-assign constraints.
      • getOrdered

        public List<PrimaryRow> getOrdered()
        Return the ordered primary rows. Only available if ordering requested on construction.
      • getSecondaryUpdates

        public Collection<SecondaryRow> getSecondaryUpdates()
        Return all inserted and updated secondary rows.
      • getSecondaryDeletes

        public Collection<SecondaryRow> getSecondaryDeletes()
        Return all deleted secondary rows.
      • getAllRowUpdates

        public Collection<Row> getAllRowUpdates()
        Return any 'all row' updates.
      • getAllRowDeletes

        public Collection<Row> getAllRowDeletes()
        Return any 'all row' deletes.
      • getSecondaryRow

        public Row getSecondaryRow​(Table table,
                                   int action)
        Description copied from interface: RowManager
        Return a row for the given secondary table. The action must be one of Row.ACTION_INSERT, Row.ACTION_UPDATE, Row.ACTION_DELETE. Note that secondary rows are not considered when creating the foreign key dependency graph, with can cause constraint violations when using the UPDATE action. Only use this action if the secondary row does not have restrict-action foreign keys. Otherwise use both a delete and then an insert to perform the update.
        Specified by:
        getSecondaryRow in interface RowManager
      • flushSecondaryRow

        public void flushSecondaryRow​(Row row)
                               throws SQLException
        Description copied from interface: RowManager
        Flush the secondary row; after flushing the row is available for reuse. It will retain all previously set values.
        Specified by:
        flushSecondaryRow in interface RowManager
        Throws:
        SQLException
      • flushAllRows

        public void flushAllRows​(Row row)
        Description copied from interface: RowManager
        Flush the logical row.
        Specified by:
        flushAllRows in interface RowManager