---
title: "我自己的数据对象处理类 UpdateDemo"
author: "phantom"
date: "2007-03-03T06:20:20Z"
tags: []
slug: "updatedemo"
draft: false
lastmod: "2007-03-03T06:20:20Z"
id: 66098
url: "https://phantom.iteye.com/blog/66098"
---

package com.jh.core.db.jdbc.demo;

import com.jh.core.db.TagDAO;

public class UpdateDemo {

 /\**  
  * @param args  
  * @throws Exception  
  \*/  
 public static void main(String\[] args) throws Exception {  
    
  TagDAO&lt;DemoBean&gt; dao=new TagDAO&lt;DemoBean&gt;( DemoBean.class);  
  DemoBean demo=dao.getObj("select * from DemoBean\_tab where id=7 ");  
    
  System.out.println("name ="+demo.getName());  
  demo.setMemo("我是中国人");  
  demo.setName("测试bean");  
  demo.setType(9);

    
  TagDAO.updateObj(demo.getTableName(),new String\[] {"memo","type"},new String\[]{"id"}, demo);

 }

}