Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lombok dependency and apply it to entity classes #735

Open
MalloD12 opened this issue Dec 11, 2024 · 0 comments · May be fixed by #740
Open

Add Lombok dependency and apply it to entity classes #735

MalloD12 opened this issue Dec 11, 2024 · 0 comments · May be fixed by #740

Comments

@MalloD12
Copy link
Contributor

MalloD12 commented Dec 11, 2024

I think adding Lombok to this extension would make classes like the one below look much more smaller:

@Entity
public class Item {

  @Id
  @GeneratedValue(strategy = GenerationType.SEQUENCE)
  private long id;

  @Column
  private Instant timestamp1;

  @Column
  private LocalDateTime timestamp2;

  @Column(columnDefinition = "timestamp")
  private Instant timestamp3;

  @Column(columnDefinition = "TIMESTAMP WITH TIME ZONE")
  private LocalDateTime timestamp4;

  public long getId() {
      return id;
  }

  public void setId(long id) {
      this.id = id;
  }

  public Instant getTimestamp1() {
      return timestamp1;
  }

  public void setTimestamp1(Instant timestamp1) {
      this.timestamp1 = timestamp1;
  }

  public LocalDateTime getTimestamp2() {
      return timestamp2;
  }

  public void setTimestamp2(LocalDateTime timestamp2) {
      this.timestamp2 = timestamp2;
  }

}

Resulting in something like:

@Entity
public class Item {

   @Id
   @GeneratedValue(strategy = GenerationType.SEQUENCE)
   @Getter
   @Setter
   private long id;

   @Column
   @Getter
   @Setter
   private Instant timestamp1;

   @Column
   @Getter
   @Setter
   private LocalDateTime timestamp2;

  ...

}
@lbadam lbadam moved this from New to In Development PR Issues in Liquibase Open Source Dec 16, 2024
@lbadam lbadam moved this from In Development PR Issues to New in Liquibase Open Source Dec 16, 2024
@lbadam lbadam moved this from New to Candidate in Liquibase Open Source Dec 16, 2024
@filipelautert filipelautert moved this from Candidate to Foundation Team Tickets in Liquibase Open Source Dec 19, 2024
@MalloD12 MalloD12 linked a pull request Dec 27, 2024 that will close this issue
@MalloD12 MalloD12 moved this from Foundation Team Tickets to In Development PR Issues in Liquibase Open Source Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Development PR Issues
Development

Successfully merging a pull request may close this issue.

1 participant