| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.poscoict.glueframework.dao.vo.GlueColumnDef
public class GlueColumnDef
µ¥ÀÌŸº£À̽º Á¶È¸°á°úÀÎ GlueRowSet ObjectÀÇ °¢ ColumnÇ׸ñÀÇ Á¤º¸¸¦ Á¦°øÇÏ´Â ClassÀÌ´Ù. ColumnÁ¤º¸¿¡´Â Name, Type, Length, Precision, ScaleÀÌ ÀÖ´Ù. ColumnÁ¤º¸¸¦ »ç¿ëÇϱâ À§Çؼ´Â applicaitonContext.xmlÀÇ dao bean¼Ó¼º¿¡ ´ÙÀ½ÀÌ Ãß°¡µÇ¾î¾ß ÇÑ´Ù.
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 Summary | |
|---|---|
GlueColumnDef(String name,
              int type,
              int length)
»ý¼ºÀÚ(constructor).  | 
|
GlueColumnDef(String name,
              int type,
              int length,
              int precision,
              int scale)
»ý¼ºÀÚ(constructor).  | 
|
| Method Summary | |
|---|---|
 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()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
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 - | Method Detail | 
|---|
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()
public String toString()
toString in class Object
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||