All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dk.eobjects.metamodel.IDataContextStrategy Maven / Gradle / Ivy

/**
 *  This file is part of MetaModel.
 *
 *  MetaModel is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  MetaModel is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with MetaModel.  If not, see .
 */
package dk.eobjects.metamodel;

import dk.eobjects.metamodel.data.DataSet;
import dk.eobjects.metamodel.query.Query;
import dk.eobjects.metamodel.schema.Schema;

/**
 * Defines a strategy to use for metadata and data access.
 */
public interface IDataContextStrategy {

	/**
	 * @return the name of the default schema provided by this strategy or null
	 *         if none is present or possible to deterministically tell.
	 */
	public String getDefaultSchemaName() throws MetaModelException;

	/**
	 * Executes a query.
	 * 
	 * @param query
	 * @return a dataset representing the result of the query.
	 */
	public DataSet executeQuery(Query query) throws MetaModelException;

	/**
	 * @return an array of schema names within this datastore.
	 */
	public String[] getSchemaNames() throws MetaModelException;

	/**
	 * @param name
	 * @return the schema with the specified name, or null if such a schema is
	 *         not available
	 */
	public Schema getSchemaByName(String name) throws MetaModelException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy