diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f8ca59a..905bcbc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- IdFinderNG + ## [8.5.2] - 2024-03-08 ### Added diff --git a/fj-core/src/main/java/org/fugerit/java/core/db/daogen/IdFinderNG.java b/fj-core/src/main/java/org/fugerit/java/core/db/daogen/IdFinderNG.java new file mode 100644 index 00000000..afa3bdad --- /dev/null +++ b/fj-core/src/main/java/org/fugerit/java/core/db/daogen/IdFinderNG.java @@ -0,0 +1,26 @@ +package org.fugerit.java.core.db.daogen; + +import java.math.BigDecimal; + +public class IdFinderNG { + + private BigDecimal id; + + public BigDecimal getId() { + return id; + } + + public void setId( BigDecimal id ) { + this.id = id; + } + + public void setId( long id ) { + this.setId( new BigDecimal( id ) ); + } + + @Override + public String toString() { + return "IdFinderNG [id=" + id + "]"; + } + +} diff --git a/fj-core/src/test/java/test/org/fugerit/java/core/db/dao/daogen/TestIdFinderNG.java b/fj-core/src/test/java/test/org/fugerit/java/core/db/dao/daogen/TestIdFinderNG.java new file mode 100644 index 00000000..dac8f2ff --- /dev/null +++ b/fj-core/src/test/java/test/org/fugerit/java/core/db/dao/daogen/TestIdFinderNG.java @@ -0,0 +1,21 @@ +package test.org.fugerit.java.core.db.dao.daogen; + +import lombok.extern.slf4j.Slf4j; +import org.fugerit.java.core.db.daogen.IdFinderNG; +import org.junit.Assert; +import org.junit.Test; + +@Slf4j +public class TestIdFinderNG { + + private static final long TEST = 1000L; + + @Test + public void testIdFinderNg() { + IdFinderNG finder = new IdFinderNG(); + finder.setId( TEST ); + log.info( "finder : {}", finder ); + Assert.assertEquals( TEST, finder.getId().longValue() ); + } + +}