Class StateComparisonVersionStrategy.CustomUpdate

  • All Implemented Interfaces:
    java.lang.Cloneable, Row, RowManager
    Enclosing class:
    StateComparisonVersionStrategy

    public static class StateComparisonVersionStrategy.CustomUpdate
    extends RowImpl
    implements RowManager
    Row implementation we use to pass to versionable mappings so they can set up the where conditions we need to add to update statements.
    Author:
    Abe White
    • Method Detail

      • getSQL

        public java.lang.String getSQL​(DBDictionary dict)
        Return a boolean SQL expression that should be added to the WHERE clause of an UPDATE to test whether the current database record matches our stored version.
        Overrides:
        getSQL in class RowImpl
      • hasAutoAssignConstraints

        public boolean hasAutoAssignConstraints()
      • getInserts

        public java.util.Collection getInserts()
      • getUpdates

        public java.util.Collection getUpdates()
      • getDeletes

        public java.util.Collection getDeletes()
      • getSecondaryUpdates

        public java.util.Collection getSecondaryUpdates()
      • getSecondaryDeletes

        public java.util.Collection getSecondaryDeletes()
      • getAllRowUpdates

        public java.util.Collection getAllRowUpdates()
      • getAllRowDeletes

        public java.util.Collection getAllRowDeletes()
      • 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)
        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
      • flushAllRows

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

        public void setObject​(Column col,
                              java.lang.Object val)
                       throws java.sql.SQLException
        Description copied from interface: Row
        Set the value of the given column in this row.
        Specified by:
        setObject in interface Row
        Overrides:
        setObject in class RowImpl
        Parameters:
        col - the column being set
        val - the value for the column
        Throws:
        java.sql.SQLException