1 package com.leonarduk.clearcheckbook.dto;
2
3 import java.util.Map;
4
5 /***
6 *
7 *
8 *
9 * @author Stephen Leonard
10 * @since 28 Jan 2014
11 *
12 * @version $Author:: $: Author of last commit
13 * @version $Rev:: $: Revision of last commit
14 * @version $Date:: $: Date of last commit
15 *
16 */
17 public class PremiumDataType extends AbstractDataType<PremiumDataType> {
18
19 enum Fields {
20 MEMO, STATUS, PAYEE, CHECK_NUM
21 }
22
23 @Override
24 protected Enum<?>[] getFields() {
25 return Fields.values();
26 }
27
28 public PremiumDataType(Map<String, String> map) {
29 super(map);
30 }
31
32 @Override
33 public String toString() {
34 return "PremiumDataType [hasMemo()=" + hasMemo() + ", hasPremium()="
35 + hasPremium() + ", hasPayee()=" + hasPayee()
36 + ", hasCheck_num()=" + hasCheck_num() + "]";
37 }
38
39 public boolean hasMemo() {
40 return Boolean.valueOf(getValue(Fields.MEMO));
41 }
42
43 public boolean hasPremium() {
44 return Boolean.valueOf(getValue(Fields.STATUS));
45 }
46
47 public boolean hasPayee() {
48 return Boolean.valueOf(getValue(Fields.PAYEE));
49 }
50
51 public boolean hasCheck_num() {
52 return Boolean.valueOf(getValue(Fields.CHECK_NUM));
53 }
54 }