1 package org.lsst.ccs.bus;
2
3 import java.io.Serializable;
4
5
6
7
8
9
10
11
12
13
14 public class DataStatus_Deprecated extends Status {
15
16
17 private static final long serialVersionUID = 5352206331036348142L;
18 protected Object value ;
19
20
21
22
23 protected DataStatus_Deprecated() {
24
25 }
26
27
28
29
30
31 public DataStatus_Deprecated(Serializable serializable){
32 this.value = new ObjectNType(serializable) ;
33 }
34
35
36
37
38
39
40 public DataStatus_Deprecated(Class clazz, Serializable serializable){
41 this.value = new ObjectNType(clazz, serializable) ;
42 }
43
44 public DataStatus_Deprecated(int intValue) {
45 this.value = new ObjectNType(intValue) ;
46 }
47 public DataStatus_Deprecated(double doubleValue) {
48 this.value = new ObjectNType(doubleValue) ;
49 }
50 public DataStatus_Deprecated(float floatValue) {
51 this.value = new ObjectNType(floatValue) ;
52 }
53 public DataStatus_Deprecated(char charValue) {
54 this.value = new ObjectNType(charValue) ;
55 }
56
57
58
59
60
61
62 public boolean isOfWellKnownType() {
63 if(value instanceof ObjectNType) {
64 return ((ObjectNType)value).isOfWellKnownType();
65 }
66
67 return false ;
68 }
69
70
71
72
73
74
75 public boolean isOfPrimitiveType() {
76 if(value instanceof ObjectNType) {
77 return ((ObjectNType)value).isOfPrimitiveType();
78 }
79
80 return false ;
81 }
82
83
84
85
86
87
88
89
90
91 public String getDataClassName() {
92 if(value instanceof ObjectNType) {
93 return ((ObjectNType)value).getClassName();
94 }
95 if(value == null) return null ;
96 return value.getClass().getCanonicalName() ;
97 }
98
99
100
101
102
103
104 public Object getData() throws ClassNotFoundException {
105 if(value instanceof ObjectNType) {
106 return ((ObjectNType)value).getData() ;
107 }
108 return value ;
109 }
110
111 protected String contentString() {
112 return String.valueOf(value) ;
113 }
114 public String toString() {
115 return super.toString() + " = "+ contentString() ;
116 }
117
118
119 }