Exemple #1
0
 /**
  * 返回给定连接对应的数据库中所有表的所有元数据信息 <br>
  * 注:不包括表中的列信息
  *
  * @param conn 连接信息
  * @return Map<表名, MdRdbTable>
  * @since 1.0.0
  * @author Kevice
  * @time 2013年11月24日 下午10:21:13
  */
 public static Map<String, MdRdbTable> getTables(RdbConnection conn) {
   Map<String, MdRdbTable> tableMap = CoreBeanFactory.getMdRdbTableCacheService().getTables(conn);
   return filterRelationalObject(tableMap);
 }
Exemple #2
0
 /**
  * 获取主键
  *
  * @param conn 数据库连接
  * @param tableName 表名
  * @return 主键对象
  * @since 1.0.0
  * @author Kevice
  * @time 2013年11月24日 下午10:27:14
  */
 public static MdRdbPrimaryKey getPrimaryKey(RdbConnection conn, String tableName) {
   return CoreBeanFactory.getMdRdbPrimaryKeyCacheService().getPrimaryKey(conn, tableName);
 }
Exemple #3
0
 /**
  * 根据数据库连接、对象名从缓存中取得该对象的元数据信息
  *
  * @param conn 数据库连接
  * @param name 对象名
  * @return 对象的元数据信息
  * @since 1.0.0
  * @author Kevice
  * @time 2013年11月24日 下午10:28:22
  */
 public static MdRdbTable getRelationalObject(RdbConnection conn, String name) {
   Map<String, MdRdbTable> tableMap = CoreBeanFactory.getMdRdbTableCacheService().getTables(conn);
   return tableMap.get(name);
 }
Exemple #4
0
 /**
  * 获取表的所有列
  *
  * @param conn 数据库连接
  * @param tableName 表名
  * @return Map<列名,MdRdbColumn>
  * @since 1.0.0
  * @author Kevice
  * @time 2013年11月24日 下午10:25:18
  */
 public static Map<String, MdRdbColumn> getColumns(RdbConnection conn, String tableName) {
   return CoreBeanFactory.getMdRdbColumnCacheService().getColumns(conn, tableName);
 }