Skip to main content
summaryrefslogtreecommitdiffstats
blob: 1fa345a1723ec00fd3ca225f8d29ae9a6e0a5d23 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*******************************************************************************
 * Copyright (c) 2009, 2011 Oracle. All rights reserved.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0, which accompanies this distribution
 * and is available at http://www.eclipse.org/legal/epl-v10.html.
 * 
 * Contributors:
 *     Oracle - initial API and implementation
 ******************************************************************************/
package org.eclipse.jpt.jpa.db.internal.driver;

import java.util.List;
import org.eclipse.datatools.modelbase.sql.schema.Catalog;
import org.eclipse.datatools.modelbase.sql.schema.Schema;

/**
 * Adapt the variety of catalog (and schema) configurations generated by
 * DTP-supplied drivers.
 */
interface CatalogStrategy {

	/**
	 * Return whether the DTP database has "real" catalogs (i.e. catalogs that
	 * can be specified by the user).
	 */
	boolean supportsCatalogs();

	/**
	 * Return the DTP database's catalogs. This will be empty if the database
	 * does <em>not</em> support catalogs.
	 * @see #supportsCatalogs()
	 */
	List<Catalog> getCatalogs();

	/**
	 * Return the DTP database's schemas. This will be empty if the database
	 * supports catalogs.
	 * @see #supportsCatalogs()
	 */
	List<Schema> getSchemas();
}

Back to the top