Auto create POJO class from database in IntelliJ

Karol Katanowski

Is there any function in IntelliJ that allows me to generate simple POJO class from database tables (currently using PSQL)? I saw some similar example in Eclipse using "hbm2java".

meaningqo

Yes, it's possible to generate simple POJOs from Database Tables in IntelliJ.

Just follow this instruction:

  1. Connect your database to IntelliJ.
  2. Right click the tables you want to generate your POJOs for
  3. Right Click on your selection --> Scripted Extensions --> Generate POJOs.groovy
  4. Select where to save your POJO classes
  5. Press OK and your POJO files will be created.

Hope this helps. - Tested on IntelliJ 2019.1

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Create POJO Class for Kotlin

Create JSONObject from POJO

how to get and display json array data from our auto generated pojo class?

Is there a way to auto generate a flatten pojo from a pojo with object composition

Create Test Class in IntelliJ

Fetch Data from Database using JPA and Spring Boot without entity or POJO class?

Create a Java class from a groovy test file in IntelliJ

how to create a database from a class with multiple class inside

How to filter pojo class and make new pojo class from them

IntelliJ Idea auto create new method

Network pojo class and database entity class, how to avoid duplication

IntelliJ auto create new method that NOT exist and auto type conversion?

Java and mySQL, why create class objects with data from the database?

Create an Excel file with the Excel interop class from SQL Database

Create additional class using Entity Framework (Code First From Database)

Auto delete from SQL database

How to create pojo classes from XSD?

How to create a pojo from xml for jaxb ( Unmarshalling)

Create JSON from a plain string using pojo

How to create One-to-Many and Many-to-One Relationship from one class to another class in Java/IntelliJ

Postgres <=> Rails . How to auto-create a user from database.yml

How to create auto calculate value from database and new value using javascript

Auto complete HTML attribute from CSS Intellij

SQLAlchemy: Auto generate class definitions for a legacy database

MongoDB + HibernateOGM + Spring Boot auto create database

PostgreSQL + Hibernate + Spring auto create database

auto create database in Entity Framework Core

Auto Create database using EF Core

Intellij database cannot create new row