| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public static String getMysqlType(String type) { |
| | | if (type.endsWith("java.lang.Long")) { |
| | | return "bigint"; |
| | | } else if (type.endsWith("java.lang.Integer")) { |
| | | return "int"; |
| | | } else if (type.endsWith("java.lang.String")) { |
| | | return "varchar"; |
| | | } else if (type.endsWith("java.lang.Boolean")) { |
| | | return "tinyint"; |
| | | } else if (type.endsWith("java.math.BigDecimal")) { |
| | | return "decimal"; |
| | | } else if (type.endsWith("java.util.Date")) { |
| | | return "datetime"; |
| | | } else if (type.endsWith("java.lang.Double")) { |
| | | return "double"; |
| | | } else { |
| | | return "varchar"; |
| | | } |
| | | } |
| | | |
| | | } |