ibatis返回map

<typeAlias alias="eamny" type="com.nstc.bankportal.model.AMNY" />
 <resultMap id="amny_map" class="eamny">
  <result property="mny" column="MNY" />
  <result property="mnyName" column="MNYNAME" />
  <result property="mnyAffix" column="MNYAFFIX" />
  <result property="mnyStyle" column="MNYSTYLE" />
 </resultMap>
 <select id="get-bz" resultMap="amny_map">
  select * from amny
 </select>

  AMNY类

 

public class AMNY implements Serializable{
	
	//币种
	private String mny;
	
	//币种名
	private String mnyName;
	
	//币种符号
	private String mnyAffix;
	//币种状态
	private int mnyStyle;
	
	public AMNY() {
		
	}

	public String getMny() {
		return mny;
	}

	public void setMny(String mny) {
		this.mny = mny;
	}

	public String getMnyName() {
		return mnyName;
	}

	public void setMnyName(String mnyName) {
		this.mnyName = mnyName;
	}
	
	public String toString(){
		StringBuffer s = new StringBuffer("{");
		s.append("Mny=").append(mny);
		s.append(",MnyName=").append(mnyName);
		s.append("}");
		return s.toString();
	}

	public String getMnyAffix() {
		return mnyAffix;
	}

	public void setMnyAffix(String mnyAffix) {
		this.mnyAffix = mnyAffix;
	}

	public int getMnyStyle() {
		return mnyStyle;
	}

	public void setMnyStyle(int mnyStyle) {
		this.mnyStyle = mnyStyle;
	}
}

 

你可能感兴趣的:(ibatis)