Class ColumnType
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.changestreams.model.ColumnType
-
- All Implemented Interfaces:
java.io.Serializable
@DefaultCoder(org.apache.beam.sdk.extensions.avro.coders.AvroCoder.class) public class ColumnType extends java.lang.Object implements java.io.SerializableDefines a column type from a Cloud Spanner table with the following information: column name, column type, flag indicating if column is primary key and column position in the table.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ColumnType(java.lang.String name, TypeCode type, boolean isPrimaryKey, long ordinalPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetName()The name of the column.longgetOrdinalPosition()The position of the column in the table.TypeCodegetType()The type of the column.inthashCode()booleanisPrimaryKey()True if the column is part of the primary key, false otherwise.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ColumnType
@SchemaCreate public ColumnType(java.lang.String name, TypeCode type, boolean isPrimaryKey, long ordinalPosition)
-
-
Method Detail
-
getName
public java.lang.String getName()
The name of the column.
-
getType
public TypeCode getType()
The type of the column.
-
isPrimaryKey
public boolean isPrimaryKey()
True if the column is part of the primary key, false otherwise.
-
getOrdinalPosition
public long getOrdinalPosition()
The position of the column in the table.
-
equals
public boolean equals(@Nullable java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-