Package org.apache.gravitino.rel
Class TableChange.UpdateColumnPosition
java.lang.Object
org.apache.gravitino.rel.TableChange.UpdateColumnPosition
- All Implemented Interfaces:
TableChange
,TableChange.ColumnChange
- Enclosing interface:
- TableChange
public static final class TableChange.UpdateColumnPosition
extends Object
implements TableChange.ColumnChange
A TableChange to update the position of a field.
The field names are used to find the field to update.
If the field does not exist, the change must result in an IllegalArgumentException
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.gravitino.rel.TableChange
TableChange.AddColumn, TableChange.AddIndex, TableChange.After, TableChange.ColumnChange, TableChange.ColumnPosition, TableChange.Default, TableChange.DeleteColumn, TableChange.DeleteIndex, TableChange.First, TableChange.RemoveProperty, TableChange.RenameColumn, TableChange.RenameTable, TableChange.SetProperty, TableChange.UpdateColumnAutoIncrement, TableChange.UpdateColumnComment, TableChange.UpdateColumnDefaultValue, TableChange.UpdateColumnNullability, TableChange.UpdateColumnPosition, TableChange.UpdateColumnType, TableChange.UpdateComment
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this UpdateColumnPosition instance with another object for equality.String[]
Retrieves the field name of the column to be modified.String[]
Retrieves the field name of the column whose position is being updated.Retrieves the new position for the column.int
hashCode()
Generates a hash code for this UpdateColumnPosition instance.
-
Method Details
-
getFieldName
Retrieves the field name of the column whose position is being updated.- Returns:
- An array of strings representing the field name.
-
getPosition
Retrieves the new position for the column.- Returns:
- The new position of the column.
-
equals
Compares this UpdateColumnPosition instance with another object for equality. The comparison is based on the field name array and the new position. -
hashCode
public int hashCode()Generates a hash code for this UpdateColumnPosition instance. The hash code is based on both the hierarchical field name and the new position. -
fieldName
Description copied from interface:TableChange.ColumnChange
Retrieves the field name of the column to be modified.- Specified by:
fieldName
in interfaceTableChange.ColumnChange
- Returns:
- An array of strings representing the field name.
-