[Java]-[Enum]-[DBTYPE]

[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 ;
            }
        }
    }

你可能感兴趣的:([Java]-[Enum]-[DBTYPE])