//Source file: C:\\Rose2Java\\zhsoft\\dbcon\\ResultRow.java

package com.dbms.dbcon;

import java.util.Hashtable;

/**
 * 结果行
 *
 * @author 雨亦奇(zhsoft88@sohu.com)
 * @version 1.0
 * @since 2003.05.18
 */
public class ResultRow extends Hashtable
{

    /**
     * @roseuid 3ED868800369
     */
    public ResultRow()
    {

    }

    /**
     * 根据字段名取其值
     *
     * @param columnName
     *  - 字段名
     * @return String
     * @throws java.lang.Exception
     * @roseuid 3ED75EE9008B
     */
    public String getValue(String columnName) throws Exception
    {
        if (columnName == null || columnName.equals("")) {
            throw new Exception("字段名不能为空");
        }
        Object o = this.get(columnName);
        if (o == null) {
            throw new Exception("无此字段名: " + columnName);
        }
        return (String) o;
    }
    /**
     public String getValue(int colSeq) throws Exception
     {
     if (colSeq < 0 || colSeq == 0) {
     throw new Exception("字段序号不能为0");
     }
     String o = this.getValue(colSeq);
     return (String) o;
     }
     */
}
