Class ColumnType

  • All Implemented Interfaces:
    java.io.Serializable

    @DefaultCoder(org.apache.beam.sdk.coders.AvroCoder.class)
    public class ColumnType
    extends java.lang.Object
    implements java.io.Serializable
    Defines 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
      boolean equals​(java.lang.Object o)  
      java.lang.String getName()
      The name of the column.
      long getOrdinalPosition()
      The position of the column in the table.
      TypeCode getType()
      The type of the column.
      int hashCode()  
      boolean isPrimaryKey()
      True if the column is part of the primary key, false otherwise.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object