示例#1
0
 /**
  * Returns ColumnSchema from TableSchema by column name.
  *
  * @param columnName column name
  * @return ColumnSchema
  */
 private ColumnSchema getColumnSchema(String columnName) {
   TableSchema tableSchema = getTableSchema();
   if (tableSchema == null) {
     String message =
         TableSchemaNotFoundException.createMessage(tableDesc.name(), dbSchema.name());
     throw new TableSchemaNotFoundException(message);
   }
   ColumnSchema columnSchema = tableSchema.getColumnSchema(columnName);
   if (columnSchema == null) {
     String message = ColumnSchemaNotFoundException.createMessage(columnName, tableSchema.name());
     throw new ColumnSchemaNotFoundException(message);
   }
   return columnSchema;
 }
示例#2
0
 @Override
 public String toString() {
   TableSchema schema = (TableSchema) getTableSchema();
   String tableName = schema.name();
   return toStringHelper(this).add("tableName", tableName).add("row", row).toString();
 }
示例#3
0
 /**
  * Return TableUpdate.
  *
  * @param table the TableSchema of TableUpdates
  * @return TableUpdate
  */
 public TableUpdate tableUpdate(TableSchema table) {
   return this.result.get(table.name());
 }