Here you can find the source of isDB2(DatabaseMetaData metadata)
Parameter | Description |
---|---|
metadata | a parameter |
Parameter | Description |
---|---|
SQLException | an exception |
public static boolean isDB2(DatabaseMetaData metadata) throws SQLException
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.sql.DatabaseMetaData; import java.sql.SQLException; public class Main { public static final String IBM_DB2_ZOS_PRODUCT_NAME = "DB2"; /**/*from w ww . j av a2 s . c o m*/ * Comment method "isDB2". * * @param metadata * @return * @throws SQLException */ public static boolean isDB2(DatabaseMetaData metadata) throws SQLException { if (metadata != null && metadata.getDatabaseProductName() != null && metadata.getDatabaseProductName().indexOf(IBM_DB2_ZOS_PRODUCT_NAME) > -1) { return true; } return false; } }