Skip to content

Commit fb96af6

Browse files
committed
Added IdFinderNG
1 parent 9298c74 commit fb96af6

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- IdFinderNG
13+
1014
## [8.5.2] - 2024-03-08
1115

1216
### Added
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package org.fugerit.java.core.db.daogen;
2+
3+
import java.math.BigDecimal;
4+
5+
public class IdFinderNG {
6+
7+
private BigDecimal id;
8+
9+
public BigDecimal getId() {
10+
return id;
11+
}
12+
13+
public void setId( BigDecimal id ) {
14+
this.id = id;
15+
}
16+
17+
public void setId( long id ) {
18+
this.setId( new BigDecimal( id ) );
19+
}
20+
21+
@Override
22+
public String toString() {
23+
return "IdFinderNG [id=" + id + "]";
24+
}
25+
26+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package test.org.fugerit.java.core.db.dao.daogen;
2+
3+
import lombok.extern.slf4j.Slf4j;
4+
import org.fugerit.java.core.db.daogen.IdFinderNG;
5+
import org.junit.Assert;
6+
import org.junit.Test;
7+
8+
@Slf4j
9+
public class TestIdFinderNG {
10+
11+
private static final long TEST = 1000L;
12+
13+
@Test
14+
public void testIdFinderNg() {
15+
IdFinderNG finder = new IdFinderNG();
16+
finder.setId( TEST );
17+
log.info( "finder : {}", finder );
18+
Assert.assertEquals( TEST, finder.getId().longValue() );
19+
}
20+
21+
}

0 commit comments

Comments
 (0)