Search in sources :

Example 1 with TableSchemaNotFoundException

use of org.onosproject.ovsdb.rfc.exception.TableSchemaNotFoundException in project onos by opennetworkinglab.

the class AbstractOvsdbTableService method getColumnSchema.

/**
 * 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;
}
Also used : TableSchemaNotFoundException(org.onosproject.ovsdb.rfc.exception.TableSchemaNotFoundException) TableSchema(org.onosproject.ovsdb.rfc.schema.TableSchema) ColumnSchema(org.onosproject.ovsdb.rfc.schema.ColumnSchema) ColumnSchemaNotFoundException(org.onosproject.ovsdb.rfc.exception.ColumnSchemaNotFoundException)

Aggregations

ColumnSchemaNotFoundException (org.onosproject.ovsdb.rfc.exception.ColumnSchemaNotFoundException)1 TableSchemaNotFoundException (org.onosproject.ovsdb.rfc.exception.TableSchemaNotFoundException)1 ColumnSchema (org.onosproject.ovsdb.rfc.schema.ColumnSchema)1 TableSchema (org.onosproject.ovsdb.rfc.schema.TableSchema)1