1 | |
package org.kuali.rice.kew.api.document.attribute; |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
import javax.xml.bind.annotation.XmlAccessType; |
8 | |
import javax.xml.bind.annotation.XmlAccessorType; |
9 | |
import javax.xml.bind.annotation.XmlElement; |
10 | |
import javax.xml.bind.annotation.XmlRootElement; |
11 | |
import javax.xml.bind.annotation.XmlType; |
12 | |
import java.math.BigInteger; |
13 | |
|
14 | 0 | @XmlRootElement(name = DocumentAttributeInteger.Constants.ROOT_ELEMENT_NAME) |
15 | |
@XmlAccessorType(XmlAccessType.NONE) |
16 | |
@XmlType(name = DocumentAttributeInteger.Constants.TYPE_NAME, propOrder = { |
17 | |
DocumentAttributeInteger.Elements.VALUE |
18 | |
}) |
19 | |
public final class DocumentAttributeInteger extends DocumentAttribute<BigInteger> { |
20 | |
|
21 | |
@XmlElement(name = Elements.VALUE, required = false) |
22 | |
private final BigInteger value; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | 0 | private DocumentAttributeInteger() { |
28 | 0 | this.value = null; |
29 | 0 | } |
30 | |
|
31 | |
public DocumentAttributeInteger(String name, BigInteger value) { |
32 | 0 | super(name); |
33 | 0 | this.value = value; |
34 | 0 | } |
35 | |
|
36 | |
public static DocumentAttributeInteger create(String name, BigInteger value) { |
37 | 0 | return new DocumentAttributeInteger(name, value); |
38 | |
} |
39 | |
|
40 | |
@Override |
41 | |
public BigInteger getValue() { |
42 | 0 | return value; |
43 | |
} |
44 | |
|
45 | |
@Override |
46 | |
public DocumentAttributeDataType getDataType() { |
47 | 0 | return DocumentAttributeDataType.INTEGER; |
48 | |
} |
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | 0 | static class Constants { |
54 | |
final static String ROOT_ELEMENT_NAME = "documentAttributeInteger"; |
55 | |
final static String TYPE_NAME = "DocumentAttributeIntegerType"; |
56 | |
} |
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | 0 | static class Elements { |
62 | |
final static String VALUE = "value"; |
63 | |
} |
64 | |
|
65 | |
} |