Added some Javadoc to SchemaMapping

This commit is contained in:
Lukas Eder 2011-12-09 13:00:54 +00:00
parent 8509ecdcb4
commit c16ffd117f

View File

@ -38,6 +38,7 @@ package org.jooq;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.jooq.impl.SchemaImpl;
import org.jooq.impl.TableImpl;
@ -219,15 +220,20 @@ public class SchemaMapping implements Serializable {
return generatedTable;
}
/**
* Synonym for {@link #use(String)}. Added for better interoperability with
* Spring
*/
public void setDefaultSchema(String schema) {
use(schema);
}
/**
* Initialise SchemaMapping. Added for better interoperability with Spring
*/
public void setSchemaMapping(Map<String, String> schemaMap) {
for (String generatedSchemaName : schemaMap.keySet()) {
String configuredSchemaName = schemaMap.get(generatedSchemaName);
add(new SchemaImpl(generatedSchemaName),
new SchemaImpl(configuredSchemaName));
for (Entry<String, String> entry : schemaMap.entrySet()) {
add(new SchemaImpl(entry.getKey()), new SchemaImpl(entry.getValue()));
}
}