public interface TableScriptInterface
| 限定符和类型 | 方法和说明 |
|---|---|
String |
alterField(PropertyVO propertyVO)
修改字段属性
|
String |
createField(PropertyVO propertyVO)
创建字段
|
String |
createPrimaryKey(PropertyVO propertyVO)
为主键字段创建主键约束
|
String |
createTable(EntityVO entityVO)
根据实体信息创建数据表
|
String |
createUnique(EntityVO entityVO)
为实体创建唯一约束
|
String |
dropField(PropertyVO propertyVO)
删除字段
|
String |
dropPrimaryKey(String tableName)
删除表的主键约束
|
String |
droptable(String tableName)
删除指定表
|
String |
dropUnique(EntityVO entityVO)
删除实体的唯一约束
|
boolean |
exist(String tableName)
检查指定表是否存在
|
boolean |
exist(String tableName,
String fieldName)
检查指定表中是否存在指定字段
|
List<EntityVO> |
getEntities()
获取所有实体信息列表
|
EntityVO |
getEntity(String tableName)
根据表名获取实体信息
|
List<String> |
getEntityNames()
获取所有实体名称列表
|
String |
getMappingType(PropertyVO propertyVO)
获取字段的映射类型
|
Map<String,PropertyVO> |
getProperties(String tableName)
根据表名获取属性信息映射
|
PropertyVO |
getProperty(String tableName,
String fieldName)
根据表名和字段名获取属性信息
|
int |
getTableFieldLength(String tableName,
String fieldName)
获取表中指定字段的长度
|
String |
getTableFieldType(String tableName,
String fieldName)
获取表中指定字段的数据类型
|
boolean |
isEqualsProperty(PropertyVO propertyVO)
判断字段属性是否相等
|
boolean |
isEqualsProperty(PropertyVO xmlProperty,
PropertyVO fieldPropertyVO)
比较两个属性对象是否相等
|
boolean |
isExistPrimaryKey(String tableName)
检查指定表是否存在主键
|
String |
saveTable(EntityVO entityVO)
保存表结构信息
|
Map<String,PropertyVO> getProperties(String tableName) throws SQLException
tableName - 表名,用于查询对应的属性信息SQLException - 当数据库操作发生错误时抛出此异常PropertyVO getProperty(String tableName, String fieldName) throws SQLException
tableName - 表名fieldName - 字段名SQLException - 数据库操作异常boolean isEqualsProperty(PropertyVO xmlProperty, PropertyVO fieldPropertyVO) throws SQLException
xmlProperty - XML配置中的属性对象fieldPropertyVO - 数据库字段对应的属性对象SQLException - 数据库操作异常boolean exist(String tableName, String fieldName) throws SQLException
tableName - 要检查的表名,不能为空fieldName - 要检查的字段名,不能为空SQLException - 当数据库操作发生错误时抛出boolean exist(String tableName) throws SQLException
tableName - 表名SQLException - 数据库操作异常String createTable(EntityVO entityVO) throws SQLException
entityVO - 实体信息对象SQLException - 数据库操作异常String dropField(PropertyVO propertyVO)
propertyVO - 字段属性信息对象String getMappingType(PropertyVO propertyVO) throws SQLException
propertyVO - 字段属性信息对象SQLException - 数据库操作异常String createField(PropertyVO propertyVO) throws SQLException
propertyVO - 字段属性信息对象SQLException - 数据库操作异常boolean isExistPrimaryKey(String tableName) throws SQLException
tableName - 表名SQLException - 数据库操作异常String createPrimaryKey(PropertyVO propertyVO)
propertyVO - 主键字段属性信息对象String getTableFieldType(String tableName, String fieldName) throws SQLException
tableName - 表名fieldName - 字段名SQLException - 数据库操作异常int getTableFieldLength(String tableName, String fieldName) throws SQLException
tableName - 表名fieldName - 字段名SQLException - 数据库操作异常EntityVO getEntity(String tableName) throws SQLException
tableName - 表名SQLException - 数据库操作异常List<EntityVO> getEntities() throws SQLException
SQLException - 数据库操作异常List<String> getEntityNames() throws SQLException
SQLException - 数据库操作异常boolean isEqualsProperty(PropertyVO propertyVO) throws SQLException
propertyVO - 字段属性信息对象SQLException - 数据库操作异常String createUnique(EntityVO entityVO)
entityVO - 实体信息对象String alterField(PropertyVO propertyVO) throws SQLException
propertyVO - 字段属性信息对象SQLException - 数据库操作异常String saveTable(EntityVO entityVO) throws SQLException
entityVO - 实体信息对象SQLException - 数据库操作异常Copyright © 2025. All rights reserved.