@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
String s, this is the max character length as specified by VARCHAR(length) . |
Modifier and Type | Optional Element and Description |
---|---|
int |
scale
For
String s and BigInteger s, this value is ignored. |
public abstract int maxLength
String
s, this is the max character length as specified by VARCHAR(length)
. For BigInteger
s and BigDecimal
s,
this is the precision of a NUMERIC
.public abstract int scale
String
s and BigInteger
s, this value is ignored. For BigDecimal
s, this is the scale of NUMERIC
, default being 50
.