Java Reference
In-Depth Information
In our example, we do not have a real use for this yet, but we will soon. We
can demonstrate how it works by providing an alias that we will use later in our
SQL Map.
To create that alias, insert an element like this:
<typeAlias alias="Account"
type="org.apache.ibatis.jgamestore.domain.Account" />
This Account alias is available any time after it is defined in the configuration
process. You can use either the fully qualified name or the alias to tell i BATIS what
you want to use any time you have to supply a data type.
The framework defines several type aliases to save developers from having to
add them manually, as shown in table 3.3.
Table 3.3 Built-in type alias definitions that save you from having to type some of these very
long class names
Alias
Type
Transaction manager aliases
JDBC
com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransactionConfig
JTA
com.ibatis.sqlmap.engine.transaction.jta.JtaTransactionConfig
EXTERNAL
com.ibatis.sqlmap.engine.transaction.external.ExternalTransactionConfig
Data types
string
java.lang.String
byte
java.lang.Byte
long
java.lang.Long
short
java.lang.Short
int
java.lang.Integer
integer
java.lang.Integer
double
java.lang.Double
float
java.lang.Float
boolean
java.lang.Boolean
date
java.util.Date
decimal
java.math.BigDecimal
object
java.lang.Object
map
java.util.Map
hashmap
java.util.HashMap
Search WWH ::




Custom Search