public boolean isBoolean() { return Common.isBoolean(this.type); }
public void setValue(String value) { Object v = value; if (Common.isBoolean(this.type)) v = Boolean.valueOf(value); if (this.index != -1) this.root.setValueById(this.name, this.index, v); else this.root.setValue(this.name, v); }
/** * @param withIndexedParameter whether or not this getter * is going to be called with an index as a parameter. * @return the method to be called to do a read. */ public String getReadMethod(boolean withIndexParameter) { if (!withIndexParameter && isIndexed()) return "get"+name; else if (isScalar() && Common.isBoolean(type)) return "is"+name; else return "get"+name; }
protected String testIfPropertySet(Property prop) { if (!prop.isAttribute() && prop.isScalar() && !Common.isBoolean(prop.type)) return "getValue("+prop.constName+") != null"; else return super.testIfPropertySet(prop); }
protected String testIfPropertyNotSet(Property prop) { if (!prop.isAttribute() && prop.isScalar() && !Common.isBoolean(prop.type)) return "getValue("+prop.constName+") == null"; else return super.testIfPropertyNotSet(prop); } }
bean.setGraphManager(prop.bean.graphManager()); bean.syncNodes(a); } else if (Common.isBoolean(prop.type)) { boolean v = false;
if (!Common.isBoolean(a.type)) { select(CONSTRUCTOR_SECTION); gen("Common.TYPE_1"); jw.beginIf("size("+attributeOwner.constName+") == 0"); String valueToSetTo = "\"\""; // The empty string. if (Common.isBoolean(attributeOwner.type) && attributeOwner.getCanBeEmpty()) valueToSetTo = "java.lang.Boolean.TRUE"; if (attributeOwner.isIndexed()) { if (Common.isBoolean(attributeOwner.type) && attributeOwner.getCanBeEmpty() && attributeOwner.isIndexed()) { jw.write("setValue(", attributeOwner.constName); jw.write(", index"); PC(); eol(); gencr("if (ret == null)"); if (this.config.isScalarException() && !Common.isBoolean(a.type)) { if (this.config.isStandalone()) { tabIn(); gencr("for (int i=0; i<value.length; i++)"); gentab(1); if (!config.isForME() && Common.isBoolean(a.type)) gen("values[i] = (value[i] ? Boolean.TRUE : Boolean.FALSE)"); else if (isScalar && config.isScalarException() && !Common.isBoolean(a.type)) { gen("if (this.getValue("); gen(constName);