use of org.alfresco.repo.domain.dialect.Oracle9Dialect in project alfresco-repository by Alfresco.
the class NameValidatorTest method setUp.
@Before
public void setUp() throws Exception {
validator = new NameValidator();
validationResults = new Results();
ctx = new DiffContext(new Oracle9Dialect(), validationResults, null, null);
}
use of org.alfresco.repo.domain.dialect.Oracle9Dialect in project alfresco-repository by Alfresco.
the class SchemaBootstrap method checkDialect.
/**
* Performs dialect-specific checking. This includes checking for InnoDB, dumping the dialect being used
* as well as setting any runtime, dialect-specific properties.
*/
private void checkDialect(Dialect dialect) {
Class<?> dialectClazz = dialect.getClass();
LogUtil.info(logger, MSG_DIALECT_USED, dialectClazz.getName());
// if (dialectClazz.equals(MySQLDialect.class) || dialectClazz.equals(MySQL5Dialect.class))
// {
// LogUtil.error(logger, ERR_DIALECT_SHOULD_USE, dialectClazz.getName(), MySQLInnoDBDialect.class.getName());
// throw AlfrescoRuntimeException.create(WARN_DIALECT_UNSUPPORTED, dialectClazz.getName());
// }
// else if (dialectClazz.equals(HSQLDialect.class))
// {
// LogUtil.info(logger, WARN_DIALECT_HSQL);
// }
// else if (dialectClazz.equals(DerbyDialect.class))
// {
// LogUtil.info(logger, WARN_DIALECT_DERBY);
// }
// else if (dialectClazz.equals(Oracle9iDialect.class) || dialectClazz.equals(Oracle10gDialect.class))
// {
// LogUtil.error(logger, ERR_DIALECT_SHOULD_USE, dialectClazz.getName(), Oracle9Dialect.class.getName());
// throw AlfrescoRuntimeException.create(WARN_DIALECT_UNSUPPORTED, dialectClazz.getName());
// }
// else if (dialectClazz.equals(OracleDialect.class) || dialectClazz.equals(Oracle9Dialect.class))
// {
// LogUtil.error(logger, ERR_DIALECT_SHOULD_USE, dialectClazz.getName(), Oracle9Dialect.class.getName());
// throw AlfrescoRuntimeException.create(WARN_DIALECT_UNSUPPORTED, dialectClazz.getName());
// }
int maxStringLength = SchemaBootstrap.DEFAULT_MAX_STRING_LENGTH;
int serializableType = SerializableTypeHandler.getSerializableType();
// Adjust the maximum allowable String length according to the dialect
if (dialect instanceof SQLServerDialect) {
// string_value nvarchar(1024) null,
// serializable_value image null,
maxStringLength = SchemaBootstrap.DEFAULT_MAX_STRING_LENGTH;
} else if (dialect instanceof MySQLClusterNDBDialect) {
// string_value varchar(400),
// serializable_value blob,
maxStringLength = SchemaBootstrap.DEFAULT_MAX_STRING_LENGTH_NDB;
} else if (dialect instanceof MySQLInnoDBDialect) {
// string_value text,
// serializable_value blob,
maxStringLength = Integer.MAX_VALUE;
} else if (dialect instanceof Oracle9Dialect) {
// string_value varchar2(1024 char),
// serializable_value blob,
maxStringLength = SchemaBootstrap.DEFAULT_MAX_STRING_LENGTH;
} else if (dialect instanceof PostgreSQLDialect) {
// string_value varchar(1024),
// serializable_value bytea,
maxStringLength = SchemaBootstrap.DEFAULT_MAX_STRING_LENGTH;
}
SchemaBootstrap.setMaxStringLength(maxStringLength, dialect);
SerializableTypeHandler.setSerializableType(serializableType);
// Now override the maximum string length if it was set directly
if (maximumStringLength > 0) {
SchemaBootstrap.setMaxStringLength(maximumStringLength, dialect);
}
}
use of org.alfresco.repo.domain.dialect.Oracle9Dialect in project alfresco-repository by Alfresco.
the class IndexColumnsValidatorTest method setUp.
@Before
public void setUp() throws Exception {
validator = new IndexColumnsValidator();
validationResults = new Results();
ctx = new DiffContext(new Oracle9Dialect(), validationResults, null, null);
}
Aggregations