Here you can find the source of isMysql(DatabaseMetaData metadata)
public static boolean isMysql(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 boolean isMysql(DatabaseMetaData metadata) throws SQLException { boolean result = false; try {/* w w w .ja v a 2 s. co m*/ if (metadata != null && metadata.getDriverName() != null && metadata.getDatabaseProductName() != null && metadata.getDatabaseProductName().toUpperCase().indexOf("MYSQL") > -1) { //$NON-NLS-1$ result = true; } } catch (SQLException e) { result = false; } return result; } }