当前位置: 首页>>代码示例>>Java>>正文


Java Oracle10gDialect类代码示例

本文整理汇总了Java中org.hibernate.dialect.Oracle10gDialect的典型用法代码示例。如果您正苦于以下问题:Java Oracle10gDialect类的具体用法?Java Oracle10gDialect怎么用?Java Oracle10gDialect使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Oracle10gDialect类属于org.hibernate.dialect包,在下文中一共展示了Oracle10gDialect类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hibernateDatabaseDialectClass

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
private static Class<?> hibernateDatabaseDialectClass(DatabasePlatform database) {
	switch (database) {
	case DB2:
		return DB2Dialect.class;
	case DB2_AS400:
		return DB2400Dialect.class;
	case DERBY:
		return DerbyTenSevenDialect.class;
	case H2:
		return H2Dialect.class;
	case HSQL:
		return HSQLDialect.class;
	case INFORMIX:
		return InformixDialect.class;
	case MYSQL:
		return MySQL5Dialect.class;
	case ORACLE:
		return Oracle10gDialect.class;
	case POSTGRESQL:
		return PostgreSQL82Dialect.class;
	case SQL_SERVER:
		return SQLServerDialect.class;
	case MARIADB:
		return MySQL5Dialect.class;
	case HANA:
		return HANARowStoreDialect.class;
	case SQLITE:
	case NONE:
	default:
		break;
	}
	return null;
}
 
开发者ID:holon-platform,项目名称:holon-datastore-jpa,代码行数:34,代码来源:EntityManagerFactoryConfigurator.java

示例2: getDialect

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
/**
 * 从DataSoure中取出connection, 根据connection的metadata中的jdbcUrl判断Dialect类型.
 * 仅支持Oracle, H2, MySql, PostgreSql, SQLServer,如需更多数据库类型,请仿照此类自行编写。
 */
public static String getDialect(DataSource dataSource) {
	String jdbcUrl = getJdbcUrlFromDataSource(dataSource);

	// 根据jdbc url判断dialect
	if (StringUtils.contains(jdbcUrl, ":h2:")) {
		return H2Dialect.class.getName();
	} else if (StringUtils.contains(jdbcUrl, ":mysql:")) {
		return MySQL5InnoDBDialect.class.getName();
	} else if (StringUtils.contains(jdbcUrl, ":oracle:")) {
		return Oracle10gDialect.class.getName();
	} else if (StringUtils.contains(jdbcUrl, ":postgresql:")) {
		return PostgreSQL82Dialect.class.getName();
	} else if (StringUtils.contains(jdbcUrl, ":sqlserver:")) {
		return SQLServer2008Dialect.class.getName();
	} else {
		throw new IllegalArgumentException("Unknown Database of " + jdbcUrl);
	}
}
 
开发者ID:summerDp,项目名称:dpCms,代码行数:23,代码来源:Hibernates.java

示例3: getHibernateDialect

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
private Class<? extends Dialect> getHibernateDialect(final PersistenceUnitContext context) {
    final ConnectionDialect dialect = context.getConnectionDialect();
    switch (dialect) {
    case MSSQLSERVER:
        return SQLServerDialect.class;
    case MYSQL:
        return MySQL5InnoDBDialect.class;
    case POSTGRESQL:
        return PostgreSQL9Dialect.class;
    case ORACLE:
        return Oracle10gDialect.class;
    case H2:
        return H2Dialect.class;
    default:
        throw UnknownArgumentException.newInstance(ConnectionDialect.class, dialect);
    }
}
 
开发者ID:subes,项目名称:invesdwin-context-persistence,代码行数:18,代码来源:HibernateDialectSpecificDelegate.java

