Ejemplo n.º 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;
 }
Ejemplo n.º 2
0
 /**
  * Returns TableSchema from dbSchema by table name.
  *
  * @return TableSchema
  */
 private TableSchema getTableSchema() {
   String tableName = tableDesc.name();
   return dbSchema.getTableSchema(tableName);
 }