//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 
// 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: 2016.09.14 at 11:44:49 AM PET 
//

package org.openfact.models.jpa.entities.ubl.common;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.CascadeType;
import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "DIMENSION")
public class DimensionEntity {

    @Id
    @Column(name = "ID")
    @GeneratedValue(generator = "uuid2")
    @GenericGenerator(name = "uuid2", strategy = "uuid2")
    @Access(AccessType.PROPERTY)
    protected String id;

    @Column(name = "ATTRIBUTEID")
    protected String attributeID;

    @ManyToOne(targetEntity = MeasureEntity.class, cascade = { CascadeType.ALL })
    @JoinColumn(name = "MEASURE_DIMENSION_ID")
    protected MeasureEntity measure = new MeasureEntity();

    @ElementCollection
    @Column(name = "VALUE")
    @CollectionTable(name = "DIMENSION_DESCRIPTION", joinColumns = { @JoinColumn(name = "DIMENSION_ID") })
    protected List<String> description = new ArrayList<>();

    @ManyToOne(targetEntity = MeasureEntity.class, cascade = { CascadeType.ALL })
    @JoinColumn(name = "MINIMUMMEASURE_DIMENSION")
    protected MeasureEntity minimumMeasure = new MeasureEntity();

    @ManyToOne(targetEntity = MeasureEntity.class, cascade = { CascadeType.ALL })
    @JoinColumn(name = "MAXIMUMMEASURE_DIMENSION")
    protected MeasureEntity maximumMeasure = new MeasureEntity();

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * @return the attributeID
     */
    public String getAttributeID() {
        return attributeID;
    }

    /**
     * @param attributeID
     *            the attributeID to set
     */
    public void setAttributeID(String attributeID) {
        this.attributeID = attributeID;
    }

    /**
     * @return the measure
     */
    public MeasureEntity getMeasure() {
        return measure;
    }

    /**
     * @param measure
     *            the measure to set
     */
    public void setMeasure(MeasureEntity measure) {
        this.measure = measure;
    }

    /**
     * @return the description
     */
    public List<String> getDescription() {
        return description;
    }

    /**
     * @param description
     *            the description to set
     */
    public void setDescription(List<String> description) {
        this.description = description;
    }

    /**
     * @return the minimumMeasure
     */
    public MeasureEntity getMinimumMeasure() {
        return minimumMeasure;
    }

    /**
     * @param minimumMeasure
     *            the minimumMeasure to set
     */
    public void setMinimumMeasure(MeasureEntity minimumMeasure) {
        this.minimumMeasure = minimumMeasure;
    }

    /**
     * @return the maximumMeasure
     */
    public MeasureEntity getMaximumMeasure() {
        return maximumMeasure;
    }

    /**
     * @param maximumMeasure
     *            the maximumMeasure to set
     */
    public void setMaximumMeasure(MeasureEntity maximumMeasure) {
        this.maximumMeasure = maximumMeasure;
    }

}
