package com.ankurm.hibernatedemo.testdb; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.Lob; /** * Backs docs/09-testing-in-memory-databases.md (post 4868 rewrite). One entity, run through the SAME mapping * against H2 2.4.240, HSQLDB 2.7.3 and Apache Derby 10.16.1.1 via {@link TestDbBootstrap} -- * the DDL differences, dialect selection, and cross-database failure case are all read off * this exact class. * * */ @Entity public class TestDbWidget { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column(length = 5) private String sku; @Column(name = "\"order\"") private Integer order; private boolean active; @Lob private String description; protected TestDbWidget() { // JPA } public TestDbWidget(String sku, Integer order, boolean active, String description) { this.sku = sku; this.order = order; this.active = active; this.description = description; } public Long getId() { return id; } public String getSku() { return sku; } public Integer getOrder() { return order; } public boolean isActive() { return active; } public String getDescription() { return description; } }