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 void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
|
public int | addPropertyElement(boolean value)
return this.addValue(PROPERTY, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
|
public void | dump(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.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("ResourceAdapter\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
|
public java.lang.String | getDescription()
return (String)this.getValue(DESCRIPTION);
|
public java.lang.String | getIdleTimeoutInSeconds()
return getAttributeValue(IDLETIMEOUTINSECONDS);
|
public java.lang.String | getJndiName()
return getAttributeValue(JNDINAME);
|
public java.lang.String | getMaxPoolSize()
return getAttributeValue(MAXPOOLSIZE);
|
public java.lang.String | getMaxWaitTimeInMillis()
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.String | getPropertyElementName(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.String | getPropertyElementValue(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.String | getSteadyPoolSize()
return getAttributeValue(STEADYPOOLSIZE);
|
void | initialize(int options)
|
public boolean | isPropertyElement(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 void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
|
public int | removePropertyElement(boolean value)
return this.removeValue(PROPERTY, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
|
public void | removePropertyElement(int index)
this.removeValue(PROPERTY, index);
|
public void | setDescription(java.lang.String value)
this.setValue(DESCRIPTION, value);
|
public void | setIdleTimeoutInSeconds(java.lang.String value)
setAttributeValue(IDLETIMEOUTINSECONDS, value);
|
public void | setJndiName(java.lang.String value)
setAttributeValue(JNDINAME, value);
|
public void | setMaxPoolSize(java.lang.String value)
setAttributeValue(MAXPOOLSIZE, value);
|
public void | setMaxWaitTimeInMillis(java.lang.String value)
setAttributeValue(MAXWAITTIMEINMILLIS, value);
|
public void | setPropertyElement(int index, boolean value)
this.setValue(PROPERTY, index, (value ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE));
|
public void | setPropertyElement(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 void | setPropertyElementName(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 void | setPropertyElementValue(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 void | setSteadyPoolSize(java.lang.String value)
setAttributeValue(STEADYPOOLSIZE, value);
|
public int | sizePropertyElement()
return this.size(PROPERTY);
|
public void | validate()
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
|