class JDOMetaContext implements MetaContext {

    MetaTable getTableByQualifiedName(String dataSourceName, String schemaName, String tableName) throws MetaException {
        try {
            Query query = pm.newQuery(MTable.class);
            query.setFilter("name == tableName && "
                    + "schema.name == schemaName && "
                    + "schema.dataSource.name == dataSourceName");
            query.declareParameters("String dataSourceName, String schemaName, String tableName");
            query.setUnique(true);

            MTable mTable = (MTable) query.execute(dataSourceName, schemaName, tableName);
            if (mTable == null)
                throw new MetaException("table '" + dataSourceName + "." + schemaName + "." + tableName + "' does not exist");
            return mTable;
        } catch (RuntimeException e) {
            throw new MetaException("failed to get table '" + dataSourceName + "." + schemaName + "." + tableName + "'", e);
        }
    }

    public  JDOMetaContext(PersistenceManager persistenceManager,
                          UpdateLoggerFactory updateLoggerFactory);

}