/*
 * This class was automatically generated with 
 * <a href="http://www.castor.org">Castor 0.9.7</a>, using an XML
 * Schema.
 * $Id$
 */

package com.queplix.core.modules.services.jxb;

//---------------------------------/
//- Imported classes and packages -/
//---------------------------------/

import org.exolab.castor.xml.validators.BooleanValidator;
import org.exolab.castor.xml.validators.IntegerValidator;
import org.exolab.castor.xml.validators.LongValidator;

/**
 * Class TaskDescriptor.
 *
 * @version $Revision$ $Date$
 */
public class TaskDescriptor
        extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {

    //--------------------------/
    //- Class/Member Variables -/
    //--------------------------/

    /**
     * Field nsPrefix
     */
    private java.lang.String nsPrefix;

    /**
     * Field nsURI
     */
    private java.lang.String nsURI;

    /**
     * Field xmlName
     */
    private java.lang.String xmlName;

    /**
     * Field identity
     */
    private org.exolab.castor.xml.XMLFieldDescriptor identity;

    //----------------/
    //- Constructors -/
    //----------------/

    public TaskDescriptor() {
        super();
        xmlName = "task";

        //-- set grouping compositor
        setCompositorAsSequence();
        org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
        org.exolab.castor.mapping.FieldHandler handler = null;
        org.exolab.castor.xml.FieldValidator fieldValidator = null;
        //-- initialize attribute descriptors

        //-- _name
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                java.lang.String.class, "_name", "name",
                org.exolab.castor.xml.NodeType.Attribute);
        this.identity = desc;
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getName();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setName((java.lang.String) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return new java.lang.String();
            }
        };
        desc.setHandler(handler);
        desc.setRequired(true);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _name
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(1);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _autoStart
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                java.lang.Boolean.class, "_autoStart", "autoStart",
                org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getAutoStart();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setAutoStart((java.lang.Boolean) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _autoStart
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            BooleanValidator typeValidator = new BooleanValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _repeat
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                java.lang.Boolean.class, "_repeat", "repeat",
                org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getRepeat();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setRepeat((java.lang.Boolean) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _repeat
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            BooleanValidator typeValidator = new BooleanValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _delay
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                java.lang.Integer.class, "_delay", "delay",
                org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getDelay();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setDelay((java.lang.Integer) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _delay
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            IntegerValidator typeValidator = new IntegerValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _delayunit
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                com.queplix.core.modules.services.jxb.types.DelayunitSType.class,
                "_delayunit", "delayunit",
                org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getDelayunit();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setDelayunit(
                            (com.queplix.core.modules.services.jxb.types.DelayunitSType) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
                com.queplix.core.modules.services.jxb.types.DelayunitSType.class,
                handler);
        desc.setImmutable(true);
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _delayunit
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _id
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                java.lang.Long.class, "_id", "id",
                org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getId();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setId((java.lang.Long) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _id
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            LongValidator typeValidator = new LongValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _scriptId
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                java.lang.Integer.class, "_scriptId", "scriptId",
                org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getScriptId();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setScriptId((java.lang.Integer) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _scriptId
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            IntegerValidator typeValidator = new IntegerValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _status
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                com.queplix.core.modules.services.jxb.types.StatusSType.class,
                "_status", "status", org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getStatus();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setStatus(
                            (com.queplix.core.modules.services.jxb.types.StatusSType) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        handler = new org.exolab.castor.xml.handlers.EnumFieldHandler(
                com.queplix.core.modules.services.jxb.types.StatusSType.class,
                handler);
        desc.setImmutable(true);
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _status
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
        //-- _firstStart
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                java.lang.Long.class, "_firstStart", "firstStart",
                org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getFirstStart();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setFirstStart((java.lang.Long) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _firstStart
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            LongValidator typeValidator = new LongValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- _nextStart
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                java.lang.Long.class, "_nextStart", "nextStart",
                org.exolab.castor.xml.NodeType.Attribute);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getNextStart();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.setNextStart((java.lang.Long) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return null;
            }
        };
        desc.setHandler(handler);
        desc.setMultivalued(false);
        addFieldDescriptor(desc);

        //-- validation code for: _nextStart
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        { //-- local scope
            LongValidator typeValidator = new LongValidator();
            fieldValidator.setValidator(typeValidator);
        }
        desc.setValidator(fieldValidator);
        //-- initialize element descriptors

        //-- _paramList
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
                com.queplix.core.modules.services.jxb.Param.class, "_paramList",
                "param", org.exolab.castor.xml.NodeType.Element);
        handler = new org.exolab.castor.xml.XMLFieldHandler() {
            public java.lang.Object getValue(java.lang.Object object)
                    throws IllegalStateException {
                Task target = (Task) object;
                return target.getParam();
            }

            public void setValue(java.lang.Object object,
                                 java.lang.Object value)
                    throws IllegalStateException, IllegalArgumentException {
                try {
                    Task target = (Task) object;
                    target.addParam(
                            (com.queplix.core.modules.services.jxb.Param) value);
                }
                catch (java.lang.Exception ex) {
                    throw new IllegalStateException(ex.toString());
                }
            }

            public java.lang.Object newInstance(java.lang.Object parent) {
                return new com.queplix.core.modules.services.jxb.Param();
            }
        };
        desc.setHandler(handler);
        desc.setMultivalued(true);
        addFieldDescriptor(desc);

        //-- validation code for: _paramList
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
        fieldValidator.setMinOccurs(0);
        { //-- local scope
        }
        desc.setValidator(fieldValidator);
    } //-- com.queplix.core.modules.services.jxb.TaskDescriptor()

    //-----------/
    //- Methods -/
    //-----------/

    /**
     * Method getAccessMode
     *
     * @return AccessMode
     */
    public org.exolab.castor.mapping.AccessMode getAccessMode() {
        return null;
    } //-- org.exolab.castor.mapping.AccessMode getAccessMode() 

    /**
     * Method getExtends
     *
     * @return ClassDescriptor
     */
    public org.exolab.castor.mapping.ClassDescriptor getExtends() {
        return null;
    } //-- org.exolab.castor.mapping.ClassDescriptor getExtends() 

    /**
     * Method getIdentity
     *
     * @return FieldDescriptor
     */
    public org.exolab.castor.mapping.FieldDescriptor getIdentity() {
        return identity;
    } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() 

    /**
     * Method getJavaClass
     *
     * @return Class
     */
    public java.lang.Class getJavaClass() {
        return com.queplix.core.modules.services.jxb.Task.class;
    } //-- java.lang.Class getJavaClass() 

    /**
     * Method getNameSpacePrefix
     *
     * @return String
     */
    public java.lang.String getNameSpacePrefix() {
        return nsPrefix;
    } //-- java.lang.String getNameSpacePrefix() 

    /**
     * Method getNameSpaceURI
     *
     * @return String
     */
    public java.lang.String getNameSpaceURI() {
        return nsURI;
    } //-- java.lang.String getNameSpaceURI() 

    /**
     * Method getValidator
     *
     * @return TypeValidator
     */
    public org.exolab.castor.xml.TypeValidator getValidator() {
        return this;
    } //-- org.exolab.castor.xml.TypeValidator getValidator() 

    /**
     * Method getXMLName
     *
     * @return String
     */
    public java.lang.String getXMLName() {
        return xmlName;
    } //-- java.lang.String getXMLName() 

}
