001/*
002        $Id: DateParameterValueData.java 3207 2009-04-09 06:48:11Z gregory $
003
004        Copyright (C) 2006 Gregory Vincic, Olle Mansson
005        Copyright (C) 2007 Gregory Vincic
006
007        This file is part of Proteios.
008        Available at http://www.proteios.org/
009
010        Proteios is free software; you can redistribute it and/or modify it
011        under the terms of the GNU General Public License as published by
012        the Free Software Foundation; either version 2 of the License, or
013        (at your option) any later version.
014
015        Proteios is distributed in the hope that it will be useful, but
016        WITHOUT ANY WARRANTY; without even the implied warranty of
017        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
018        General Public License for more details.
019
020        You should have received a copy of the GNU General Public License
021        along with this program; if not, write to the Free Software
022        Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
023        02111-1307, USA.
024*/
025package org.proteios.core.data;
026
027import java.util.ArrayList;
028import java.util.Date;
029import java.util.List;
030
031/**
032        Date parameter value.
033
034        @author Samuel
035        @version 2.0
036        @see <a href="../../../../../../../development/overview/data/parameters.html">Parameters overview</a>
037        @hibernate.subclass discriminator-value="8"
038        @base.modified $Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $
039*/
040public class DateParameterValueData
041        extends ParameterValueData<Date>
042{
043        public DateParameterValueData()
044        {}
045        
046        public DateParameterValueData(Date... values)
047        {
048                super(values);
049        }
050        
051        private List<Date> values;
052        /**
053                @hibernate.bag table="`DateValues`" lazy="true" cascade="all"
054                @hibernate.collection-key column="`id`"
055                @hibernate.collection-element column="`value`" type="timestamp" not-null="true"
056        */
057        @Override
058        public List<Date> getValues()
059        {
060                if (values == null )
061                {
062                        values = new ArrayList<Date>();
063                }
064                return values;
065        }
066        @Override
067        void setValues(List<Date> values)
068        {
069                this.values = values;
070        }
071
072        @Override
073        public String toString()
074        {
075                return values.toString();
076        }       
077}