Source code: com/gammastream/validity/GSVEOAttribute.java
1 package com.gammastream.validity;
2
3 import com.webobjects.foundation.*;
4 import com.webobjects.appserver.*;
5 import com.webobjects.eocontrol.*;
6 import com.webobjects.eoaccess.*;
7
8
9 public class GSVEOAttribute {
10
11 private GSVEOEntity entity = null;
12 private NSDictionary attribute = null;
13 private String name = null;
14 private String allowsNull = null;
15 private String columnName = null;
16 private String externalType = null;
17 private String valueClassName = null;
18 private Integer width = null;
19 private String valueType = null;
20
21 public GSVEOAttribute(GSVEOEntity e, NSDictionary n){
22 entity = e;
23 attribute = n;
24 }
25
26 public String name(){
27 if(name != null)
28 return name;
29 name = (String)attribute.objectForKey("name");
30 return name;
31 }
32
33 public Integer width(){
34 if(width != null)
35 return width;
36 String temp = (String)attribute.objectForKey("width");
37 if(temp!=null)
38 width = new Integer(temp);
39 else
40 width = new Integer(0);
41 return width;
42 }
43
44 public String valueType(){
45 if(valueType!= null)
46 return valueType;
47 valueType = (String)attribute.objectForKey("valueType");
48 return valueType;
49 }
50
51 public String allowsNull(){
52 if(allowsNull != null)
53 return allowsNull;
54 allowsNull = (String)attribute.objectForKey("allowsNull");
55 return allowsNull;
56 }
57
58 public String columnName(){
59 if(columnName != null)
60 return columnName;
61 columnName = (String)attribute.objectForKey("columnName");
62 return columnName;
63 }
64
65 public String externalType(){
66 if(externalType != null)
67 return externalType;
68 externalType = (String)attribute.objectForKey("externalType");
69 return externalType;
70 }
71
72 public String valueClassName(){
73 if(valueClassName != null)
74 return valueClassName;
75 valueClassName = (String)attribute.objectForKey("valueClassName");
76 return valueClassName;
77 }
78
79 public GSVEOEntity entity(){
80 return entity;
81 }
82
83
84 }