001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 0.9.5.2</a>, using an XML
004: * Schema.
005: * $Id: TransportGuaranteeType.java 6385 2007-10-25 14:02:26Z wehrens $
006: */
007:
008: package org.gridsphere.portletcontainer.impl.descriptor.types;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import java.util.Hashtable;
015:
016: /**
017: * Class TransportGuaranteeType.
018: *
019: * @version $Revision: 3298 $ $Date: 2004-06-29 07:19:44 -0700 (Tue, 29 Jun 2004) $
020: */
021: public class TransportGuaranteeType implements java.io.Serializable {
022:
023: //--------------------------/
024: //- Class/Member Variables -/
025: //--------------------------/
026:
027: /**
028: * The NONE type
029: */
030: public static final int NONE_TYPE = 0;
031:
032: /**
033: * The instance of the NONE type
034: */
035: public static final TransportGuaranteeType NONE = new TransportGuaranteeType(
036: NONE_TYPE, "NONE");
037:
038: /**
039: * The INTEGRAL type
040: */
041: public static final int INTEGRAL_TYPE = 1;
042:
043: /**
044: * The instance of the INTEGRAL type
045: */
046: public static final TransportGuaranteeType INTEGRAL = new TransportGuaranteeType(
047: INTEGRAL_TYPE, "INTEGRAL");
048:
049: /**
050: * The CONFIDENTIAL type
051: */
052: public static final int CONFIDENTIAL_TYPE = 2;
053:
054: /**
055: * The instance of the CONFIDENTIAL type
056: */
057: public static final TransportGuaranteeType CONFIDENTIAL = new TransportGuaranteeType(
058: CONFIDENTIAL_TYPE, "CONFIDENTIAL");
059:
060: /**
061: * Field _memberTable
062: */
063: private static java.util.Hashtable _memberTable = init();
064:
065: /**
066: * Field type
067: */
068: private int type = -1;
069:
070: /**
071: * Field stringValue
072: */
073: private java.lang.String stringValue = null;
074:
075: //----------------/
076: //- Constructors -/
077: //----------------/
078: public TransportGuaranteeType() {
079: this .type = NONE_TYPE;
080: this .stringValue = "NONE";
081: }
082:
083: private TransportGuaranteeType(int type, java.lang.String value) {
084: super ();
085: this .type = type;
086: this .stringValue = value;
087: } //-- org.gridsphere.portletcontainer.jsr.descriptor.types.TransportGuaranteeType(int, java.lang.String)
088:
089: //-----------/
090: //- Methods -/
091: //-----------/
092:
093: /**
094: * Method enumerateReturns an enumeration of all possible
095: * instances of TransportGuaranteeType
096: */
097: public static java.util.Enumeration enumerate() {
098: return _memberTable.elements();
099: } //-- java.util.Enumeration enumerate()
100:
101: /**
102: * Method getTypeReturns the type of this TransportGuaranteeType
103: */
104: public int getType() {
105: return this .type;
106: } //-- int getType()
107:
108: /**
109: * Method init
110: */
111: private static java.util.Hashtable init() {
112: Hashtable members = new Hashtable();
113: members.put("NONE", NONE);
114: members.put("INTEGRAL", INTEGRAL);
115: members.put("CONFIDENTIAL", CONFIDENTIAL);
116: return members;
117: } //-- java.util.Hashtable init()
118:
119: /**
120: * Returns the value of field 'content'. The field 'content'
121: * has the following description: internal content storage
122: *
123: * @return the value of field 'content'.
124: */
125: public java.lang.String getContent() {
126: return this .stringValue;
127: } //-- java.lang.String getContent()
128:
129: /**
130: * Sets the value of field 'content'. The field 'content' has
131: * the following description: internal content storage
132: *
133: * @param stringValue the value of field 'content'.
134: */
135: public void setContent(java.lang.String stringValue) {
136: this .stringValue = stringValue;
137: } //-- void setContent(java.lang.String)
138:
139: /**
140: * Method toStringReturns the String representation of this
141: * TransportGuaranteeType
142: */
143: public java.lang.String toString() {
144: return this .stringValue;
145: } //-- java.lang.String toString()
146:
147: /**
148: * Method valueOfReturns a new TransportGuaranteeType based on
149: * the given String value.
150: *
151: * @param string
152: */
153: public static org.gridsphere.portletcontainer.impl.descriptor.types.TransportGuaranteeType valueOf(
154: java.lang.String string) {
155: java.lang.Object obj = null;
156: if (string != null)
157: obj = _memberTable.get(string);
158: if (obj == null) {
159: String err = "'" + string
160: + "' is not a valid TransportGuaranteeType";
161: throw new IllegalArgumentException(err);
162: }
163: return (TransportGuaranteeType) obj;
164: } //-- org.gridsphere.portletcontainer.jsr.descriptor.types.TransportGuaranteeType valueOf(java.lang.String)
165:
166: }
|