setValues

설명

attrNames 배열에 명시된 속성의 값을 values 배열에 명시된 값으로 변경한다.

구문

void setValues(String[] attrNames, Object[] values)

예제

// create class foo ( a string, b int )
 
String sql = "select foo from foo";
String[] attr = { "a", "b" };  // a list of attribute names
String[] values = {"CUBRID", new Integer(2001)};
 
CUBRIDResultSet rs = (CUBRIDResultSet)stmt.executeQuery(sql);
 
while (rs.next ()) {
   CUBRIDOID oid = rs.getOID(1); 
   oid.setValues(attr, values );  
}