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–2021 POSCO ICT. All rights reserved.