ConstraintFieldpublic class ConstraintField extends com.sun.enterprise.tools.common.dd.SunBaseBean This generated bean class ConstraintField matches the schema element constraint-field
Generated on Tue Sep 02 18:08:42 PDT 2003 |
Fields Summary |
---|
static Vector | comparators | public static final String | NAME | public static final String | SCOPE | public static final String | CACHEONMATCH | public static final String | CACHEONMATCHFAILURE | public static final String | CONSTRAINT_FIELD_VALUE | public static final String | CONSTRAINTFIELDVALUEMATCHEXPR | public static final String | CONSTRAINTFIELDVALUECACHEONMATCH | public static final String | CONSTRAINTFIELDVALUECACHEONMATCHFAILURE |
Constructors Summary |
---|
public ConstraintField() // NOI18N
this(Common.USE_DEFAULT_VALUES);
| public ConstraintField(int options)
super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
// Properties (see root bean comments for the bean graph)
this.createProperty("constraint-field-value", // NOI18N
CONSTRAINT_FIELD_VALUE,
Common.TYPE_0_N | Common.TYPE_STRING | Common.TYPE_KEY,
String.class);
this.createAttribute(CONSTRAINT_FIELD_VALUE, "match-expr", "MatchExpr",
AttrProp.CDATA,
null, "equals");
this.createAttribute(CONSTRAINT_FIELD_VALUE, "cache-on-match", "CacheOnMatch",
AttrProp.CDATA,
null, "true");
this.createAttribute(CONSTRAINT_FIELD_VALUE, "cache-on-match-failure", "CacheOnMatchFailure",
AttrProp.CDATA,
null, "false");
this.initialize(options);
|
Methods Summary |
---|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public int | addConstraintFieldValue(java.lang.String value)
return this.addValue(CONSTRAINT_FIELD_VALUE, value);
| 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("ConstraintFieldValue["+this.sizeConstraintFieldValue()+"]"); // NOI18N
for(int i=0; i<this.sizeConstraintFieldValue(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
str.append(indent+"\t"); // NOI18N
str.append("<"); // NOI18N
s = this.getConstraintFieldValue(i);
str.append((s==null?"null":s.trim())); // NOI18N
str.append(">\n"); // NOI18N
this.dumpAttributes(CONSTRAINT_FIELD_VALUE, i, str, indent);
}
| public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("ConstraintField\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public java.lang.String | getCacheOnMatch()
return getAttributeValue(CACHEONMATCH);
| public java.lang.String | getCacheOnMatchFailure()
return getAttributeValue(CACHEONMATCHFAILURE);
| public java.lang.String | getConstraintFieldValue(int index)
return (String)this.getValue(CONSTRAINT_FIELD_VALUE, index);
| public java.lang.String[] | getConstraintFieldValue()
return (String[])this.getValues(CONSTRAINT_FIELD_VALUE);
| public java.lang.String | getConstraintFieldValueCacheOnMatch(int index)
// If our element does not exist, then the attribute does not exist.
if (size(CONSTRAINT_FIELD_VALUE) == 0) {
return null;
} else {
return getAttributeValue(CONSTRAINT_FIELD_VALUE, index, "CacheOnMatch");
}
| public java.lang.String | getConstraintFieldValueCacheOnMatchFailure(int index)
// If our element does not exist, then the attribute does not exist.
if (size(CONSTRAINT_FIELD_VALUE) == 0) {
return null;
} else {
return getAttributeValue(CONSTRAINT_FIELD_VALUE, index, "CacheOnMatchFailure");
}
| public java.lang.String | getConstraintFieldValueMatchExpr(int index)
// If our element does not exist, then the attribute does not exist.
if (size(CONSTRAINT_FIELD_VALUE) == 0) {
return null;
} else {
return getAttributeValue(CONSTRAINT_FIELD_VALUE, index, "MatchExpr");
}
| public java.lang.String | getName()
return getAttributeValue(NAME);
| public java.lang.String | getScope()
return getAttributeValue(SCOPE);
| void | initialize(int options)
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public int | removeConstraintFieldValue(java.lang.String value)
return this.removeValue(CONSTRAINT_FIELD_VALUE, value);
| public void | setCacheOnMatch(java.lang.String value)
setAttributeValue(CACHEONMATCH, value);
| public void | setCacheOnMatchFailure(java.lang.String value)
setAttributeValue(CACHEONMATCHFAILURE, value);
| public void | setConstraintFieldValue(int index, java.lang.String value)
this.setValue(CONSTRAINT_FIELD_VALUE, index, value);
| public void | setConstraintFieldValue(java.lang.String[] value)
this.setValue(CONSTRAINT_FIELD_VALUE, value);
| public void | setConstraintFieldValueCacheOnMatch(int index, java.lang.String value)
// Make sure we've got a place to put this attribute.
if (size(CONSTRAINT_FIELD_VALUE) == 0) {
addValue(CONSTRAINT_FIELD_VALUE, "");
}
setAttributeValue(CONSTRAINT_FIELD_VALUE, index, "CacheOnMatch", value);
| public void | setConstraintFieldValueCacheOnMatchFailure(int index, java.lang.String value)
// Make sure we've got a place to put this attribute.
if (size(CONSTRAINT_FIELD_VALUE) == 0) {
addValue(CONSTRAINT_FIELD_VALUE, "");
}
setAttributeValue(CONSTRAINT_FIELD_VALUE, index, "CacheOnMatchFailure", value);
| public void | setConstraintFieldValueMatchExpr(int index, java.lang.String value)
// Make sure we've got a place to put this attribute.
if (size(CONSTRAINT_FIELD_VALUE) == 0) {
addValue(CONSTRAINT_FIELD_VALUE, "");
}
setAttributeValue(CONSTRAINT_FIELD_VALUE, index, "MatchExpr", value);
| public void | setName(java.lang.String value)
setAttributeValue(NAME, value);
| public void | setScope(java.lang.String value)
setAttributeValue(SCOPE, value);
| public int | sizeConstraintFieldValue()
return this.size(CONSTRAINT_FIELD_VALUE);
| public void | validate()
boolean restrictionFailure = false;
// Validating property name
if (getName() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getName() == null", "name", this); // NOI18N
}
// Validating property scope
if (getScope() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getScope() == null", "scope", this); // NOI18N
}
// Validating property cacheOnMatch
if (getCacheOnMatch() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getCacheOnMatch() == null", "cacheOnMatch", this); // NOI18N
}
// Validating property cacheOnMatchFailure
if (getCacheOnMatchFailure() == null) {
throw new org.netbeans.modules.schema2beans.ValidateException("getCacheOnMatchFailure() == null", "cacheOnMatchFailure", this); // NOI18N
}
// Validating property constraintFieldValue
for (int _index = 0; _index < sizeConstraintFieldValue();
++_index) {
String element = getConstraintFieldValue(_index);
if (element != null) {
}
}
// Validating property constraintFieldValueMatchExpr
// Validating property constraintFieldValueCacheOnMatch
// Validating property constraintFieldValueCacheOnMatchFailure
|
|