@Retention(value=RUNTIME) @Target(value=METHOD) public @interface SQLTypeInfo
String, BigInteger, and BigDecimal.
Example of usage, where we want to limit the datatype of column storing this value in RDBMS to be 100 characters of
max length:
@SQLTypeInfo(maxLength=100) public Property<String> myStringProperty();The purpose of this class is to optimize performance for people who know for certain that they will be using SQL-Indexing in their application.
| Modifier and Type | Required Element and Description |
|---|---|
int |
maxLength
For
Strings, this is the max character length as specified by VARCHAR(length). |
| Modifier and Type | Optional Element and Description |
|---|---|
int |
scale
For
Strings and BigIntegers, this value is ignored. |
public abstract int maxLength
Strings, this is the max character length as specified by VARCHAR(length). For BigIntegers and BigDecimals,
this is the precision of a NUMERIC.public abstract int scale
Strings and BigIntegers, this value is ignored. For BigDecimals, this is the scale of NUMERIC, default being 50.