View Javadoc

    1   /*
    2    * joey-gen and its relative products are published under the terms
    3    * of the Apache Software License.
    4    *
    5    * Created on 2004/11/09 10:04:19
    6    */
    7   package org.asyrinx.joey.gen.model.java;
    8
    9   import org.apache.commons.lang.enum.Enum;
    10
    11  /***
    12   * @author takeshi
    13   */
    14  public class TypeCategory extends Enum {
    15
    16      /***
    17       * @param name
    18       */
    19      public TypeCategory(String name) {
    20          super(name);
    21      }
    22
    23      public String getDefaultValue() {
    24          return "null";
    25      }
    26
    27      public static final TypeCategory STRING = new TypeCategory("string");
    28
    29      public static final TypeCategory NUMBER = new TypeCategory("number") {
    30          public String getDefaultValue() {
    31              return "0";
    32          }
    33      };
    34
    35      public static final TypeCategory DATE = new TypeCategory("date");
    36
    37      public static final TypeCategory BOOLEAN = new TypeCategory("boolean") {
    38          public String getDefaultValue() {
    39              return "false";
    40          }
    41      };
    42
    43      public static final TypeCategory ENUM = new TypeCategory("enum");
    44
    45      public static final TypeCategory OTHERS = new TypeCategory("others");
    46
    47  }