java.lang.Object | |
↳ | org.hibernate.dialect.TypeNames |
This class maps a type to names. Associations may be marked with a capacity. Calling the get() method with a type and actual size n will return the associated name with smallest capacity >= n, if available and an unmarked default type otherwise. Eg, setting
names.put(type, "TEXT" ); names.put(type, 255, "VARCHAR($l)" ); names.put(type, 65534, "LONGVARCHAR($l)" );will give you back the following:
names.get(type) // --> "TEXT" (default) names.get(type, 100) // --> "VARCHAR(100)" (100 is in [0:255]) names.get(type, 1000) // --> "LONGVARCHAR(1000)" (1000 is in [256:65534]) names.get(type, 100000) // --> "TEXT" (default)On the other hand, simply putting
names.put(type, "VARCHAR($l)" );would result in
names.get(type) // --> "VARCHAR($l)" (will cause trouble) names.get(type, 100) // --> "VARCHAR(100)" names.get(type, 10000) // --> "VARCHAR(10000)"
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
get default type name for specified type
| |||||||||||
get type name for specified type and size
| |||||||||||
set a type name for specified type key and capacity
| |||||||||||
set a default type name for specified type key
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
get default type name for specified type
typecode | the type key |
---|
MappingException |
---|
get type name for specified type and size
typecode | the type key |
---|---|
size | the SQL length |
precision | the SQL precision |
scale | the SQL scale |
MappingException |
---|
set a type name for specified type key and capacity
typecode | the type key |
---|
set a default type name for specified type key
typecode | the type key |
---|