private TableDescriptor getTableDescriptor ( Table table , SchemaDescriptor schemaDescriptor , Store store ) { TableDescriptor tableDescriptor ; if ( table instanceof View ) { View view = ( View ) table ; ViewDescriptor viewDescriptor = store . create ( ViewDescriptor . class ) ; viewDescriptor . setUpdatable ( view . isUpdatable ( ) ) ; CheckOptionType checkOption = view . getCheckOption ( ) ; if ( checkOption != null ) { viewDescriptor . setCheckOption ( checkOption . name ( ) ) ; } schemaDescriptor . getViews ( ) . add ( viewDescriptor ) ; tableDescriptor = viewDescriptor ; } else { tableDescriptor = store . create ( TableDescriptor . class ) ; schemaDescriptor . getTables ( ) . add ( tableDescriptor ) ; } tableDescriptor . setName ( table . getName ( ) ) ; return tableDescriptor ; }
Create a table descriptor for the given table .