All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openehr.schemas.v1.impl.CINTEGERImpl Maven / Gradle / Ivy

/*
 * XML Type:  C_INTEGER
 * Namespace: http://schemas.openehr.org/v1
 * Java type: org.openehr.schemas.v1.CINTEGER
 *
 * Automatically generated - do not modify.
 */
package org.openehr.schemas.v1.impl;
/**
 * An XML C_INTEGER(@http://schemas.openehr.org/v1).
 *
 * This is a complex type.
 */
public class CINTEGERImpl extends org.openehr.schemas.v1.impl.CPRIMITIVEImpl implements org.openehr.schemas.v1.CINTEGER
{
    private static final long serialVersionUID = 1L;
    
    public CINTEGERImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName LIST$0 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "list");
    private static final javax.xml.namespace.QName RANGE$2 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "range");
    private static final javax.xml.namespace.QName ASSUMEDVALUE$4 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "assumed_value");
    
    
    /**
     * Gets array of all "list" elements
     */
    public int[] getListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(LIST$0, targetList);
            int[] result = new int[targetList.size()];
            for (int i = 0, len = targetList.size() ; i < len ; i++)
                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getIntValue();
            return result;
        }
    }
    
    /**
     * Gets ith "list" element
     */
    public int getListArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LIST$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) array of all "list" elements
     */
    public org.apache.xmlbeans.XmlInt[] xgetListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(LIST$0, targetList);
            org.apache.xmlbeans.XmlInt[] result = new org.apache.xmlbeans.XmlInt[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets (as xml) ith "list" element
     */
    public org.apache.xmlbeans.XmlInt xgetListArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(LIST$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (org.apache.xmlbeans.XmlInt)target;
        }
    }
    
    /**
     * Returns number of "list" element
     */
    public int sizeOfListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(LIST$0);
        }
    }
    
    /**
     * Sets array of all "list" element
     */
    public void setListArray(int[] listArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(listArray, LIST$0);
        }
    }
    
    /**
     * Sets ith "list" element
     */
    public void setListArray(int i, int list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LIST$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.setIntValue(list);
        }
    }
    
    /**
     * Sets (as xml) array of all "list" element
     */
    public void xsetListArray(org.apache.xmlbeans.XmlInt[]listArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(listArray, LIST$0);
        }
    }
    
    /**
     * Sets (as xml) ith "list" element
     */
    public void xsetListArray(int i, org.apache.xmlbeans.XmlInt list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(LIST$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(list);
        }
    }
    
    /**
     * Inserts the value as the ith "list" element
     */
    public void insertList(int i, int list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = 
                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(LIST$0, i);
            target.setIntValue(list);
        }
    }
    
    /**
     * Appends the value as the last "list" element
     */
    public void addList(int list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(LIST$0);
            target.setIntValue(list);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "list" element
     */
    public org.apache.xmlbeans.XmlInt insertNewList(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().insert_element_user(LIST$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "list" element
     */
    public org.apache.xmlbeans.XmlInt addNewList()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(LIST$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "list" element
     */
    public void removeList(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(LIST$0, i);
        }
    }
    
    /**
     * Gets the "range" element
     */
    public org.openehr.schemas.v1.IntervalOfInteger getRange()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.IntervalOfInteger target = null;
            target = (org.openehr.schemas.v1.IntervalOfInteger)get_store().find_element_user(RANGE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "range" element
     */
    public boolean isSetRange()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(RANGE$2) != 0;
        }
    }
    
    /**
     * Sets the "range" element
     */
    public void setRange(org.openehr.schemas.v1.IntervalOfInteger range)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.IntervalOfInteger target = null;
            target = (org.openehr.schemas.v1.IntervalOfInteger)get_store().find_element_user(RANGE$2, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.IntervalOfInteger)get_store().add_element_user(RANGE$2);
            }
            target.set(range);
        }
    }
    
    /**
     * Appends and returns a new empty "range" element
     */
    public org.openehr.schemas.v1.IntervalOfInteger addNewRange()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.IntervalOfInteger target = null;
            target = (org.openehr.schemas.v1.IntervalOfInteger)get_store().add_element_user(RANGE$2);
            return target;
        }
    }
    
    /**
     * Unsets the "range" element
     */
    public void unsetRange()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(RANGE$2, 0);
        }
    }
    
    /**
     * Gets the "assumed_value" element
     */
    public int getAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ASSUMEDVALUE$4, 0);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "assumed_value" element
     */
    public org.apache.xmlbeans.XmlInt xgetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ASSUMEDVALUE$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "assumed_value" element
     */
    public boolean isSetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ASSUMEDVALUE$4) != 0;
        }
    }
    
    /**
     * Sets the "assumed_value" element
     */
    public void setAssumedValue(int assumedValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ASSUMEDVALUE$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ASSUMEDVALUE$4);
            }
            target.setIntValue(assumedValue);
        }
    }
    
    /**
     * Sets (as xml) the "assumed_value" element
     */
    public void xsetAssumedValue(org.apache.xmlbeans.XmlInt assumedValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ASSUMEDVALUE$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(ASSUMEDVALUE$4);
            }
            target.set(assumedValue);
        }
    }
    
    /**
     * Unsets the "assumed_value" element
     */
    public void unsetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ASSUMEDVALUE$4, 0);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy