public class MySQLDAO extends AbstractDAO
connection, dataSource, fieldMapping, sqlHelper, startTranscation, syntaxHandler| 构造器和说明 |
|---|
MySQLDAO(DataSource dataSource) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
createForeignKey()
创建外键约束
|
protected void |
createTable(Entity entity)
创建新表
|
protected void |
dropIndex(String tableName,
String indexName)
删除索引
|
protected Entity[] |
getDatabaseInfo()
获取数据库信息
|
protected boolean |
isConstraintExists(String tableName,
String constraintName)
外键是否存在
|
protected boolean |
isIndexExists(String tableName,
String indexName)
索引是否存在
|
<T> Condition<T> |
query(Class<T> _class)
复杂查询接口
|
autoBuildDatabase, clear, commit, create, createIndex, createUniqueKey, delete, delete, drop, endTransaction, exist, fetch, fetch, fetchList, getConnection, rebuild, rollback, rollback, save, save, save, setSavePoint, startTransactionpublic MySQLDAO(DataSource dataSource)
public <T> Condition<T> query(Class<T> _class)
DAO复杂查询接口
query 在接口中 DAOquery 在类中 AbstractDAO_class - 类名,指定要查询的表protected Entity[] getDatabaseInfo() throws SQLException
AbstractDAOgetDatabaseInfo 在类中 AbstractDAOSQLExceptionprotected void createTable(Entity entity) throws SQLException
AbstractDAOcreateTable 在类中 AbstractDAOSQLExceptionprotected void createForeignKey()
throws SQLException
AbstractDAOcreateForeignKey 在类中 AbstractDAOSQLExceptionprotected boolean isIndexExists(String tableName, String indexName) throws SQLException
AbstractDAOisIndexExists 在类中 AbstractDAOSQLExceptionprotected boolean isConstraintExists(String tableName, String constraintName) throws SQLException
AbstractDAOisConstraintExists 在类中 AbstractDAOSQLExceptionprotected void dropIndex(String tableName, String indexName) throws SQLException
AbstractDAOdropIndex 在类中 AbstractDAOSQLExceptionCopyright © 2019. All rights reserved.