12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- package com.persistence.DBdll.adapter.assitant.DbIsModify;
- import com.persistence.DBdll.adapter.assitant.ColumnInfo;
- import com.sysmodel.datamodel.xmlmodel.able.Property;
- import com.sysmodel.datamodel.xmlmodel.impl.MdpAttributeImpl;
- public abstract class ColumnAdp{
- /**
- * 判断数据库中常量表中字段是否修改
- *
- * @param imp
- * @param columninfo
- * @return
- */
- public boolean isConstantDataBaseModify(Property imp, ColumnInfo columninfo) {
- String datatype = imp.getDataType();
- String Scale = imp.getScale();
- int leghth = imp.getLength();
- return this.isModifyByDatatypeAndColumnInfo(datatype, Scale, leghth, columninfo);
- }
- /**
- * 判断数据库中业务表中数据是否被修改过
- *
- * @param attribute
- * @param columninfo
- * @return
- */
- public boolean isDataBaseModify(MdpAttributeImpl attribute, ColumnInfo columninfo) {
- String datatype = attribute.getDataType();
- String Scale = attribute.getScale();
- int leghth = attribute.getPrecision();
- return this.isModifyByDatatypeAndColumnInfo(datatype, Scale, leghth, columninfo);
- }
- /**
- * 判断表中列在xml中的配置是否和数据库中情况一致 Checks if is modify by datatype and column info.
- *
- * @param datatype
- * xml中数据类型
- * @param Scale
- * the xml中格式化类型
- * @param leghth
- * the xml中字段长度定义
- *
- * @param columninfo
- * the columninfo 数据库中列情况对象
- *
- * @return true, if is modify by datatype and column info
- *
- * @author sun
- * @version 2009-8-20-12:37:20
- *
- * Checks if is modify by datatype and column info.
- */
- abstract public boolean isModifyByDatatypeAndColumnInfo(String datatype, String xmlScale,
- int xmlPrecision, ColumnInfo columninfo);
- }
|