示例4: testGetDialect

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
@Test
public void testGetDialect() throws SQLException {
	DataSource mockDataSource = mock(DataSource.class);
	Connection mockConnection = mock(Connection.class);
	DatabaseMetaData mockMetaData = mock(DatabaseMetaData.class);

	when(mockDataSource.getConnection()).thenReturn(mockConnection);
	when(mockConnection.getMetaData()).thenReturn(mockMetaData);

	when(mockMetaData.getURL()).thenReturn("jdbc:h2:file:~/test;AUTO_SERVER=TRUE");
	String dialect = Hibernates.getDialect(mockDataSource);
	assertThat(dialect).isEqualTo(H2Dialect.class.getName());

	when(mockMetaData.getURL()).thenReturn("jdbc:mysql://localhost:3306/test");
	dialect = Hibernates.getDialect(mockDataSource);
	assertThat(dialect).isEqualTo(MySQL5InnoDBDialect.class.getName());

	when(mockMetaData.getURL()).thenReturn("jdbc:oracle:thin:@127.0.0.1:1521:XE");
	dialect = Hibernates.getDialect(mockDataSource);
	assertThat(dialect).isEqualTo(Oracle10gDialect.class.getName());
}
 
开发者ID:pengqiuyuan,项目名称:g2,代码行数:22,代码来源:HibernatesTest.java

示例5: getDialect

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
/**
 * 从DataSoure中取出connection, 根据connection的metadata中的jdbcUrl判断Dialect类型.
 * 仅支持Oracle, H2, MySql, PostgreSql, SQLServer,如需更多数据库类型,请仿照此类自行编写。
 */
public static String getDialect(DataSource dataSource) {
    String jdbcUrl = getJdbcUrlFromDataSource(dataSource);

    // 根据jdbc url判断dialect
    if (StringUtils.contains(jdbcUrl, ":h2:")) {
        return H2Dialect.class.getName();
    } else if (StringUtils.contains(jdbcUrl, ":mysql:")) {
        return MySQL5InnoDBDialect.class.getName();
    } else if (StringUtils.contains(jdbcUrl, ":oracle:")) {
        return Oracle10gDialect.class.getName();
    } else if (StringUtils.contains(jdbcUrl, ":postgresql:")) {
        return PostgreSQL82Dialect.class.getName();
    } else if (StringUtils.contains(jdbcUrl, ":sqlserver:")) {
        return SQLServer2008Dialect.class.getName();
    } else {
        throw new IllegalArgumentException("Unknown Database of " + jdbcUrl);
    }
}
 
开发者ID:shawn-gogh,项目名称:myjavacode,代码行数:23,代码来源:Hibernates.java

示例6: testGetDialect

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
@Test
public void testGetDialect() throws SQLException {
	DataSource mockDataSource = Mockito.mock(DataSource.class);
	Connection mockConnection = Mockito.mock(Connection.class);
	DatabaseMetaData mockMetaData = Mockito.mock(DatabaseMetaData.class);

	Mockito.when(mockDataSource.getConnection()).thenReturn(mockConnection);
	Mockito.when(mockConnection.getMetaData()).thenReturn(mockMetaData);

	Mockito.when(mockMetaData.getURL()).thenReturn("jdbc:h2:file:~/test;AUTO_SERVER=TRUE");
	String dialect = Hibernates.getDialect(mockDataSource);
	assertEquals(H2Dialect.class.getName(), dialect);

	Mockito.when(mockMetaData.getURL()).thenReturn("jdbc:mysql://localhost:3306/test");
	dialect = Hibernates.getDialect(mockDataSource);
	assertEquals(MySQL5InnoDBDialect.class.getName(), dialect);

	Mockito.when(mockMetaData.getURL()).thenReturn("jdbc:oracle:thin:@127.0.0.1:1521:XE");
	dialect = Hibernates.getDialect(mockDataSource);
	assertEquals(Oracle10gDialect.class.getName(), dialect);
}
 
开发者ID:Michaelleolee,项目名称:appengine,代码行数:22,代码来源:HibernatesTest.java

示例7: setUp

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
@Before
public void setUp() throws Exception
{
    validator = new IndexColumnsValidator();
    validationResults = new Results();
    ctx = new DiffContext(new Oracle10gDialect(), validationResults, null, null);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:IndexColumnsValidatorTest.java

示例8: setUp

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
@Before
public void setUp() throws Exception
{
    validator = new NameValidator();
    validationResults = new Results();
    ctx = new DiffContext(new Oracle10gDialect(), validationResults, null, null);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:NameValidatorTest.java

示例9: dialectAdapter

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
/**
 * Adapt "default.sql" to every supported database
 */
public static String dialectAdapter(InputStream is, String dialect) {
	StringBuilder sb = new StringBuilder();
	BufferedReader br = null;
	String line;

	try {
		br = new BufferedReader(new InputStreamReader(is));

		if (Oracle10gDialect.class.getCanonicalName().equals(dialect)) {
			log.info("Generation SQL for Oracle10gDialect...");

			while ((line = br.readLine()) != null) {
				sb.append(oracleAdapter(line)).append("\n");
			}
		} else if (SQLServerDialect.class.getCanonicalName().equals(dialect)) {
			log.info("Generation SQL for SQLServerDialect...");

			while ((line = br.readLine()) != null) {
				sb.append(sqlServerAdapter(line)).append("\n");
			}
		} else {
			log.info("Generation SQL for GeneralDialect...");

			while ((line = br.readLine()) != null) {
				sb.append(line).append("\n");
			}
		}
	} catch (IOException e) {
		e.printStackTrace();
	} finally {
		IOUtils.closeQuietly(br);
		IOUtils.closeQuietly(is);
	}

	return sb.toString().trim();
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:40,代码来源:DatabaseDialectAdapter.java

示例10: initApplicationContext

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
@Test
public void initApplicationContext() throws Exception {
    assertNotNull(repositoryService);

    assertNotNull(sessionFactory);

    createSQLSchema("./target/h2-schema.sql", H2Dialect.class.getName());
    createSQLSchema("./target/sqlserver-schema.sql", UnicodeSQLServer2008Dialect.class.getName());
    createSQLSchema("./target/mysql-schema.sql", MidPointMySQLDialect.class.getName());
    createSQLSchema("./target/oracle-schema.sql", Oracle10gDialect.class.getName());
    createSQLSchema("./target/postgresql-schema.sql", MidPointPostgreSQLDialect.class.getName());
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:13,代码来源:SpringApplicationContextTest.java

示例11: HibernateDatabaseConfigurationFactory

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
public HibernateDatabaseConfigurationFactory() {
    builtInConfigurations = new HashMap<String, DatabaseConfiguration>();
    builtInConfigurations.put(SQLServerDialect.class.getName(),
            new MSSQLServerDatabaseConfiguration());
    builtInConfigurations.put(Oracle10gDialect.class.getName(),
            new OracleDatabaseConfiguration());
    builtInConfigurations.put(PostgreSQLDialect.class.getName(),
            new PostgreSQLDatabaseConfiguration());
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:10,代码来源:HibernateDatabaseConfigurationFactory.java

示例12: setUp

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
	entityManagerFactory = Persistence.createEntityManagerFactory("sequence");
	conventions = DDLConventions.create(entityManagerFactory, new Oracle10gDialect() {

		@Override
		public String getQuerySequencesString() {
			return null;
		}

	});
}
 
开发者ID:andreluiznsilva,项目名称:hibernate-conventions,代码行数:13,代码来源:DDLConventionsForOracle10DialectIT.java

示例13: getDialect

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
/**
 * 从DataSoure中取出connection, 根据connection的metadata中的jdbcUrl判断Dialect类型.
 * 仅支持Oracle, H2, MySql,如需更多数据库类型,请仿照此类自行编写。
 */
public static String getDialect(DataSource dataSource) {
    String jdbcUrl = getJdbcUrlFromDataSource(dataSource);

    // 根据jdbc url判断dialect
    if (StringUtils.contains(jdbcUrl, ":h2:")) {
        return H2Dialect.class.getName();
    } else if (StringUtils.contains(jdbcUrl, ":mysql:")) {
        return MySQL5InnoDBDialect.class.getName();
    } else if (StringUtils.contains(jdbcUrl, ":oracle:")) {
        return Oracle10gDialect.class.getName();
    } else {
        throw new IllegalArgumentException("Unknown Database of " + jdbcUrl);
    }
}
 
开发者ID:GlacierSoft,项目名称:netloan-project,代码行数:19,代码来源:Hibernates.java

示例14: getDialect

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
/**
 * 从DataSoure中取出connection, 根据connection的metadata中的jdbcUrl判断Dialect类型.
 * 仅支持Oracle, H2, MySql,如需更多数据库类型,请仿照此类自行编写。
 */
public static String getDialect(DataSource dataSource) {
	String jdbcUrl = getJdbcUrlFromDataSource(dataSource);

	// 根据jdbc url判断dialect
	if (StringUtils.contains(jdbcUrl, ":h2:")) {
		return H2Dialect.class.getName();
	} else if (StringUtils.contains(jdbcUrl, ":mysql:")) {
		return MySQL5InnoDBDialect.class.getName();
	} else if (StringUtils.contains(jdbcUrl, ":oracle:")) {
		return Oracle10gDialect.class.getName();
	} else {
		throw new IllegalArgumentException("Unknown Database of " + jdbcUrl);
	}
}
 
开发者ID:Michaelleolee,项目名称:appengine,代码行数:19,代码来源:Hibernates.java

示例15: addDialects

import org.hibernate.dialect.Oracle10gDialect; //导入依赖的package包/类
private void addDialects(StrategySelectorImpl strategySelector) {
	addDialect( strategySelector, Cache71Dialect.class );
	addDialect( strategySelector, CUBRIDDialect.class );
	addDialect( strategySelector, DB2Dialect.class );
	addDialect( strategySelector, DB2390Dialect.class );
	addDialect( strategySelector, DB2400Dialect.class );
	addDialect( strategySelector, DerbyTenFiveDialect.class );
	addDialect( strategySelector, DerbyTenSixDialect.class );
	addDialect( strategySelector, DerbyTenSevenDialect.class );
	addDialect( strategySelector, FirebirdDialect.class );
	addDialect( strategySelector, FrontBaseDialect.class );
	addDialect( strategySelector, H2Dialect.class );
	addDialect( strategySelector, HSQLDialect.class );
	addDialect( strategySelector, InformixDialect.class );
	addDialect( strategySelector, IngresDialect.class );
	addDialect( strategySelector, Ingres9Dialect.class );
	addDialect( strategySelector, Ingres10Dialect.class );
	addDialect( strategySelector, InterbaseDialect.class );
	addDialect( strategySelector, JDataStoreDialect.class );
	addDialect( strategySelector, MckoiDialect.class );
	addDialect( strategySelector, MimerSQLDialect.class );
	addDialect( strategySelector, MySQL5Dialect.class );
	addDialect( strategySelector, MySQL5InnoDBDialect.class );
	addDialect( strategySelector, MySQL5Dialect.class );
	addDialect( strategySelector, MySQL5InnoDBDialect.class );
	addDialect( strategySelector, Oracle8iDialect.class );
	addDialect( strategySelector, Oracle9iDialect.class );
	addDialect( strategySelector, Oracle10gDialect.class );
	addDialect( strategySelector, PointbaseDialect.class );
	addDialect( strategySelector, PostgresPlusDialect.class );
	addDialect( strategySelector, PostgreSQL81Dialect.class );
	addDialect( strategySelector, PostgreSQL82Dialect.class );
	addDialect( strategySelector, PostgreSQL9Dialect.class );
	addDialect( strategySelector, ProgressDialect.class );
	addDialect( strategySelector, SAPDBDialect.class );
	addDialect( strategySelector, SQLServerDialect.class );
	addDialect( strategySelector, SQLServer2005Dialect.class );
	addDialect( strategySelector, SQLServer2008Dialect.class );
	addDialect( strategySelector, Sybase11Dialect.class );
	addDialect( strategySelector, SybaseAnywhereDialect.class );
	addDialect( strategySelector, SybaseASE15Dialect.class );
	addDialect( strategySelector, SybaseASE157Dialect.class );
	addDialect( strategySelector, TeradataDialect.class );
	addDialect( strategySelector, TimesTenDialect.class );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:46,代码来源:StrategySelectorBuilder.java


注:本文中的org.hibernate.dialect.Oracle10gDialect类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。