FileDocCategorySizeDatePackage
ConstraintField.javaAPI DocGlassfish v2 API27591Fri May 04 22:34:42 BST 2007com.sun.enterprise.tools.common.dd.webapp

ConstraintField

public 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 voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddConstraintFieldValue(java.lang.String value)

		return this.addValue(CONSTRAINT_FIELD_VALUE, value);
	
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("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.StringdumpBeanNode()

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

		return getAttributeValue(CACHEONMATCH);
	
public java.lang.StringgetCacheOnMatchFailure()

		return getAttributeValue(CACHEONMATCHFAILURE);
	
public java.lang.StringgetConstraintFieldValue(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.StringgetConstraintFieldValueCacheOnMatch(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.StringgetConstraintFieldValueCacheOnMatchFailure(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.StringgetConstraintFieldValueMatchExpr(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.StringgetName()

		return getAttributeValue(NAME);
	
public java.lang.StringgetScope()

		return getAttributeValue(SCOPE);
	
voidinitialize(int options)

		
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveConstraintFieldValue(java.lang.String value)

		return this.removeValue(CONSTRAINT_FIELD_VALUE, value);
	
public voidsetCacheOnMatch(java.lang.String value)

		setAttributeValue(CACHEONMATCH, value);
	
public voidsetCacheOnMatchFailure(java.lang.String value)

		setAttributeValue(CACHEONMATCHFAILURE, value);
	
public voidsetConstraintFieldValue(int index, java.lang.String value)

		this.setValue(CONSTRAINT_FIELD_VALUE, index, value);
	
public voidsetConstraintFieldValue(java.lang.String[] value)

		this.setValue(CONSTRAINT_FIELD_VALUE, value);
	
public voidsetConstraintFieldValueCacheOnMatch(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 voidsetConstraintFieldValueCacheOnMatchFailure(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 voidsetConstraintFieldValueMatchExpr(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 voidsetName(java.lang.String value)

		setAttributeValue(NAME, value);
	
public voidsetScope(java.lang.String value)

		setAttributeValue(SCOPE, value);
	
public intsizeConstraintFieldValue()

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

		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