model.external.riksdagen.dokumentstatus.impl/src/main/java/com/hack23/cia/model/external/riksdagen/dokumentstatus/impl/DocumentActivityData.java

Summary

Maintainability
A
2 hrs
Test Coverage
/*
 * Copyright 2010 James Pether Sörling
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *    $Id$
 *  $HeadURL$
*/
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// 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: 2019.02.24 at 11:40:07 PM CET
//


package com.hack23.cia.model.external.riksdagen.dokumentstatus.impl;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.hack23.cia.model.common.api.ModelObject;
import com.hack23.cia.model.common.impl.xml.XmlDateTypeAdapter;


/**
 * The Class DocumentActivityData.
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DocumentActivityData", propOrder = {
    "createdDate",
    "code",
    "activityName",
    "orderNumber",
    "process",
    "status"
})
@Entity(name = "DocumentActivityData")
@Table(name = "DOCUMENT_ACTIVITY_DATA")
@Inheritance(strategy = InheritanceType.JOINED)
public class DocumentActivityData
    implements ModelObject
{

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /** The created date. */
    @XmlElement(name = "datum", required = true, type = String.class)
    @XmlJavaTypeAdapter(XmlDateTypeAdapter.class)
    @XmlSchemaType(name = "date")
    protected Date createdDate;

    /** The code. */
    @XmlElement(name = "kod", required = true)
    protected String code;

    /** The activity name. */
    @XmlElement(name = "namn", required = true)
    protected String activityName;

    /** The order number. */
    @XmlElement(name = "ordning", required = true)
    protected BigInteger orderNumber;

    /** The process. */
    @XmlElement(required = true)
    protected String process;

    /** The status. */
    @XmlElement(required = true)
    protected String status;

    /** The hjid. */
    @XmlAttribute(name = "Hjid")
    protected Long hjid;

    /**
     * Gets the created date.
     *
     * @return the created date
     */
    @Basic
    @Column(name = "CREATED_DATE")
    @Temporal(TemporalType.DATE)
    public Date getCreatedDate() {
        return createdDate;
    }

    /**
     * Sets the created date.
     *
     * @param value the new created date
     */
    public void setCreatedDate(final Date value) {
        this.createdDate = value;
    }

    /**
     * Gets the code.
     *
     * @return the code
     */
    @Basic
    @Column(name = "CODE")
    public String getCode() {
        return code;
    }

    /**
     * Sets the code.
     *
     * @param value the new code
     */
    public void setCode(final String value) {
        this.code = value;
    }

    /**
     * Gets the activity name.
     *
     * @return the activity name
     */
    @Basic
    @Column(name = "ACTIVITY_NAME")
    public String getActivityName() {
        return activityName;
    }

    /**
     * Sets the activity name.
     *
     * @param value the new activity name
     */
    public void setActivityName(final String value) {
        this.activityName = value;
    }

    /**
     * Gets the order number.
     *
     * @return the order number
     */
    @Basic
    @Column(name = "ORDER_NUMBER", precision = 20)
    public BigInteger getOrderNumber() {
        return orderNumber;
    }

    /**
     * Sets the order number.
     *
     * @param value the new order number
     */
    public void setOrderNumber(final BigInteger value) {
        this.orderNumber = value;
    }

    /**
     * Gets the process.
     *
     * @return the process
     */
    @Basic
    @Column(name = "PROCESS")
    public String getProcess() {
        return process;
    }

    /**
     * Sets the process.
     *
     * @param value the new process
     */
    public void setProcess(final String value) {
        this.process = value;
    }

    /**
     * Gets the status.
     *
     * @return the status
     */
    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    /**
     * Sets the status.
     *
     * @param value the new status
     */
    public void setStatus(final String value) {
        this.status = value;
    }

    /**
     * With created date.
     *
     * @param value the value
     * @return the document activity data
     */
    public DocumentActivityData withCreatedDate(final Date value) {
        setCreatedDate(value);
        return this;
    }

    /**
     * With code.
     *
     * @param value the value
     * @return the document activity data
     */
    public DocumentActivityData withCode(final String value) {
        setCode(value);
        return this;
    }

    /**
     * With activity name.
     *
     * @param value the value
     * @return the document activity data
     */
    public DocumentActivityData withActivityName(final String value) {
        setActivityName(value);
        return this;
    }

    /**
     * With order number.
     *
     * @param value the value
     * @return the document activity data
     */
    public DocumentActivityData withOrderNumber(final BigInteger value) {
        setOrderNumber(value);
        return this;
    }

    /**
     * With process.
     *
     * @param value the value
     * @return the document activity data
     */
    public DocumentActivityData withProcess(final String value) {
        setProcess(value);
        return this;
    }

    /**
     * With status.
     *
     * @param value the value
     * @return the document activity data
     */
    public DocumentActivityData withStatus(final String value) {
        setStatus(value);
        return this;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public final String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }



    /**
     * Gets the hjid.
     *
     * @return the hjid
     */
    @Id
    @Column(name = "HJID")
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getHjid() {
        return hjid;
    }

    /**
     * Sets the hjid.
     *
     * @param value the new hjid
     */
    public void setHjid(final Long value) {
        this.hjid = value;
    }

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(final Object object) {
        return EqualsBuilder.reflectionEquals(this,object);
    }


    /* (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public final int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

}