resultType 문법

반응형

resultType

 


문법 예시

<select id="getUser" resultType="string">
쿼리 내용...
</select>

<select id="getCompany" resultType="hashmap">
쿼리 내용...
</select>

<select id="getService" resultType="DTOclass">
쿼리 내용...
</select>

 

 

별칭(alias)

데이터 형태(data type)

string

String

date

Date

map

Map

hashmap

HashMap

list

List

arraylist

ArrayList

decimal

BigDecimal

bigdecimal

BigDecimal

biginteger

BigInteger

_byte

byte

_long

long

_short

short

_int

int

_integer

int

_double

double

_float

float

_boolean

boolean

_byte[]

byte[]

_long[]

long[]

_short[]

short[]

_int[]

int[]

_integer[]

int[]

_double[]

double[]

_float[]

float[]

_boolean[]

boolean[]

byte

Byte

long

Long

short

Short

int

Integer

integer

Integer

double

Double

float

Float

boolean

Boolean

byte[]

Byte[]

long[]

Long[]

short[]

Short[]

int[]

Integer[]

integer[]

Integer[]

double[]

Double[]

float[]

Float[]

boolean[]

Boolean[]

object

Object

date[]

Date[]

decimal[]

BigDecimal[]

bigdecimal[]

BigDecimal[]

biginteger[]

BigInteger[]

object[]

Object[]

collection

Collection

iterator

Iterator

ResultSet

ResultSet

※주의 : 원시형의 경우는 언더스코어(_)를 앞에 붙인다. 붙이지 않는 경우 *래퍼(Wrapper) 클래스로 변환된다.

 

*래퍼(Wrapper) 클래스 : 포장 클래스

이 글 참고

 

[Java]기본형(primitive type)과 참조형(reference type) (feat.Integer와 int 차이점)

오늘은 Java 기본형(primitive type)과 참조형(reference type) 종류 및 특징,사용 이유에 대해 시작하겠습니다. 자바는 크게 기본형(primitive type), Wrapper Class 참조형(reference type)으로 나눠진다. Primi..

java119.tistory.com

 

반응형

+ Recent posts