⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unitbase.java

📁 OA典型例子
💻 JAVA
字号:

/*
 * UnitBase.java
 * Generated using xgen and texen from beanbase.vm
 * Sun May 09 20:00:45 CST 2004
 */

package com.sure.oa.orgnization;

import com.sure.util.DateWrapper;
import java.io.*;
import java.sql.SQLException;

/**
 * 将单位部门信息持久化到数据库
 * @author datonghuiren@sohu.com
 */
public abstract class UnitBase {
  /** bean attributes */
  protected Integer unitId = new Integer ("0");
  protected String unitName = new String ("");
  protected String fatherId = new String ("");
  protected String allFatherId = new String ("");
  protected String unitCode = new String ("");
  protected String unitMaster = new String ("");
  protected String xzbm = new String ("");
  protected String unitType = new String ("");
  protected String unitEmail = new String ("");
  protected String telephone = new String ("");
  protected String postCode = new String ("");
  protected String addRess = new String ("");
  protected Integer unitXh = new Integer ("0");
  protected String memo = new String ("");
  //判断是中纪委还是监察部,中纪委1,监察部2
  protected String unitStyle = new String("");

  public UnitBase() { };

  /** setters and getters for unitName */
  public void setUnitStyle ( String value ) { this.unitStyle = new String (value); }
  public String getUnitStyle ( ){ return unitStyle; }

  /** setters and getters for unitId */
  public void setUnitId ( String value ) { this.unitId = new Integer (value); }
  public void setUnitId ( Integer value ) { this.unitId = value; }
  public void setUnitId ( int value ){ this.unitId = new Integer (value); }
  public Integer getUnitId ( ){ return unitId; }

  /** setters and getters for unitName */
  public void setUnitName ( String value ) { this.unitName = new String (value); }
  public String getUnitName ( ){ return unitName; }

  /** setters and getters for fatherId */
  public void setFatherId ( String value ) { this.fatherId = new String (value); }
  public String getFatherId ( ){ return fatherId; }

  /** setters and getters for allFatherId */
  public void setAllFatherId ( String value ) { this.allFatherId = new String (value); }
  public String getAllFatherId ( ){ return allFatherId; }

  /** setters and getters for unitCode */
  public void setUnitCode ( String value ) { this.unitCode = new String (value); }
  public String getUnitCode ( ){ return unitCode; }

  /** setters and getters for unitMaster */
  public void setUnitMaster ( String value ) { this.unitMaster = new String (value); }
  public String getUnitMaster ( ){ return unitMaster; }

  /** setters and getters for xzbm */
  public void setXzbm ( String value ) { this.xzbm = new String (value); }
  public String getXzbm ( ){ return xzbm; }

  /** setters and getters for unitType */
  public void setUnitType ( String value ) { this.unitType = new String (value); }
  public String getUnitType ( ){ return unitType; }

  /** setters and getters for unitEmail */
  public void setUnitEmail ( String value ) { this.unitEmail = new String (value); }
  public String getUnitEmail ( ){ return unitEmail; }

  /** setters and getters for telephone */
  public void setTelephone ( String value ) { this.telephone = new String (value); }
  public String getTelephone ( ){ return telephone; }

  /** setters and getters for postCode */
  public void setPostCode ( String value ) { this.postCode = new String (value); }
  public String getPostCode ( ){ return postCode; }

  /** setters and getters for addRess */
  public void setAddRess ( String value ) { this.addRess = new String (value); }
  public String getAddRess ( ){ return addRess; }

  /** setters and getters for unitXh */
  public void setUnitXh ( String value ) { this.unitXh = new Integer (value); }
  public void setUnitXh ( Integer value ) { this.unitXh = value; }
  public void setUnitXh ( int value ){ this.unitXh = new Integer (value); }
  public Integer getUnitXh ( ){ return unitXh; }

  /** setters and getters for memo */
  public void setMemo ( String value ) { this.memo = new String (value); }
  public String getMemo ( ){ return memo; }


