org.qi4j.index.sql.support.api
Annotation Type SQLTypeInfo


@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 Strings, this is the max character length as specified by VARCHAR(length).
 
Optional Element Summary
 int scale
          For Strings and BigIntegers, this value is ignored.
 

Element Detail

maxLength

public abstract int maxLength
For Strings, this is the max character length as specified by VARCHAR(length). For BigIntegers and BigDecimals, this is the precision of a NUMERIC.

Returns:
Maximum length for SQL data type representing some property type.

scale

public abstract int scale
For Strings and BigIntegers, this value is ignored. For BigDecimals, this is the scale of NUMERIC, default being 50.

Returns:
The scale of SQL data type representing some property type.
Default:
50