/*
 * An XML document type.
 * Localname: field2
 * Namespace: http://www.acme.com/validationService
 * Java type: com.acme.validationService.Field2Document
 *
 * Automatically generated - do not modify.
 */
package com.acme.validationService.impl;
/**
 * A document containing one field2(@http://www.acme.com/validationService) element.
 *
 * This is a complex type.
 */
public class Field2DocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.acme.validationService.Field2Document
{
    
    public Field2DocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName FIELD2$0 = 
        new javax.xml.namespace.QName("http://www.acme.com/validationService", "field2");
    
    
    /**
     * Gets the "field2" element
     */
    public java.lang.String getField2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FIELD2$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "field2" element
     */
    public org.apache.xmlbeans.XmlString xgetField2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FIELD2$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "field2" element
     */
    public void setField2(java.lang.String field2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FIELD2$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FIELD2$0);
            }
            target.setStringValue(field2);
        }
    }
    
    /**
     * Sets (as xml) the "field2" element
     */
    public void xsetField2(org.apache.xmlbeans.XmlString field2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FIELD2$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(FIELD2$0);
            }
            target.set(field2);
        }
    }
}
