Package org.dmd.dms.types

Examples of org.dmd.dms.types.EnumValue


    public EnumValue del(Object v){
        synchronized(this){
            if (value == null)
                return(null);
   
            EnumValue key = null;
            EnumValue rc = null;
            try {
                key = typeCheck(v);
            } catch (DmcValueException e) {
                throw(new IllegalStateException("Incompatible type passed to del():" + getName(),e));
            }
View Full Code Here


                throw(new IllegalStateException("Attribute: " + getAttributeInfo().name + " is not indexed. You can't use setMVnth()."));
           
            if ( (index < 0) || (index >= getAttributeInfo().indexSize))
                throw(new IllegalStateException("Index " + index + " for attribute: " + getAttributeInfo().name + " is out of range: 0 <= index < " + getAttributeInfo().indexSize));
           
            EnumValue rc = null;
           
            if (v != null)
                rc = typeCheck(v);
           
            if (value == null){
View Full Code Here

        synchronized(this){
            if (value == null)
                return(false);

            try {
                EnumValue val = typeCheck(v);
                return(value.contains(val));
            } catch (DmcValueException e) {
                return(false);
            }
        }
View Full Code Here

    StringBuffer sb = new StringBuffer();
    HashSet<String>  skip = getSkipEnumValueCopy();
   
    Iterator<EnumValue> values = edef.getEnumValue();
    while(values.hasNext()){
      EnumValue value = values.next();
     
      if ( (skip != null) && (skip.contains(value.getName())))
        continue;
     
      sb.append("    public final GxtEnumValue ");
      sb.append(value.getName());
      sb.append(" = new GxtEnumValue(");
      sb.append("\"" + value.getName() + "\", ");
      sb.append(value.getId() + ", ");
      sb.append("\"" + sortPad(value.getId()) + "\", ");
      if (isUseNameAsLabel())
        sb.append("\"" + value.getName() + "\");\n");
      else if (value.getLabel() == null)
        sb.append("\"" + value.getDescription() + "\");\n");
      else
        sb.append("\"" + value.getLabel() + "\");\n");
       
    }
   
    return(sb.toString());
  }
View Full Code Here

    sb.append("    ArrayList<GxtEnumValue> mapping;\n\n");
    sb.append("    protected " + name + "(){\n");
    sb.append("        mapping = new ArrayList<GxtEnumValue>();\n");
    Iterator<EnumValue> values = edef.getEnumValue();
    while(values.hasNext()){
      EnumValue value = values.next();
     
      if ( (skip != null) && (skip.contains(value.getName())))
        continue;
     
      sb.append("        mapping.add(" + value.getName() + ");\n");
    }
    sb.append("    }\n\n");
   
    sb.append("    static public " + name + " instance(){\n");
    sb.append("        if (instance == null)\n");
View Full Code Here

TOP

Related Classes of org.dmd.dms.types.EnumValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.