2727/**
2828 * Base class for a Google BigQuery table type.
2929 */
30- public abstract class BaseTableType implements Serializable {
30+ public abstract class BaseTableDefinition implements Serializable {
3131
3232 private static final long serialVersionUID = -374760330662959529L ;
3333
@@ -36,22 +36,22 @@ public abstract class BaseTableType implements Serializable{
3636 */
3737 public enum Type {
3838 /**
39- * A normal BigQuery table. Instances of {@code BaseTableType } for this type are implemented by
40- * {@link DefaultTableType }.
39+ * A normal BigQuery table. Instances of {@code BaseTableDefinition } for this type are
40+ * implemented by {@link DefaultTableDefinition }.
4141 */
4242 TABLE ,
4343
4444 /**
45- * A virtual table defined by a SQL query. Instances of {@code BaseTableType } for this type are
46- * implemented by {@link ViewType }.
45+ * A virtual table defined by a SQL query. Instances of {@code BaseTableDefinition } for this
46+ * type are implemented by {@link ViewDefinition }.
4747 *
4848 * @see <a href="https://cloud.google.com/bigquery/querying-data#views">Views</a>
4949 */
5050 VIEW ,
5151
5252 /**
53- * A BigQuery table backed by external data. Instances of {@code BaseTableType } for this type
54- * are implemented by {@link ExternalTableType }.
53+ * A BigQuery table backed by external data. Instances of {@code BaseTableDefinition } for this
54+ * type are implemented by {@link ExternalTableDefinition }.
5555 *
5656 * @see <a href="https://cloud.google.com/bigquery/federated-data-sources">Federated Data
5757 * Sources</a>
@@ -68,7 +68,7 @@ public enum Type {
6868 * @param <T> the table type class
6969 * @param <B> the table type builder
7070 */
71- public abstract static class Builder <T extends BaseTableType , B extends Builder <T , B >> {
71+ public abstract static class Builder <T extends BaseTableDefinition , B extends Builder <T , B >> {
7272
7373 private Type type ;
7474 private Schema schema ;
@@ -77,9 +77,9 @@ public abstract static class Builder<T extends BaseTableType, B extends Builder<
7777 this .type = type ;
7878 }
7979
80- Builder (BaseTableType tableType ) {
81- this .type = tableType .type ;
82- this .schema = tableType .schema ;
80+ Builder (BaseTableDefinition tableDefinition ) {
81+ this .type = tableDefinition .type ;
82+ this .schema = tableDefinition .schema ;
8383 }
8484
8585 Builder (Table tablePb ) {
@@ -113,7 +113,7 @@ public B schema(Schema schema) {
113113 public abstract T build ();
114114 }
115115
116- BaseTableType (Builder builder ) {
116+ BaseTableDefinition (Builder builder ) {
117117 this .type = builder .type ;
118118 this .schema = builder .schema ;
119119 }
@@ -152,7 +152,7 @@ final int baseHashCode() {
152152 return Objects .hash (type );
153153 }
154154
155- final boolean baseEquals (BaseTableType jobConfiguration ) {
155+ final boolean baseEquals (BaseTableDefinition jobConfiguration ) {
156156 return Objects .equals (toPb (), jobConfiguration .toPb ());
157157 }
158158
@@ -166,14 +166,14 @@ Table toPb() {
166166 }
167167
168168 @ SuppressWarnings ("unchecked" )
169- static <T extends BaseTableType > T fromPb (Table tablePb ) {
169+ static <T extends BaseTableDefinition > T fromPb (Table tablePb ) {
170170 switch (Type .valueOf (tablePb .getType ())) {
171171 case TABLE :
172- return (T ) DefaultTableType .fromPb (tablePb );
172+ return (T ) DefaultTableDefinition .fromPb (tablePb );
173173 case VIEW :
174- return (T ) ViewType .fromPb (tablePb );
174+ return (T ) ViewDefinition .fromPb (tablePb );
175175 case EXTERNAL :
176- return (T ) ExternalTableType .fromPb (tablePb );
176+ return (T ) ExternalTableDefinition .fromPb (tablePb );
177177 default :
178178 // never reached
179179 throw new IllegalArgumentException ("Format " + tablePb .getType () + " is not supported" );
0 commit comments