use of com.querydsl.sql.SchemaAndTable in project querydsl by querydsl.
the class RenameMappingTest method schemaTableToSchemaTable.
@Test
public void schemaTableToSchemaTable() {
mapping.setFromSchema("ABC");
mapping.setFromTable("TABLE1");
mapping.setToSchema("ABC");
mapping.setToTable("TABLE2");
mapping.apply(configuration);
assertEquals(new SchemaAndTable("ABC", "TABLE2"), configuration.getOverride(new SchemaAndTable("ABC", "TABLE1")));
assertEquals(new SchemaAndTable("DEF", "TABLE1"), configuration.getOverride(new SchemaAndTable("DEF", "TABLE1")));
}
use of com.querydsl.sql.SchemaAndTable in project querydsl by querydsl.
the class RenameMappingTest method schemaToSchema.
// to schema
@Test
public void schemaToSchema() {
mapping.setFromSchema("ABC");
mapping.setToSchema("DEF");
mapping.apply(configuration);
assertEquals(new SchemaAndTable("DEF", "TABLE"), configuration.getOverride(new SchemaAndTable("ABC", "TABLE")));
assertEquals(new SchemaAndTable("ABCD", "TABLE"), configuration.getOverride(new SchemaAndTable("ABCD", "TABLE")));
}
use of com.querydsl.sql.SchemaAndTable in project querydsl by querydsl.
the class RenameMappingTest method schemaTableToTable.
@Test
public void schemaTableToTable() {
mapping.setFromSchema("ABC");
mapping.setFromTable("TABLE1");
mapping.setToTable("TABLE2");
mapping.apply(configuration);
assertEquals(new SchemaAndTable("ABC", "TABLE2"), configuration.getOverride(new SchemaAndTable("ABC", "TABLE1")));
assertEquals(new SchemaAndTable("DEF", "TABLE1"), configuration.getOverride(new SchemaAndTable("DEF", "TABLE1")));
}
use of com.querydsl.sql.SchemaAndTable in project querydsl by querydsl.
the class RenameMappingTest method tableToTable.
// to table
@Test
public void tableToTable() {
mapping.setFromTable("TABLE1");
mapping.setToTable("TABLE2");
mapping.apply(configuration);
assertEquals(new SchemaAndTable("DEF", "TABLE2"), configuration.getOverride(new SchemaAndTable("DEF", "TABLE1")));
assertEquals(new SchemaAndTable("DEF", "TABLE3"), configuration.getOverride(new SchemaAndTable("DEF", "TABLE3")));
}
use of com.querydsl.sql.SchemaAndTable in project querydsl by querydsl.
the class KeyDataFactory method createType.
private Type createType(@Nullable String schemaName, String table) {
SchemaAndTable schemaAndTable = new SchemaAndTable(schemaName, table);
String packageName = this.packageName;
if (schemaToPackage) {
packageName = namingStrategy.getPackage(packageName, schemaAndTable);
}
String simpleName = prefix + namingStrategy.getClassName(schemaAndTable) + suffix;
return new SimpleType(packageName + "." + simpleName, packageName, simpleName);
}
Aggregations