  /**
   * Load this object from a Map hash.
   */
  public void load(java.util.Map map){
    java.util.Iterator it = map.keySet().iterator();

    while( it.hasNext() ){
      String key = (String)it.next();
      String value = (String)map.get(key);
      if(false){
        // just a placeholder for template construction
      }
      else if( key.equals("unitId") ) {
        setUnitId( value );
      }
      else if( key.equals("unitName") ) {
        setUnitName( value );
      }
      else if( key.equals("fatherId") ) {
        setFatherId( value );
      }
      else if( key.equals("allFatherId") ) {
        setAllFatherId( value );
      }
      else if( key.equals("unitCode") ) {
        setUnitCode( value );
      }
      else if( key.equals("unitMaster") ) {
        setUnitMaster( value );
      }
      else if( key.equals("xzbm") ) {
        setXzbm( value );
      }
      else if( key.equals("unitType") ) {
        setUnitType( value );
      }
      else if( key.equals("unitEmail") ) {
        setUnitEmail( value );
      }
      else if( key.equals("telephone") ) {
        setTelephone( value );
      }
      else if( key.equals("postCode") ) {
        setPostCode( value );
      }
      else if( key.equals("addRess") ) {
        setAddRess( value );
      }
      else if( key.equals("unitXh") ) {
        setUnitXh( value );
      }
      else if( key.equals("memo") ) {
        setMemo( value );
      }
      else if( key.equals("unitStyle") ) {
        setUnitStyle( value );
      }
    }
  }

  /**
   * Load this object from a request parameter Map,
   * using only the first elements of the String[] values.
   */
  public void loadFromParameterMap(java.util.Map map){
    java.util.Iterator it = map.keySet().iterator();

    while( it.hasNext() ){
      String key = (String)it.next();
      String[] values = (String[])map.get(key);
      if(false){
        // just a placeholder for template construction
      }
      else if( key.equals("unitId") ) {
      setUnitId( values[0] );
      }
      else if( key.equals("unitName") ) {
      setUnitName( values[0] );
      }
      else if( key.equals("fatherId") ) {
      setFatherId( values[0] );
      }
      else if( key.equals("allFatherId") ) {
      setAllFatherId( values[0] );
      }
      else if( key.equals("unitCode") ) {
      setUnitCode( values[0] );
      }
      else if( key.equals("unitMaster") ) {
      setUnitMaster( values[0] );
      }
      else if( key.equals("xzbm") ) {
      setXzbm( values[0] );
      }
      else if( key.equals("unitType") ) {
      setUnitType( values[0] );
      }
      else if( key.equals("unitEmail") ) {
      setUnitEmail( values[0] );
      }
      else if( key.equals("telephone") ) {
      setTelephone( values[0] );
      }
      else if( key.equals("postCode") ) {
      setPostCode( values[0] );
      }
      else if( key.equals("addRess") ) {
      setAddRess( values[0] );
      }
      else if( key.equals("unitXh") ) {
      setUnitXh( values[0] );
      }
      else if( key.equals("memo") ) {
      setMemo( values[0] );
      }
      else if( key.equals("unitStyle") ) {
      setUnitStyle( values[0] );
      }
    }
  }

  /**
    * to String
    */
  public String toString(){
    return toString(",");
  }

  /**
    * to String with specified line terminator
    */
  public String toString(String nl){
    StringBuffer buf = new StringBuffer();
    buf.append("UnitBase {");
    buf.append( getUnitId () );
    buf.append(nl);
    buf.append( getUnitName () );
    buf.append(nl);
    buf.append( getFatherId () );
    buf.append(nl);
    buf.append( getAllFatherId () );
    buf.append(nl);
    buf.append( getUnitCode () );
    buf.append(nl);
    buf.append( getUnitMaster () );
    buf.append(nl);
    buf.append( getXzbm () );
    buf.append(nl);
    buf.append( getUnitType () );
    buf.append(nl);
    buf.append( getUnitEmail () );
    buf.append(nl);
    buf.append( getTelephone () );
    buf.append(nl);
    buf.append( getPostCode () );
    buf.append(nl);
    buf.append( getAddRess () );
    buf.append(nl);
    buf.append( getUnitXh () );
    buf.append(nl);
    buf.append( getMemo () );
    buf.append(nl);
    buf.append( getUnitStyle () );
    buf.append(nl);
    buf.append("}");
    return buf.toString();
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -