Java Code Examples for org.javers.repository.sql.DialectName#ORACLE

The following examples show how to use org.javers.repository.sql.DialectName#ORACLE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DialectMapper.java    From javers with Apache License 2.0 6 votes vote down vote up
public DialectName map(Dialect hibernateDialect) {

        if (hibernateDialect instanceof SQLServerDialect) {
            return DialectName.MSSQL;
        }
        if (hibernateDialect instanceof H2Dialect){
            return DialectName.H2;
        }
        if (hibernateDialect instanceof Oracle8iDialect){
            return DialectName.ORACLE;
        }
        if (hibernateDialect instanceof PostgreSQL81Dialect){
            return DialectName.POSTGRES;
        }
        if (hibernateDialect instanceof MySQLDialect){
            return DialectName.MYSQL;
        }
        throw new JaversException(JaversExceptionCode.UNSUPPORTED_SQL_DIALECT, hibernateDialect.getClass().getSimpleName());
    }
 
Example 2
Source File: Dialects.java    From javers with Apache License 2.0 6 votes vote down vote up
static Dialect fromName(DialectName dialectName) {
    if (DialectName.H2 == dialectName) {
        return new H2(dialectName);
    }
    if (DialectName.MYSQL == dialectName) {
        return new MysqlDialect(dialectName);
    }
    if (DialectName.POSTGRES == dialectName) {
        return new PostgresDialect(dialectName);
    }
    if (DialectName.ORACLE == dialectName) {
        return new OracleDialect(dialectName);
    }
    if (DialectName.MSSQL == dialectName) {
        return new MsSqlDialect(dialectName);
    }
    throw new JaversException(JaversExceptionCode.UNSUPPORTED_SQL_DIALECT, dialectName);
}