FileDocCategorySizeDatePackage
ResourceAdapter.javaAPI DocGlassfish v2 API13967Fri May 04 22:34:40 BST 2007com.sun.enterprise.tools.common.dd.connector

ResourceAdapter

public class ResourceAdapter extends com.sun.enterprise.tools.common.dd.SunBaseBean
This generated bean class ResourceAdapter matches the schema element resource-adapter Generated on Thu Jul 31 18:16:39 PDT 2003

Fields Summary
static Vector
comparators
public static final String
JNDINAME
public static final String
MAXPOOLSIZE
public static final String
STEADYPOOLSIZE
public static final String
MAXWAITTIMEINMILLIS
public static final String
IDLETIMEOUTINSECONDS
public static final String
DESCRIPTION
public static final String
PROPERTY
public static final String
PROPERTYELEMENTNAME
public static final String
PROPERTYELEMENTVALUE
Constructors Summary
public ResourceAdapter()

	// NOI18N

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

		super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
		// Properties (see root bean comments for the bean graph)
		this.createProperty("description", 	// NOI18N
			DESCRIPTION, 
			Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("property", 	// NOI18N
			PROPERTY, 
			Common.TYPE_0_N | Common.TYPE_BOOLEAN | Common.TYPE_KEY, 
			Boolean.class);
		this.createAttribute(PROPERTY, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(PROPERTY, "value", "Value", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddPropertyElement(boolean value)

		return this.addValue(PROPERTY, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
	
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("Description");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		s = this.getDescription();
		str.append((s==null?"null":s.trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(DESCRIPTION, 0, str, indent);

		str.append(indent);
		str.append("PropertyElement["+this.sizePropertyElement()+"]");	// NOI18N
		for(int i=0; i<this.sizePropertyElement(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			str.append(indent+"\t");	// NOI18N
			str.append((this.isPropertyElement(i)?"true":"false"));
			this.dumpAttributes(PROPERTY, i, str, indent);
		}

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("ResourceAdapter\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public java.lang.StringgetDescription()

		return (String)this.getValue(DESCRIPTION);
	
public java.lang.StringgetIdleTimeoutInSeconds()

		return getAttributeValue(IDLETIMEOUTINSECONDS);
	
public java.lang.StringgetJndiName()

		return getAttributeValue(JNDINAME);
	
public java.lang.StringgetMaxPoolSize()

		return getAttributeValue(MAXPOOLSIZE);
	
public java.lang.StringgetMaxWaitTimeInMillis()

		return getAttributeValue(MAXWAITTIMEINMILLIS);
	
public boolean[]getPropertyElement()

		boolean[] ret = null;
		Boolean[] values = (Boolean[])this.getValues(PROPERTY);
		if (values != null)
		{
			ret = new boolean[values.length];
			for (int i=0; i<values.length; i++)
				ret[i] = values[i].booleanValue();
		}
		return ret;
	
public java.lang.StringgetPropertyElementName(int index)

		// If our element does not exist, then the attribute does not exist.
		if (size(PROPERTY) == 0) {
			return null;
		} else {
			return getAttributeValue(PROPERTY, index, "Name");
		}
	
public java.lang.StringgetPropertyElementValue(int index)

		// If our element does not exist, then the attribute does not exist.
		if (size(PROPERTY) == 0) {
			return null;
		} else {
			return getAttributeValue(PROPERTY, index, "Value");
		}
	
public java.lang.StringgetSteadyPoolSize()

		return getAttributeValue(STEADYPOOLSIZE);
	
voidinitialize(int options)

		
	
public booleanisPropertyElement(int index)

		Boolean ret = (Boolean)this.getValue(PROPERTY, index);
		if (ret == null)
			ret = (Boolean)Common.defaultScalarValue(Common.TYPE_BOOLEAN);
		return ((java.lang.Boolean)ret).booleanValue();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremovePropertyElement(boolean value)

		return this.removeValue(PROPERTY, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
	
public voidremovePropertyElement(int index)

		this.removeValue(PROPERTY, index);
	
public voidsetDescription(java.lang.String value)

		this.setValue(DESCRIPTION, value);
	
public voidsetIdleTimeoutInSeconds(java.lang.String value)

		setAttributeValue(IDLETIMEOUTINSECONDS, value);
	
public voidsetJndiName(java.lang.String value)

		setAttributeValue(JNDINAME, value);
	
public voidsetMaxPoolSize(java.lang.String value)

		setAttributeValue(MAXPOOLSIZE, value);
	
public voidsetMaxWaitTimeInMillis(java.lang.String value)

		setAttributeValue(MAXWAITTIMEINMILLIS, value);
	
public voidsetPropertyElement(int index, boolean value)

		this.setValue(PROPERTY, index, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
	
public voidsetPropertyElement(boolean[] value)

		Boolean[] values = null;
		if (value != null)
		{
			values = new Boolean[value.length];
			for (int i=0; i<value.length; i++)
				values[i] = new Boolean(value[i]);
		}
		this.setValue(PROPERTY, values);
	
public voidsetPropertyElementName(int index, java.lang.String value)

		// Make sure we've got a place to put this attribute.
		if (size(PROPERTY) == 0) {
			addValue(PROPERTY, "");
		}
		setAttributeValue(PROPERTY, index, "Name", value);
	
public voidsetPropertyElementValue(int index, java.lang.String value)

		// Make sure we've got a place to put this attribute.
		if (size(PROPERTY) == 0) {
			addValue(PROPERTY, "");
		}
		setAttributeValue(PROPERTY, index, "Value", value);
	
public voidsetSteadyPoolSize(java.lang.String value)

		setAttributeValue(STEADYPOOLSIZE, value);
	
public intsizePropertyElement()

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

		boolean restrictionFailure = false;
		// Validating property jndiName
		if (getJndiName() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getJndiName() == null", "jndiName", this);	// NOI18N
		}
		// Validating property maxPoolSize
		if (getMaxPoolSize() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getMaxPoolSize() == null", "maxPoolSize", this);	// NOI18N
		}
		// Validating property steadyPoolSize
		if (getSteadyPoolSize() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getSteadyPoolSize() == null", "steadyPoolSize", this);	// NOI18N
		}
		// Validating property maxWaitTimeInMillis
		if (getMaxWaitTimeInMillis() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getMaxWaitTimeInMillis() == null", "maxWaitTimeInMillis", this);	// NOI18N
		}
		// Validating property idleTimeoutInSeconds
		if (getIdleTimeoutInSeconds() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getIdleTimeoutInSeconds() == null", "idleTimeoutInSeconds", this);	// NOI18N
		}
		// Validating property description
		if (getDescription() != null) {
		}
		// Validating property propertyElement
		for (int _index = 0; _index < sizePropertyElement(); ++_index) {
			boolean element = isPropertyElement(_index);
		}
		// Validating property propertyElementName
		// Validating property propertyElementValue