class JDOMetaContext implements MetaContext {

    MetaSchema getSchemaByQualifiedName(String dataSourceName, String schemaName) throws MetaException {
        try {
            Query query = pm.newQuery(MSchema.class);
            query.setFilter("name == schemaName && "
                    + "dataSource.name == dataSourceName");
            query.declareParameters("String dataSourceName, String schemaName");
            query.setUnique(true);

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

    public  JDOMetaContext(PersistenceManager persistenceManager,
                          UpdateLoggerFactory updateLoggerFactory);

}