Example usage for org.hibernate.hql.spi.id.local AfterUseAction DROP

List of usage examples for org.hibernate.hql.spi.id.local AfterUseAction DROP

Introduction

In this page you can find the example usage for org.hibernate.hql.spi.id.local AfterUseAction DROP.

Prototype

AfterUseAction DROP

To view the source code for org.hibernate.hql.spi.id.local AfterUseAction DROP.

Click Source Link

Usage

From source file:org.teiid.translator.jdbc.teiid.TeiidExecutionFactory.java

License:Apache License

@Override
public SQLDialect getDialect() {
    if (dialect == null) {
        //TODO: should pull in our own dialect
        this.dialect = new SQLDialect() {

            @Override/*from ww  w. j  a  v  a 2  s . c o m*/
            public String getTypeName(int code, long length, int precision, int scale) {
                return JDBCSQLTypeInfo.getJavaClassName(code);
            }

            public AbstractMultiTableBulkIdStrategyImpl getDefaultMultiTableBulkIdStrategy() {
                return new LocalTemporaryTableBulkIdStrategy(new IdTableSupportStandardImpl() {
                    @Override
                    public String getCreateIdTableCommand() {
                        return "create local temporary table";
                    }

                    @Override
                    public String getDropIdTableCommand() {
                        return "drop table";
                    }

                    @Override
                    public String getCreateIdTableStatementOptions() {
                        return "";
                    }
                }, AfterUseAction.DROP, TempTableDdlTransactionHandling.NONE);
            }
        };
    }
    return super.getDialect();
}