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 2005/02/25 20:24:48
    6    */
    7   package org.asyrinx.joey.gen.model.java.classes;
    8
    9   import org.asyrinx.joey.gen.model.EnumerationEntry;
    10  import org.asyrinx.joey.gen.model.java.JavaEnumeration;
    11  import org.asyrinx.joey.gen.model.java.TypeCategory;
    12  import org.asyrinx.joey.gen.model.rdb.RdbEnumeration;
    13
    14  /***
    15   * @author takeshi
    16   */
    17  public class JoeyClass extends EmbeddedClass {
    18
    19      /***
    20       * @param packageName
    21       * @param className
    22       * @param category
    23       */
    24      publicJoeyClass(String packageName, String className, TypeCategory category) {/package-summary.html">ong> JoeyClass(String packageName, String className, TypeCategory category) {
    25          super(packageName, className, category);
    26      }
    27
    28      public static final RdbEnumeration RDB_BOOLEAN_ENUM = createRdbBooleanEnum();
    29
    30      private static RdbEnumeration createRdbBooleanEnum() {
    31          final RdbEnumeration result = new RdbEnumeration();
    32          result.setName("BooleanEnum");
    33          result.setValueType("INTEGER");
    34          result.setLabel("BOOLEAN");
    35          new EnumerationEntry(result, "0", "false", "false");
    36          new EnumerationEntry(result, "1", "true", "true");
    37          return result;
    38      }
    39
    40      public static final JavaEnumeration JAVA_BOOLEAN_ENUM = createJavaBooleanEnum();
    41
    42      private static JavaEnumeration createJavaBooleanEnum() {
    43          final JavaEnumeration result = new JavaEnumeration();
    44          result.setName("BooleanEnum");
    45          result.setPackageName("org.asyrinx.brownie.core.lang.enum.util");
    46          result.setValueType("int");
    47          result.setValueTypeObj(PrimitiveType.INT);
    48          result.setLabel("BOOLEAN");
    49          result.setOriginal(RDB_BOOLEAN_ENUM);
    50          new EnumerationEntry(result, "0", "false", "false");
    51          new EnumerationEntry(result, "1", "true", "true");
    52          return result;
    53      }
    54
    55  }