Intellij IDEA plugin for quick transformation from a POJO to entity or DTO.
- adding class-level annotations
@Entity
and@Table(name = '*CLASS_NAME*')
- each field gets
@Column(name = "*FIELD_NAME*")
if doesn't have yet - if class contains field with name that looks like id("id", "pid", "anyNameId", "myNamePid" etc.) than that field puts on the top and gets
@Id
- adding
@JsonProperty("*FIELD_NAME*")
for each field if it's not annotated with@JsonIgnore
- replacing
java.sql.Timestamp
orjava.sql.Date
field types withjava.time.Instant
- if lombok support is enabled in settings than all class accessors are replaced with lombok class-level annotations.
@AllArgsConstructor
,@NoArgsConstructor
,@Builder
,@Setter
,@Getter
and@Accessors(chain = true)
for entity or@EqualsAndHashCode
,@Data
for DTO - formatting code with blank lines around every field