net.sourceforge.squirrel_sql.fw.dialects.TeiidDialectExt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fw Show documentation
Show all versions of fw Show documentation
The framework library contains utility classes that are generic and useful for building applications
that introspect a database via JDBC. These are not intended to be SQuirreLSQL-specific and could be
used by other projects JDBC front-end applications. This project is guaranteed to have no code
dependencies on other SQuirreLSQL projects and could therefore be used when building a different
JDBC front-end application.
/*
* Copyright (C) 2011 Rob Manning
* [email protected]
*
* This library is free software;you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library;if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package net.sourceforge.squirrel_sql.fw.dialects;
import java.sql.Types;
import org.hibernate.HibernateException;
/**
* An extension to the standard Hibernate TeiidDialect dialect
*
* @author manningr
*/
public class TeiidDialectExt extends CommonHibernateDialect
{
private class TeiidDialectHelper extends TeiidDialect
{
public TeiidDialectHelper()
{
super();
registerColumnType(Types.BIT, "boolean");
registerColumnType(Types.BIGINT, "long");
registerColumnType(Types.BLOB, "blob");
registerColumnType(Types.CHAR, "char");
registerColumnType(Types.CLOB, "clob");
registerColumnType(Types.DATE, "date");
registerColumnType(Types.DOUBLE, "double");
registerColumnType(Types.FLOAT, "float");
registerColumnType(Types.INTEGER, "integer");
registerColumnType(Types.JAVA_OBJECT, "object");
registerColumnType(Types.NUMERIC, "bigdecimal");
registerColumnType(Types.REAL, "float");
registerColumnType(Types.SMALLINT, "short");
registerColumnType(Types.TIME, "time");
registerColumnType(Types.TIMESTAMP, "timestamp");
registerColumnType(Types.TINYINT, "byte");
registerColumnType(Types.VARBINARY, "blob");
registerColumnType(Types.VARCHAR, "string");
}
}
/** extended hibernate dialect used in this wrapper */
private TeiidDialectHelper _dialect = new TeiidDialectHelper();
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#getTypeName(int, int, int, int)
*/
@Override
public String getTypeName(int code, int length, int precision, int scale) throws HibernateException
{
return _dialect.getTypeName(code, length, precision, scale);
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAccessMethods()
*/
@Override
public boolean supportsAccessMethods()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAddColumn()
*/
@Override
public boolean supportsAddColumn()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAddForeignKeyConstraint()
*/
@Override
public boolean supportsAddForeignKeyConstraint()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAddUniqueConstraint()
*/
@Override
public boolean supportsAddUniqueConstraint()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAlterColumnDefault()
*/
@Override
public boolean supportsAlterColumnDefault()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAlterColumnNull()
*/
@Override
public boolean supportsAlterColumnNull()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAlterColumnType()
*/
@Override
public boolean supportsAlterColumnType()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAlterSequence()
*/
@Override
public boolean supportsAlterSequence()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAutoIncrement()
*/
@Override
public boolean supportsAutoIncrement()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsCheckOptionsForViews()
*/
@Override
public boolean supportsCheckOptionsForViews()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsColumnComment()
*/
@Override
public boolean supportsColumnComment()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsCorrelatedSubQuery()
*/
@Override
public boolean supportsCorrelatedSubQuery()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsCreateIndex()
*/
@Override
public boolean supportsCreateIndex()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsCreateSequence()
*/
@Override
public boolean supportsCreateSequence()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsCreateTable()
*/
@Override
public boolean supportsCreateTable()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsCreateView()
*/
@Override
public boolean supportsCreateView()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsDropColumn()
*/
@Override
public boolean supportsDropColumn()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsDropConstraint()
*/
@Override
public boolean supportsDropConstraint()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsDropIndex()
*/
@Override
public boolean supportsDropIndex()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsDropSequence()
*/
@Override
public boolean supportsDropSequence()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsDropView()
*/
@Override
public boolean supportsDropView()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsEmptyTables()
*/
@Override
public boolean supportsEmptyTables()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsIndexes()
*/
@Override
public boolean supportsIndexes()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsInsertInto()
*/
@Override
public boolean supportsInsertInto()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsMultipleRowInserts()
*/
@Override
public boolean supportsMultipleRowInserts()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsProduct(java.lang.String, java.lang.String)
*/
@Override
public boolean supportsProduct(String databaseProductName, String databaseProductVersion)
{
return databaseProductName.toLowerCase().startsWith("teiid");
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsRenameColumn()
*/
@Override
public boolean supportsRenameColumn()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsRenameTable()
*/
@Override
public boolean supportsRenameTable()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsRenameView()
*/
@Override
public boolean supportsRenameView()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsSchemasInTableDefinition()
*/
@Override
public boolean supportsSchemasInTableDefinition()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsSequence()
*/
@Override
public boolean supportsSequence()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsSequenceInformation()
*/
@Override
public boolean supportsSequenceInformation()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsTablespace()
*/
@Override
public boolean supportsTablespace()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsUpdate()
*/
@Override
public boolean supportsUpdate()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsViewDefinition()
*/
@Override
public boolean supportsViewDefinition()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsSubSecondTimestamps()
*/
@Override
public boolean supportsSubSecondTimestamps()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsAddPrimaryKey()
*/
@Override
public boolean supportsAddPrimaryKey()
{
return false;
}
/**
* @see net.sourceforge.squirrel_sql.fw.dialects.CommonHibernateDialect#supportsDropPrimaryKey()
*/
@Override
public boolean supportsDropPrimaryKey()
{
return false;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy