blob: 37f0b3328fb1cf7b4b63570e0f89036a8417981d [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2013 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Oracle - initial API and implementation
******************************************************************************/
package org.eclipse.persistence.tools.db.driver;
import java.util.ArrayList;
import org.eclipse.persistence.tools.gen.db.Database;
/**
*
* @version 2.6
*/
@SuppressWarnings("nls")
class HSQLDB extends AbstractWorkbenchDriverAdapter {
HSQLDB(Database database) {
super(database);
}
@Override
CatalogStrategy buildCatalogStrategy() {
// unverified...
// return new UnknownCatalogStrategy(this.database.getDTPDatabase());
throw new UnsupportedOperationException("HSQL not yet supported!");
}
@Override
FoldingStrategy buildFoldingStrategy() {
return UpperCaseFoldingStrategy.instance();
}
@Override
void addDefaultSchemaNamesTo(ArrayList<String> names) {
names.add(PUBLIC_SCHEMA_NAME);
}
private static final String PUBLIC_SCHEMA_NAME = "PUBLIC";
// ********** factory **********
static class Factory implements WorkbenchDriverAdapterFactory {
private static final String[] VENDORS = {
"HSQLDB"
};
@Override
public String[] getSupportedVendors() {
return VENDORS;
}
@Override
public WorkbenchDriverAdapter buildAdapter(Database database) {
return new HSQLDB(database);
}
}
}