随笔 - 25, 文章 - 1, 评论 - 0, 引用 - 0

导航

<2010年7月>
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

常用链接

留言簿

随笔分类

随笔档案

文章分类

文章档案

收藏夹

个人链接

搜索

  •  

最新评论

阅读排行榜

评论排行榜

[Java]-[Enum]-[DBTYPE]

    enum DatabaseProduct {
        ACCESS,
        UNKNOWN,
        DERBY,
        DB2_OLD_AS400,
        DB2_AS400,
        DB2,
        FIREBIRD,
        GREENPLUM,
        HSQLDB,
        INFORMIX,
        INFOBRIGHT,
        INGRES,
        INTERBASE,
        LUCIDDB,
        MSSQL,
        NETEZZA,
        NEOVIEW,
        ORACLE,
        POSTGRESQL,
        MYSQL,
        SQLSTREAM,
        SYBASE,
        TERADATA,
        VERTICA;

        
/**
         * Return the root of the family of products this database product
         * belongs to.
         *
         * <p>For {
@link #DB2_AS400} and {@link #DB2_OLD_AS400} returns
         * {
@link #DB2}; for all other database products, returns the same
         * product.
         *
         * 
@return root of family of database products
         
*/
        
public DatabaseProduct getFamily() {
            
switch (this) {
            
case DB2_OLD_AS400:
            
case DB2_AS400:
                
return DB2;
            
default:
                
return this;
            }
        }
    }

posted on 2010-07-26 15:15 至尊贝贝 阅读(199) 评论(0)  编辑  收藏 所属分类: 代码:J2SE


只有注册用户登录后才能发表评论。


网站导航: