/*
 * XML Type:  ResourcePropertyValueChangeNotificationType
 * Namespace: http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.resource.properties.impl;
/**
 * An XML ResourcePropertyValueChangeNotificationType(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd).
 *
 * This is a complex type.
 */
public class ResourcePropertyValueChangeNotificationTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType
{
    
    public ResourcePropertyValueChangeNotificationTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName OLDVALUE$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", "OldValue");
    private static final javax.xml.namespace.QName NEWVALUE$2 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", "NewValue");
    
    
    /**
     * Gets the "OldValue" element
     */
    public org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue getOldValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue)get_store().find_element_user(OLDVALUE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Tests for nil "OldValue" element
     */
    public boolean isNilOldValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue)get_store().find_element_user(OLDVALUE$0, 0);
            if (target == null) return false;
            return target.isNil();
        }
    }
    
    /**
     * True if has "OldValue" element
     */
    public boolean isSetOldValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(OLDVALUE$0) != 0;
        }
    }
    
    /**
     * Sets the "OldValue" element
     */
    public void setOldValue(org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue oldValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue)get_store().find_element_user(OLDVALUE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue)get_store().add_element_user(OLDVALUE$0);
            }
            target.set(oldValue);
        }
    }
    
    /**
     * Appends and returns a new empty "OldValue" element
     */
    public org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue addNewOldValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue)get_store().add_element_user(OLDVALUE$0);
            return target;
        }
    }
    
    /**
     * Nils the "OldValue" element
     */
    public void setNilOldValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue)get_store().find_element_user(OLDVALUE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue)get_store().add_element_user(OLDVALUE$0);
            }
            target.setNil();
        }
    }
    
    /**
     * Unsets the "OldValue" element
     */
    public void unsetOldValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(OLDVALUE$0, 0);
        }
    }
    
    /**
     * Gets the "NewValue" element
     */
    public org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue getNewValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue)get_store().find_element_user(NEWVALUE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Tests for nil "NewValue" element
     */
    public boolean isNilNewValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue)get_store().find_element_user(NEWVALUE$2, 0);
            if (target == null) return false;
            return target.isNil();
        }
    }
    
    /**
     * Sets the "NewValue" element
     */
    public void setNewValue(org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue newValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue)get_store().find_element_user(NEWVALUE$2, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue)get_store().add_element_user(NEWVALUE$2);
            }
            target.set(newValue);
        }
    }
    
    /**
     * Appends and returns a new empty "NewValue" element
     */
    public org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue addNewNewValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue)get_store().add_element_user(NEWVALUE$2);
            return target;
        }
    }
    
    /**
     * Nils the "NewValue" element
     */
    public void setNilNewValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue)get_store().find_element_user(NEWVALUE$2, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue)get_store().add_element_user(NEWVALUE$2);
            }
            target.setNil();
        }
    }
    /**
     * An XML OldValue(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd).
     *
     * This is a complex type.
     */
    public static class OldValueImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.OldValue
    {
        
        public OldValueImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        
    }
    /**
     * An XML NewValue(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd).
     *
     * This is a complex type.
     */
    public static class NewValueImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.properties.ResourcePropertyValueChangeNotificationType.NewValue
    {
        
        public NewValueImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        
    }
}
