1 package net.sourceforge.finmodel.asset;
2
3 import java.io.Serializable;
4 import java.math.BigDecimal;
5
6 public abstract class AssetImpl implements Asset, Serializable {
7 public static final long serialVersionUID = 1L;
8
9 private long id;
10 protected BigDecimal cost;
11 protected BigDecimal apr;
12 protected String name;
13
14 public AssetImpl( String name, BigDecimal cost, BigDecimal apr )
15 {
16 this.name = name;
17 this.apr = apr;
18 this.cost = cost;
19 }
20
21 public void setId(long id) {
22 this.id = id;
23 }
24
25 @Override
26 public long getId() {
27 return id;
28 }
29
30 @Override
31 public BigDecimal getCost() {
32 return cost;
33 }
34
35 protected void setCost(BigDecimal cost) {
36 this.cost = cost;
37 }
38
39 @Override
40 public BigDecimal getAPR() {
41 return apr;
42 }
43
44 protected void setAPR( BigDecimal apr ) {
45 this.apr = apr;
46 }
47
48 @Override
49 public String getName() {
50 return name;
51 }
52
53 protected void setName(String name) {
54 this.name = name;
55 }
56 }