//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2015.08.22 at 04:26:24 PM IST 
//
package io.github.jeddict.jpa.spec;

import io.github.jeddict.source.AnnotationExplorer;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlType;

/**
 *
 *
 * @Target({TYPE}) @Retention(RUNTIME) public @interface
 * StoredProcedureParameter { String name() default ""; ParameterMode mode()
 * default ParameterMode.IN; Class type(); }
 *
 *
 *
 * <p>
 * Java class for stored-procedure-parameter complex type.
 *
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 *
 * <pre>
 * &lt;complexType name="stored-procedure-parameter">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       &lt;/sequence>
 *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="mode" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}parameter-mode" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "stored-procedure-parameter", propOrder = {
    "description"
})
public class StoredProcedureParameter {

    protected String description;
    @XmlAttribute(name = "n")//(name = "name")
    protected String name;
    @XmlAttribute(name = "c", required = true)//(name = "class", required = true)
    protected String clazz;
    @XmlAttribute(name = "m")//(name = "mode")
    protected ParameterMode mode;

    public static StoredProcedureParameter load(AnnotationExplorer annotation) {
        StoredProcedureParameter storedProcedureParameter = new StoredProcedureParameter();
        annotation.getString("name").ifPresent(storedProcedureParameter::setName);
        annotation.getClassName("type").ifPresent(storedProcedureParameter::setClazz);
        annotation.getEnum("mode").map(ParameterMode::valueOf).ifPresent(storedProcedureParameter::setMode);
        return storedProcedureParameter;
    }

    /**
     * Gets the value of the description property.
     *
     * @return possible object is {@link String }
     *
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets the value of the description property.
     *
     * @param value allowed object is {@link String }
     *
     */
    public void setDescription(String value) {
        this.description = value;
    }

    /**
     * Gets the value of the name property.
     *
     * @return possible object is {@link String }
     *
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     *
     * @param value allowed object is {@link String }
     *
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the clazz property.
     *
     * @return possible object is {@link String }
     *
     */
    public String getClazz() {
        return clazz;
    }

    /**
     * Sets the value of the clazz property.
     *
     * @param value allowed object is {@link String }
     *
     */
    public void setClazz(String value) {
        this.clazz = value;
    }

    /**
     * Gets the value of the mode property.
     *
     * @return possible object is {@link ParameterMode }
     *
     */
    public ParameterMode getMode() {
        return mode;
    }

    /**
     * Sets the value of the mode property.
     *
     * @param value allowed object is {@link ParameterMode }
     *
     */
    public void setMode(ParameterMode value) {
        this.mode = value;
    }

}
