• ARTICLE
  • STRING
  • CONVERTER
  • ENCRYPT
  • NETWORK
  • MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
  • ARTICLE
    STRING
    CONVERTER
    ENCRYPT
    NETWORK
    MORE
    CHART
    MATH
    COORDINATE
    IMAGE
    FILE
logo Online Tools
2 Comments Favorite Copy Link Share

MySQL Generate JavaBean Online


equals,hashCode,toString

Table DDL SQL

Output Result

MySQL Generate JavaBean Online-summary

MySQL generate JavaBean tool online, input MySQL DDL SQL statements, and generate corresponding java bean entity classes. The Java class name and field name conform to the naming convention.

MySQL Generate JavaBean Online-instructions

MySQL to Java class converter, converts the input MySQL DDL statement into the corresponding Java entity class, and supports intelligent processing of Java keywords and common class names in the input sql data.
Only one table creation statement can be included in the input SQL DDL statement.

  1. Open File : Open sql data file and support any extension name. The supported file encoding is UTF-8 encoding.
  2. Generate : After entering the sql, click generate to generate the corresponding Java entity class. This tool support intelligent processing of keywords, special class names, naming rule checking and other features.
  3. Download : Download the generated Java class file locally. Important: click Generate before downloading the file.
  4. The generated class file is based on JDK 8+ .
  5. MySQL Type to Java Type Reference Table :
    MySQL Type Name Java Class
    BIT(1) java.lang.Boolean
    BIT( > 1) byte[]
    TINYINT(1) SIGNED, BOOLEAN

    If tinyInt1isBit=true and transformedBitIsBoolean=false: java.lang.Boolean

    If tinyInt1isBit=true and transformedBitIsBoolean=true: java.lang.Boolean

    If tinyInt1isBit=false: java.lang.Integer

    TINYINT( > 1) SIGNED java.lang.Integer
    TINYINT( any ) UNSIGNED java.lang.Integer
    SMALLINT[(M)] [UNSIGNED] java.lang.Integer (regardless of whether it is UNSIGNED or not)
    MEDIUMINT[(M)] [UNSIGNED] java.lang.Integer (regardless of whether it is UNSIGNED or not)
    INT,INTEGER[(M)] java.lang.Integer
    INT,INTEGER[(M)] UNSIGNED java.lang.Long
    BIGINT[(M)] java.lang.Long
    BIGINT[(M)] UNSIGNED java.math.BigInteger
    FLOAT[(M,D)] java.lang.Float
    DOUBLE[(M,B)] [UNSIGNED] java.lang.Double (regardless of whether it is UNSIGNED or not)
    DECIMAL[(M[,D])] [UNSIGNED] java.math.BigDecimal (regardless of whether it is UNSIGNED or not)
    DATE java.sql.Date
    DATETIME java.time.LocalDateTime
    TIMESTAMP[(M)] java.sql.Timestamp
    TIME java.sql.Time
    YEAR[(2|4)] If yearIsDateType configuration property is set to false, then the returned object type is java.sql.Short. If set to true (the default), then the returned object is of type java.sql.Date.
    CHAR(M) java.lang.String
    VARCHAR(M) java.lang.String
    BINARY(M), CHAR(M) BINARY byte[]
    VARBINARY(M), VARCHAR(M) BINARY byte[]
    BLOB byte[]
    TINYBLOB byte[]
    MEDIUMBLOB byte[]
    LONGBLOB byte[]
    TEXT java.lang.String
    TINYTEXT java.lang.String
    MEDIUMTEXT java.lang.String
    LONGTEXT java.lang.String
    JSON java.lang.String
    GEOMETRY byte[]
    ENUM('value1','value2',...) java.lang.String
    SET('value1','value2',...) java.lang.String