随笔 - 25, 文章 - 1, 评论 - 0, 引用 - 0
数据加载中……

[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 至尊贝贝 阅读(197) 评论(0)  编辑  收藏 所属分类: 代码:J2SE


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


网站导航: