浏览 1542 次
锁定老帖子 主题:映射数据库的VO类
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-12-03
public class Field { private String fieldName; //字段名 private int fieldType; //字段类型(整数表示) private boolean key; //是否主键 private boolean empty; //是否可以为空 private String typeName; //字段类型(sql类型) private int size; //字段长度 private int precision; //字段精度 private int scale; //小数位精度 private String comment; //字段备注 private boolean isView; //字段是否显示(控制性参数) public void setIsView(boolean isView) { this.isView = isView; } public boolean getIsView() { return this.isView; } public void setSize(int size) { this.size = size; } public void setPrecision(int precision) { this.precision = precision; } public void setScale(int scale) { this.scale = scale; } public void setComment(String comment) { this.comment = comment; } public int getSize() { return this.size; } public int getPrecision() { return this.precision; } public int getScale() { return this.scale; } public String getComment() { return this.comment; } public boolean isEmpty() { return empty; } public void setEmpty(boolean empty) { this.empty = empty; } public String getFieldName() { return fieldName; } public void setFieldName(String fieldName) { this.fieldName = fieldName; } public int getFieldType() { return fieldType; } public void setFieldType(int fieldType) { this.fieldType = fieldType; } public boolean isKey() { return key; } public void setKey(boolean key) { this.key = key; } public String getTypeName() { return typeName; } public void setTypeName(String typeName) { this.typeName = typeName; } public String toString() { StringBuffer str = new StringBuffer(); str.append("fieldName= " + fieldName + "\n"); str.append("fieldType= " + fieldType + "\n"); str.append("typeName= " + typeName + "\n"); str.append("key= " + key + "\n"); str.append("empty= " + empty + "\n"); str.append("size= " + size + "\n"); str.append("precision= " + precision + "\n"); str.append("scale= " + scale + "\n"); str.append("comment= " + comment + "\n"); str.append("isView= " + isView + "\n"); return str.toString(); } } 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |