Created
November 10, 2023 11:26
-
-
Save juarezjuniorgithub/1baa8884ebc14425e1f06bbd4572ba91 to your computer and use it in GitHub Desktop.
Things.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.oracle.dev.jdbc.micronaut.domain; | |
import io.micronaut.core.annotation.Creator; | |
import io.micronaut.data.annotation.GeneratedValue; | |
import io.micronaut.data.annotation.Id; | |
import io.micronaut.data.annotation.MappedEntity; | |
import io.micronaut.serde.annotation.Serdeable; | |
@MappedEntity | |
@Serdeable | |
public class Thing { | |
@Id | |
@GeneratedValue | |
private Long id; | |
private final String name; | |
@Creator | |
public Thing(String name) { | |
this.name = name; | |
} | |
public String getName() { | |
return name; | |
} | |
public Long getId() { | |
return id; | |
} | |
public void setId(Long id) { | |
this.id = id; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment