Skip to content

Instantly share code, notes, and snippets.

@juarezjuniorgithub
Created November 10, 2023 11:26
Show Gist options
  • Save juarezjuniorgithub/1baa8884ebc14425e1f06bbd4572ba91 to your computer and use it in GitHub Desktop.
Save juarezjuniorgithub/1baa8884ebc14425e1f06bbd4572ba91 to your computer and use it in GitHub Desktop.
Things.java
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