Imagine we have the following classes:
An entity class:
Java
public class HeightAdjustableDesk {
private Long id;
private String manufacturer;
private Integer maxHeight;
}Kotlin
class HeightAdjustableDesk(
var id: Long,
var manufacturer: String,
var maxHeight: Int
)A repository class:
Java
public class HeightAdjustableDeskRepository extends CrudRepository<HeightAdjustableDesk, Long> {
}Kotlin
interface HeightAdjustableDeskRepository :
CrudRepository<HeightAdjustableDesk, Long>Also, we have an initialized
repository.
Please sort the instructions in the following order:
Create an entity with
id=42, manufacturer=Anatomica, maxHeight=74.Try to get an entity with
id=42.Update the entity from step 2.
Delete the entity from step 3.