|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface SQLTypeInfo
The annotation, which tells the parameters for SQL type. Only applyable to certain typed properties, like for now, 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.
Required Element Summary | |
---|---|
int |
maxLength
For String s, this is the max character length as specified by VARCHAR(length) . |
Optional Element Summary | |
---|---|
int |
scale
For String s and BigInteger s, this value is ignored. |
Element Detail |
---|
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
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |