View Javadoc

1   /* ==========================================================================
2    * Copyright 2002-2005 Cyclops Group Community
3    *
4    * Licensed under the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE
5    * (CDDL) Version 1.0 (the "License");
6    * you may not use this file except in compliance with the License.
7    * You may obtain a copy of the License at
8    *
9    *      http://www.opensource.org/licenses/cddl1.txt
10   *
11   *  Unless required by applicable law or agreed to in writing, software
12   *  distributed under the License is distributed on an "AS IS" BASIS,
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   *  See the License for the specific language governing permissions and
15   *  limitations under the License.
16   * =========================================================================
17   */
18  package com.cyclopsgroup.courselist.entity;
19  
20  import org.apache.commons.lang.enums.Enum;
21  
22  /***
23   * @author <a href="mailto:jiaqi.guo@gmail.com">Jiaqi Guo</a>
24   *
25   * Course status
26   */
27  public final class CourseStatus
28      extends Enum
29  {
30      /*** Dropped course */
31      public static CourseStatus DROPPED = new CourseStatus( "dropped" );
32  
33      /*** Finished status */
34      public static CourseStatus FINISHED = new CourseStatus( "finished" );
35  
36      /*** No status */
37      public static CourseStatus NONE = new CourseStatus( "none" );
38  
39      /***Taking status */
40      public static CourseStatus TAKING = new CourseStatus( "taking" );
41  
42      /***
43       * Get instance from value
44       *
45       * @param value Value
46       * @return Instance or null
47       */
48      public static CourseStatus valueOf( String value )
49      {
50          return (CourseStatus) getEnum( CourseStatus.class, value );
51      }
52  
53      private CourseStatus( String value )
54      {
55          super( value );
56      }
57  }