blob: 230be38b1b48185b9dadd45fd751589e662a99e1 [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 org.eclipse.persistence.tools.gen.db.Database;
/**
*
* @version 2.6
*/
@SuppressWarnings("nls")
class DB2 extends AbstractWorkbenchDriverAdapter {
DB2(Database database) {
super(database);
}
@Override
CatalogStrategy buildCatalogStrategy() {
// unverified...
// return new UnknownCatalogStrategy(this.database.getDTPDatabase());
//TODO Need to add generic UnknowCatalogStrategy support, or better yet verify what strategy is correct
throw new UnsupportedOperationException("DB2 not yet supported!");
}
@Override
FoldingStrategy buildFoldingStrategy() {
return UpperCaseFoldingStrategy.instance();
}
// ********** factory **********
static class Factory implements WorkbenchDriverAdapterFactory {
private static final String[] VENDORS = {
"DB2 UDB",
"DB2 UDB iSeries",
"DB2 UDB zSeries"
};
@Override
public String[] getSupportedVendors() {
return VENDORS;
}
@Override
public WorkbenchDriverAdapter buildAdapter(Database database) {
return new DB2(database);
}
}
}