FileDocCategorySizeDatePackage
ObjectEight.javaAPI DocGlassfish v2 API13552Fri May 04 22:35:20 BST 2007com.sun.enterprise.tools.common.validation.samples.simple.beans

ObjectEight

public class ObjectEight extends org.netbeans.modules.schema2beans.BaseBean
This generated bean class ObjectEight matches the schema element object-eight Generated on Wed Aug 20 09:25:27 PDT 2003

Fields Summary
static Vector
comparators
public static final String
PROPERTY_ONE
public static final String
PROPERTY_TWO
public static final String
CHILD_OBJECT_ONE
public static final String
CHILD_OBJECT_TWO
public static final String
CHILD_OBJECT_THREE
public static final String
CHILD_OBJECT_FOUR
Constructors Summary
public ObjectEight()

	// NOI18N

	  
		this(Common.USE_DEFAULT_VALUES);
	
public ObjectEight(int options)

		super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
		// Properties (see root bean comments for the bean graph)
		this.createProperty("property-one", 	// NOI18N
			PROPERTY_ONE, 
			Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("property-two", 	// NOI18N
			PROPERTY_TWO, 
			Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("child-object-one", 	// NOI18N
			CHILD_OBJECT_ONE, 
			Common.TYPE_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ChildObjectOne.class);
		this.createProperty("child-object-two", 	// NOI18N
			CHILD_OBJECT_TWO, 
			Common.TYPE_0_1 | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ChildObjectTwo.class);
		this.createProperty("child-object-three", 	// NOI18N
			CHILD_OBJECT_THREE, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ChildObjectThree.class);
		this.createProperty("child-object-four", 	// NOI18N
			CHILD_OBJECT_FOUR, 
			Common.TYPE_1_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			ChildObjectFour.class);
		this.initialize(options);
	
Methods Summary
public intaddChildObjectFour(com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectFour value)

		return this.addValue(CHILD_OBJECT_FOUR, value);
	
public intaddChildObjectThree(com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectThree value)

		return this.addValue(CHILD_OBJECT_THREE, value);
	
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public voiddump(java.lang.StringBuffer str, java.lang.String indent)

		String s;
		Object o;
		org.netbeans.modules.schema2beans.BaseBean n;
		str.append(indent);
		str.append("PropertyOne");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		s = this.getPropertyOne();
		str.append((s==null?"null":s.trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(PROPERTY_ONE, 0, str, indent);

		str.append(indent);
		str.append("PropertyTwo");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		s = this.getPropertyTwo();
		str.append((s==null?"null":s.trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(PROPERTY_TWO, 0, str, indent);

		str.append(indent);
		str.append("ChildObjectOne");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getChildObjectOne();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(CHILD_OBJECT_ONE, 0, str, indent);

		str.append(indent);
		str.append("ChildObjectTwo");	// NOI18N
		n = (org.netbeans.modules.schema2beans.BaseBean) this.getChildObjectTwo();
		if (n != null)
			n.dump(str, indent + "\t");	// NOI18N
		else
			str.append(indent+"\tnull");	// NOI18N
		this.dumpAttributes(CHILD_OBJECT_TWO, 0, str, indent);

		str.append(indent);
		str.append("ChildObjectThree["+this.sizeChildObjectThree()+"]");	// NOI18N
		for(int i=0; i<this.sizeChildObjectThree(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getChildObjectThree(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(CHILD_OBJECT_THREE, i, str, indent);
		}

		str.append(indent);
		str.append("ChildObjectFour["+this.sizeChildObjectFour()+"]");	// NOI18N
		for(int i=0; i<this.sizeChildObjectFour(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getChildObjectFour(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(CHILD_OBJECT_FOUR, i, str, indent);
		}

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("ObjectEight\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectFourgetChildObjectFour(int index)

		return (ChildObjectFour)this.getValue(CHILD_OBJECT_FOUR, index);
	
public com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectFour[]getChildObjectFour()

		return (ChildObjectFour[])this.getValues(CHILD_OBJECT_FOUR);
	
public ChildObjectOnegetChildObjectOne()

		return (ChildObjectOne)this.getValue(CHILD_OBJECT_ONE);
	
public com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectThreegetChildObjectThree(int index)

		return (ChildObjectThree)this.getValue(CHILD_OBJECT_THREE, index);
	
public com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectThree[]getChildObjectThree()

		return (ChildObjectThree[])this.getValues(CHILD_OBJECT_THREE);
	
public ChildObjectTwogetChildObjectTwo()

		return (ChildObjectTwo)this.getValue(CHILD_OBJECT_TWO);
	
public java.lang.StringgetPropertyOne()

		return (String)this.getValue(PROPERTY_ONE);
	
public java.lang.StringgetPropertyTwo()

		return (String)this.getValue(PROPERTY_TWO);
	
voidinitialize(int options)

		
	
public intremoveChildObjectFour(com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectFour value)

		return this.removeValue(CHILD_OBJECT_FOUR, value);
	
public intremoveChildObjectThree(com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectThree value)

		return this.removeValue(CHILD_OBJECT_THREE, value);
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public voidsetChildObjectFour(int index, com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectFour value)

		this.setValue(CHILD_OBJECT_FOUR, index, value);
	
public voidsetChildObjectFour(com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectFour[] value)

		this.setValue(CHILD_OBJECT_FOUR, value);
	
public voidsetChildObjectOne(ChildObjectOne value)

		this.setValue(CHILD_OBJECT_ONE, value);
	
public voidsetChildObjectThree(int index, com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectThree value)

		this.setValue(CHILD_OBJECT_THREE, index, value);
	
public voidsetChildObjectThree(com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectThree[] value)

		this.setValue(CHILD_OBJECT_THREE, value);
	
public voidsetChildObjectTwo(ChildObjectTwo value)

		this.setValue(CHILD_OBJECT_TWO, value);
	
public voidsetPropertyOne(java.lang.String value)

		this.setValue(PROPERTY_ONE, value);
	
public voidsetPropertyTwo(java.lang.String value)

		this.setValue(PROPERTY_TWO, value);
	
public intsizeChildObjectFour()

		return this.size(CHILD_OBJECT_FOUR);
	
public intsizeChildObjectThree()

		return this.size(CHILD_OBJECT_THREE);
	
public voidvalidate()

		boolean restrictionFailure = false;
		// Validating property propertyOne
		if (getPropertyOne() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getPropertyOne() == null", "propertyOne", this);	// NOI18N
		}
		// Validating property propertyTwo
		if (getPropertyTwo() != null) {
		}
		// Validating property childObjectOne
		if (getChildObjectOne() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getChildObjectOne() == null", "childObjectOne", this);	// NOI18N
		}
		getChildObjectOne().validate();
		// Validating property childObjectTwo
		if (getChildObjectTwo() != null) {
			getChildObjectTwo().validate();
		}
		// Validating property childObjectThree
		for (int _index = 0; _index < sizeChildObjectThree(); ++_index) {
			com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectThree element = getChildObjectThree(_index);
			if (element != null) {
				element.validate();
			}
		}
		// Validating property childObjectFour
		if (sizeChildObjectFour() == 0) {
			throw new org.netbeans.modules.schema2beans.ValidateException("sizeChildObjectFour() == 0", "childObjectFour", this);	// NOI18N
		}
		for (int _index = 0; _index < sizeChildObjectFour(); ++_index) {
			com.sun.enterprise.tools.common.validation.samples.simple.beans.ChildObjectFour element = getChildObjectFour(_index);
			if (element != null) {
				element.validate();
			}
		}