|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.ddl.TypeMap
public class TypeMap
| Nested Class Summary | |
|---|---|
class |
TypeMap.MappingRule
|
| Field Summary | |
|---|---|
protected static TypeMap |
mainInstance
|
| Constructor Summary | |
|---|---|
protected |
TypeMap()
populate the rules from mappingrules.properties |
| Method Summary | |
|---|---|
boolean |
addRule(TypeMap.MappingRule rule)
calls to getRulesForNative type create new database and native type entries on an as needed basis (it's called with createNew = true). |
boolean |
applyRules(SQLColumn col)
applicable rules are applied in the order in which they are found. |
static TypeMap |
getInstance()
|
protected java.util.List |
getRules(SQLColumn col)
Get the set of rules that apply for this SQLColumn. |
protected java.util.List |
getRulesForNativeType(java.lang.String database,
java.lang.String nativeType,
boolean createNew)
only create new database and native type entries when createNew is true. |
protected java.util.List |
getRulesForNativeType(TypeMap.MappingRule rule,
boolean createNew)
Get a list of rules for a native type. |
static void |
main(java.lang.String[] args)
|
boolean |
removeRule(TypeMap.MappingRule rule)
remove a mapping rule from the rules collection |
protected boolean |
satisfiesComparison(java.lang.Comparable c1,
java.lang.Comparable c2,
java.lang.String operator)
convenience method for checking if a rule criteria is satisifed |
java.lang.String |
translateDatabaseName(java.lang.String name)
change the upper case with spaces style name from SQLDatabase into a lowercase name with no spaces. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static TypeMap mainInstance
| Constructor Detail |
|---|
protected TypeMap()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public static TypeMap getInstance()
public boolean addRule(TypeMap.MappingRule rule)
rule -
public boolean removeRule(TypeMap.MappingRule rule)
rule -
protected java.util.List getRulesForNativeType(TypeMap.MappingRule rule,
boolean createNew)
protected java.util.List getRulesForNativeType(java.lang.String database,
java.lang.String nativeType,
boolean createNew)
database - nativeType - createNew -
for the method which determines which rules are in effectprotected java.util.List getRules(SQLColumn col)
col -
for the code which actually processes the rules.
protected boolean satisfiesComparison(java.lang.Comparable c1,
java.lang.Comparable c2,
java.lang.String operator)
public boolean applyRules(SQLColumn col)
col -
public java.lang.String translateDatabaseName(java.lang.String name)
name -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||