
public class GlueColumnDef extends Object implements Serializable
1. applicationContext.xml ¿¹2. Sample Code GlueGenericDao dao = getDao("testdao"); GlueRowSet rowSet = dao.findByQueryStatement("select * from EMP"); GlueColumnDef[] def = rowSet.getColumnDefs(); while(rowSet.hasNext()) { GlueRow row = rowSet.next(); for(int i=0, iz=def.length; i < iz; i++) { System.out.println("ColumnDef - Name : "+def[i].getName()); System.out.println("ColumnDef - Type : "+def[i].getType()); System.out.println("ColumnDef - Length : "+def[i].getLength()); System.out.println("ColumnDef - Precision : "+def[i].getPrecision()); System.out.println("ColumnDef - Scale : "+def[i].getScale()); System.out.println("Data : "+row.getAttribute(def[i].getName())); } } 
| Constructor and Description | 
|---|
GlueColumnDef(String name,
             int type,
             int length)
»ý¼ºÀÚ(constructor). 
 | 
GlueColumnDef(String name,
             int type,
             int length,
             int precision,
             int scale)
»ý¼ºÀÚ(constructor). 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
getLength()
Indicates the designated column's normal maximum width in
 characters. 
 | 
String | 
getName()
Get the designated column's name. 
 | 
int | 
getPrecision()
Get the designated column's number of decimal digits. 
 | 
int | 
getScale()
Gets the designated column's number of digits to right of the
 decimal point. 
 | 
int | 
getType()
Retrieves the designated column's SQL type. 
 | 
String | 
toString()  | 
public GlueColumnDef(String name, int type, int length)
name - type - length - public GlueColumnDef(String name, int type, int length, int precision, int scale)
name - type - length - precision - scale - public String getName()
ex) ´ÙÀ½°ú °°Àº sql¹®À̶ó¸é EMPNO, NAMEÀ» ¾òÀ»¼ö ÀÖ´Ù. select empno, ename as name from emp
public int getType()
public int getLength()
public int getPrecision()
public int getScale()
Copyright © 2013–2019 POSCO ICT. All rights reserved.