001/*
002 *  Copyright 2015 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.plugins.forms.data;
017
018import java.util.Date;
019import java.util.List;
020
021/**
022 * User entry.
023 */
024public class UserEntry
025{
026    /** The entry id. */
027    protected int _id;
028    
029    /** The entry submission date. */
030    protected Date _creationDate;
031    
032    /** The entry values. */
033    protected List<FieldValue> _values;
034    
035    /** The workflow id */
036    protected Integer _workflowId;
037    
038    /**
039     * Constructor with parameters.
040     * @param id the id of the user entry
041     * @param creationDate the creation date of the user entry
042     * @param values the values of the user entry
043     * @param workflowId the id of the workflow of this user entry
044     */
045    public UserEntry(int id, Date creationDate, List<FieldValue> values, Integer workflowId)
046    {
047        this._id = id;
048        this._creationDate = creationDate;
049        this._values = values;
050        this._workflowId = workflowId;
051    }
052
053    /**
054     * Get the id.
055     * @return the id
056     */
057    public int getId()
058    {
059        return _id;
060    }
061
062    /**
063     * Set the id.
064     * @param id the id to set
065     */
066    public void setId(int id)
067    {
068        this._id = id;
069    }
070
071    /**
072     * Get the creationDate.
073     * @return the creationDate
074     */
075    public Date getCreationDate()
076    {
077        return _creationDate;
078    }
079
080    /**
081     * Set the creationDate.
082     * @param creationDate the creationDate to set
083     */
084    public void setCreationDate(Date creationDate)
085    {
086        this._creationDate = creationDate;
087    }
088
089    /**
090     * Get the values.
091     * @return the values
092     */
093    public List<FieldValue> getValues()
094    {
095        return _values;
096    }
097
098    /**
099     * Set the values.
100     * @param values the values to set
101     */
102    public void setValues(List<FieldValue> values)
103    {
104        this._values = values;
105    }
106    
107    /**
108     * Set the workflow id of this entry
109     * @param workflowId the id of the workflow of this entry
110     */
111    public void setWorkflowId(Integer workflowId)
112    {
113        this._workflowId = workflowId;
114    }
115    
116    /**
117     * Get the workflow id of this user entry
118     * @return the workflow id of this entry
119     */
120    public Integer getWorkflowId()
121    {
122        return _workflowId;
123    }
124}