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

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

/*
 * XML Type:  C_DV_ORDINAL
 * Namespace: http://schemas.openehr.org/v1
 * Java type: org.openehr.schemas.v1.CDVORDINAL
 *
 * Automatically generated - do not modify.
 */
package org.openehr.schemas.v1.impl;
/**
 * An XML C_DV_ORDINAL(@http://schemas.openehr.org/v1).
 *
 * This is a complex type.
 */
public class CDVORDINALImpl extends org.openehr.schemas.v1.impl.CDOMAINTYPEImpl implements org.openehr.schemas.v1.CDVORDINAL
{
    private static final long serialVersionUID = 1L;
    
    public CDVORDINALImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ASSUMEDVALUE$0 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "assumed_value");
    private static final javax.xml.namespace.QName LIST$2 = 
        new javax.xml.namespace.QName("http://schemas.openehr.org/v1", "list");
    
    
    /**
     * Gets the "assumed_value" element
     */
    public org.openehr.schemas.v1.DVORDINAL getAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVORDINAL target = null;
            target = (org.openehr.schemas.v1.DVORDINAL)get_store().find_element_user(ASSUMEDVALUE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "assumed_value" element
     */
    public boolean isSetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ASSUMEDVALUE$0) != 0;
        }
    }
    
    /**
     * Sets the "assumed_value" element
     */
    public void setAssumedValue(org.openehr.schemas.v1.DVORDINAL assumedValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVORDINAL target = null;
            target = (org.openehr.schemas.v1.DVORDINAL)get_store().find_element_user(ASSUMEDVALUE$0, 0);
            if (target == null)
            {
                target = (org.openehr.schemas.v1.DVORDINAL)get_store().add_element_user(ASSUMEDVALUE$0);
            }
            target.set(assumedValue);
        }
    }
    
    /**
     * Appends and returns a new empty "assumed_value" element
     */
    public org.openehr.schemas.v1.DVORDINAL addNewAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVORDINAL target = null;
            target = (org.openehr.schemas.v1.DVORDINAL)get_store().add_element_user(ASSUMEDVALUE$0);
            return target;
        }
    }
    
    /**
     * Unsets the "assumed_value" element
     */
    public void unsetAssumedValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ASSUMEDVALUE$0, 0);
        }
    }
    
    /**
     * Gets array of all "list" elements
     */
    public org.openehr.schemas.v1.DVORDINAL[] getListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(LIST$2, targetList);
            org.openehr.schemas.v1.DVORDINAL[] result = new org.openehr.schemas.v1.DVORDINAL[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "list" element
     */
    public org.openehr.schemas.v1.DVORDINAL getListArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVORDINAL target = null;
            target = (org.openehr.schemas.v1.DVORDINAL)get_store().find_element_user(LIST$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "list" element
     */
    public int sizeOfListArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(LIST$2);
        }
    }
    
    /**
     * Sets array of all "list" element
     */
    public void setListArray(org.openehr.schemas.v1.DVORDINAL[] listArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(listArray, LIST$2);
        }
    }
    
    /**
     * Sets ith "list" element
     */
    public void setListArray(int i, org.openehr.schemas.v1.DVORDINAL list)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVORDINAL target = null;
            target = (org.openehr.schemas.v1.DVORDINAL)get_store().find_element_user(LIST$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(list);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "list" element
     */
    public org.openehr.schemas.v1.DVORDINAL insertNewList(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVORDINAL target = null;
            target = (org.openehr.schemas.v1.DVORDINAL)get_store().insert_element_user(LIST$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "list" element
     */
    public org.openehr.schemas.v1.DVORDINAL addNewList()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.openehr.schemas.v1.DVORDINAL target = null;
            target = (org.openehr.schemas.v1.DVORDINAL)get_store().add_element_user(LIST$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "list" element
     */
    public void removeList(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(LIST$2, i);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy