Merge pull request #2932 from parveenyadav-multiply/patch-2

Create UUIDAsIDModel.java
This commit is contained in:
Rob Bygrave
2023-01-17 20:51:45 +13:00
committed by GitHub
@@ -0,0 +1,36 @@
package org.domain;
import io.ebean.Model;
import io.ebean.annotation.Cache;
import io.ebean.annotation.CacheBeanTuning;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.UUID;
@Cache(enableQueryCache = true, nearCache = true, naturalKey = "uuidModel")
@CacheBeanTuning(maxSecsToLive = 1)
@Entity
public class UUIDAsIDModel extends Model {
@Id
UUID uuid;
String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public UUID getUuid() {
return uuid;
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
}