首页>代码>java简单实用的SQL生成器>/sql/src/com/lyj/bean/SuperBean.java
package com.lyj.bean;

import java.lang.reflect.Method;

public abstract class SuperBean {
  /**
   * 
   * @return bean对应的表名
   */
	 public abstract String getTableName();
	
	/**
	 * 返回属性对应的get值
	 * @param attribute 属性
	 * @return 属性的get值
	 */
	 public final  String getAttributeValue(final String attribute) throws Exception{
		char big=(char) (attribute.charAt(0)-0x20);
		Method getMethod=this.getClass().getMethod("get"+big+attribute.substring(1, attribute.length()));
		return getMethod.invoke(this)==null?"":getMethod.invoke(this).toString();
		
	};
	
	/**
	 * 获得子类对应数据库的属性名
	 * @return
	 */
	public abstract String []getAttNames();

}
最近下载更多
skiler  LV4 2023年6月6日
vicgong  LV4 2022年5月23日
billzw  LV6 2022年2月13日
dsafdsaf  LV7 2021年12月29日
mugege123  LV6 2020年12月23日
dongxuan5831  LV1 2020年12月10日
lxd_admin  LV3 2020年6月9日
cnflian  LV2 2020年5月21日
wuyiqun  LV2 2020年4月30日
事证明实汉语不顺序看  LV2 2020年4月8日
最近浏览更多
3320151533  LV1 1月7日
cuihongmin  LV1 2023年6月16日
skiler  LV4 2023年6月6日
zhuaidan 2023年2月10日
暂无贡献等级
微信网友_6258245891903488  LV7 2023年1月2日
uni-code_0123  LV1 2022年12月5日
ilovecode521  LV3 2022年12月4日
1726335210  LV2 2022年11月7日
梅梅呀  LV3 2022年7月11日
vicgong  LV4 2022年5月23日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友