001// license-header java merge-point
002//
003// Attention: Generated code! Do not modify by hand!
004// Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge.
005//
006package fr.ifremer.adagio.core.dao.referential.taxon;
007
008/*
009 * #%L
010 * SIH-Adagio :: Core
011 * $Id:$
012 * $HeadURL:$
013 * %%
014 * Copyright (C) 2012 - 2014 Ifremer
015 * %%
016 * This program is free software: you can redistribute it and/or modify
017 * it under the terms of the GNU Affero General Public License as published by
018 * the Free Software Foundation, either version 3 of the License, or
019 * (at your option) any later version.
020 * 
021 * This program is distributed in the hope that it will be useful,
022 * but WITHOUT ANY WARRANTY; without even the implied warranty of
023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
024 * GNU General Public License for more details.
025 * 
026 * You should have received a copy of the GNU Affero General Public License
027 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
028 * #L%
029 */
030
031import java.io.Serializable;
032import java.sql.Timestamp;
033import java.util.Collection;
034import java.util.Date;
035import java.util.HashSet;
036
037/**
038 * Classe regroupant les taxons. Il s'agit en fait d'une combinaison entre un rang taxinomique, un
039 * nom de taxon, un code et éventuellement un auteur et une date.
040 * Cette classe regroupe les taxons valides, provisoires, obsolètes, virtuels et les synonymes.
041 * On garde l'historique du passage en taxon valide, puis du passage en synonyme (date de fin
042 * référent).
043 * Dans COST : "Use the FAO reference list ftp://ftp.fao.org/FI/stat/data/ASFIS_sp.zip"
044 */
045// HibernateEntity.vsl annotations merge-point
046public abstract class TaxonName
047    implements Serializable, Comparable<TaxonName>
048{
049    /**
050     * The serial version UID of this class. Needed for serialization.
051     */
052    private static final long serialVersionUID = -763889927077388260L;
053
054    // Generate 14 attributes
055    private Integer id;
056
057    /**
058     * Identifiant système unique du libellé.
059     * @return this.id Integer
060     */
061    public Integer getId()
062    {
063        return this.id;
064    }
065
066    /**
067     * Identifiant système unique du libellé.
068     * @param idIn Integer
069     */
070    public void setId(Integer idIn)
071    {
072        this.id = idIn;
073    }
074
075    private String name;
076
077    /**
078     * Nom latin présent dans la nomenclature du libellé. Il obéit aux règles de la concaténation du
079     * libellé décrites dans le règle [R0018].
080     * @return this.name String
081     */
082    public String getName()
083    {
084        return this.name;
085    }
086
087    /**
088     * Nom latin présent dans la nomenclature du libellé. Il obéit aux règles de la concaténation du
089     * libellé décrites dans le règle [R0018].
090     * @param nameIn String
091     */
092    public void setName(String nameIn)
093    {
094        this.name = nameIn;
095    }
096
097    private String completeName;
098
099    /**
100     * 
101     * @return this.completeName String
102     */
103    public String getCompleteName()
104    {
105        return this.completeName;
106    }
107
108    /**
109     * 
110     * @param completeNameIn String
111     */
112    public void setCompleteName(String completeNameIn)
113    {
114        this.completeName = completeNameIn;
115    }
116
117    private Boolean isNaming;
118
119    /**
120     * Indique si les regles de nomenclature sont à appliquer.
121     * @return this.isNaming Boolean
122     */
123    public Boolean isIsNaming()
124    {
125        return this.isNaming;
126    }
127
128    /**
129     * Indique si les regles de nomenclature sont à appliquer.
130     * @param isNamingIn Boolean
131     */
132    public void setIsNaming(Boolean isNamingIn)
133    {
134        this.isNaming = isNamingIn;
135    }
136
137    private Boolean isReferent;
138
139    /**
140     * 
141     * @return this.isReferent Boolean
142     */
143    public Boolean isIsReferent()
144    {
145        return this.isReferent;
146    }
147
148    /**
149     * 
150     * @param isReferentIn Boolean
151     */
152    public void setIsReferent(Boolean isReferentIn)
153    {
154        this.isReferent = isReferentIn;
155    }
156
157    private Integer upperRank;
158
159    /**
160     * Ce numéro d'ordre du taxon dans l'arbre phylogénique permet de classer les fils d'un même
161     * taxon père et donc l'ensemble des taxons valides les uns par rapport aux autres. Il permet
162     * notamment de gérer les ordre d'affichage suivant l'ordre taxinomique.
163     * @return this.upperRank Integer
164     */
165    public Integer getUpperRank()
166    {
167        return this.upperRank;
168    }
169
170    /**
171     * Ce numéro d'ordre du taxon dans l'arbre phylogénique permet de classer les fils d'un même
172     * taxon père et donc l'ensemble des taxons valides les uns par rapport aux autres. Il permet
173     * notamment de gérer les ordre d'affichage suivant l'ordre taxinomique.
174     * @param upperRankIn Integer
175     */
176    public void setUpperRank(Integer upperRankIn)
177    {
178        this.upperRank = upperRankIn;
179    }
180
181    private Boolean isVirtual;
182
183    /**
184     * 
185     * @return this.isVirtual Boolean
186     */
187    public Boolean isIsVirtual()
188    {
189        return this.isVirtual;
190    }
191
192    /**
193     * 
194     * @param isVirtualIn Boolean
195     */
196    public void setIsVirtual(Boolean isVirtualIn)
197    {
198        this.isVirtual = isVirtualIn;
199    }
200
201    private Boolean isObsolete;
202
203    /**
204     * Indique qu’un taxon est obsolète
205     * @return this.isObsolete Boolean
206     */
207    public Boolean isIsObsolete()
208    {
209        return this.isObsolete;
210    }
211
212    /**
213     * Indique qu’un taxon est obsolète
214     * @param isObsoleteIn Boolean
215     */
216    public void setIsObsolete(Boolean isObsoleteIn)
217    {
218        this.isObsolete = isObsoleteIn;
219    }
220
221    private Boolean isTemporary;
222
223    /**
224     * Un libellé peut être provisoire (sp1,sp2 etc.)
225     * @return this.isTemporary Boolean
226     */
227    public Boolean isIsTemporary()
228    {
229        return this.isTemporary;
230    }
231
232    /**
233     * Un libellé peut être provisoire (sp1,sp2 etc.)
234     * @param isTemporaryIn Boolean
235     */
236    public void setIsTemporary(Boolean isTemporaryIn)
237    {
238        this.isTemporary = isTemporaryIn;
239    }
240
241    private Date startDate;
242
243    /**
244     * Date à laquelle le taxon est devenu valide. Cette date peut être vide si le libellé n'a
245     * jamais été valide. Cette date est renseignée automatiquement par le système.
246     * @return this.startDate Date
247     */
248    public Date getStartDate()
249    {
250        return this.startDate;
251    }
252
253    /**
254     * Date à laquelle le taxon est devenu valide. Cette date peut être vide si le libellé n'a
255     * jamais été valide. Cette date est renseignée automatiquement par le système.
256     * @param startDateIn Date
257     */
258    public void setStartDate(Date startDateIn)
259    {
260        this.startDate = startDateIn;
261    }
262
263    private Date endDate;
264
265    /**
266     * Date où le libellé n'est plus référent et a été remplacé par un autre libellé. Cette date est
267     * renseignée automatiquement par le système.
268     * @return this.endDate Date
269     */
270    public Date getEndDate()
271    {
272        return this.endDate;
273    }
274
275    /**
276     * Date où le libellé n'est plus référent et a été remplacé par un autre libellé. Cette date est
277     * renseignée automatiquement par le système.
278     * @param endDateIn Date
279     */
280    public void setEndDate(Date endDateIn)
281    {
282        this.endDate = endDateIn;
283    }
284
285    private String comments;
286
287    /**
288     * Commentaire associé au libellé du taxon.
289     * @return this.comments String
290     */
291    public String getComments()
292    {
293        return this.comments;
294    }
295
296    /**
297     * Commentaire associé au libellé du taxon.
298     * @param commentsIn String
299     */
300    public void setComments(String commentsIn)
301    {
302        this.comments = commentsIn;
303    }
304
305    private Date creationDate;
306
307    /**
308     * Date de création système du libellé. Renseigné automatiquement par le système.
309     * @return this.creationDate Date
310     */
311    public Date getCreationDate()
312    {
313        return this.creationDate;
314    }
315
316    /**
317     * Date de création système du libellé. Renseigné automatiquement par le système.
318     * @param creationDateIn Date
319     */
320    public void setCreationDate(Date creationDateIn)
321    {
322        this.creationDate = creationDateIn;
323    }
324
325    private Timestamp updateDate;
326
327    /**
328     * Date de mise à jour système du libellé. Renseigné automatiquement par le système.
329     * @return this.updateDate Timestamp
330     */
331    public Timestamp getUpdateDate()
332    {
333        return this.updateDate;
334    }
335
336    /**
337     * Date de mise à jour système du libellé. Renseigné automatiquement par le système.
338     * @param updateDateIn Timestamp
339     */
340    public void setUpdateDate(Timestamp updateDateIn)
341    {
342        this.updateDate = updateDateIn;
343    }
344
345    // Generate 9 associations
346    private Citation citation;
347
348    /**
349     * Deux éléments sont à distinguer dans l'autorité de classification d’un taxon :
350     * - La publication qui fait état de la description et de la nomenclature du taxon.
351     * - La citation, associée au nom du taxon, pour faire référence à la publication d'origine du
352     * taxon.
353     * Les règles de nomenclature des taxons et de leurs auteurs sont définies dans The
354     * International Code
355     * of Zoological Nomenclature (ICZN : http://www.iczn.org/iczn/index.jsp ) pour la faune, et
356     * dans The
357     * International Code of Botanical Nomenclature (ICBN :
358     * http://www.bgbm.fu-berlin.de/iapt/nomenclature/CODE/SaintLouis/0000St.Luistitle.htm) pour la
359     * flore.
360     * Chaque taxon ne possède qu'une seule publication, et une seule citation. Une publication peut
361     * correspondre à plusieurs taxons, et une citation peut être identique pour plusieurs taxons.
362     * @return this.citation Citation
363     */
364    public Citation getCitation()
365    {
366        return this.citation;
367    }
368
369    /**
370     * Deux éléments sont à distinguer dans l'autorité de classification d’un taxon :
371     * - La publication qui fait état de la description et de la nomenclature du taxon.
372     * - La citation, associée au nom du taxon, pour faire référence à la publication d'origine du
373     * taxon.
374     * Les règles de nomenclature des taxons et de leurs auteurs sont définies dans The
375     * International Code
376     * of Zoological Nomenclature (ICZN : http://www.iczn.org/iczn/index.jsp ) pour la faune, et
377     * dans The
378     * International Code of Botanical Nomenclature (ICBN :
379     * http://www.bgbm.fu-berlin.de/iapt/nomenclature/CODE/SaintLouis/0000St.Luistitle.htm) pour la
380     * flore.
381     * Chaque taxon ne possède qu'une seule publication, et une seule citation. Une publication peut
382     * correspondre à plusieurs taxons, et une citation peut être identique pour plusieurs taxons.
383     * @param citationIn Citation
384     */
385    public void setCitation(Citation citationIn)
386    {
387        this.citation = citationIn;
388    }
389
390    private TaxonName parentTaxonName;
391
392    /**
393     * Classe regroupant les taxons. Il s'agit en fait d'une combinaison entre un rang taxinomique,
394     * un nom
395     * de taxon, un code et éventuellement un auteur et une date.
396     * Cette classe regroupe les taxons valides, provisoires, obsolètes, virtuels et les synonymes.
397     * On garde l'historique du passage en taxon valide, puis du passage en synonyme (date de fin
398     * référent).
399     * Dans COST : "Use the FAO reference list ftp://ftp.fao.org/FI/stat/data/ASFIS_sp.zip"
400     * @return this.parentTaxonName TaxonName
401     */
402    public TaxonName getParentTaxonName()
403    {
404        return this.parentTaxonName;
405    }
406
407    /**
408     * Classe regroupant les taxons. Il s'agit en fait d'une combinaison entre un rang taxinomique,
409     * un nom
410     * de taxon, un code et éventuellement un auteur et une date.
411     * Cette classe regroupe les taxons valides, provisoires, obsolètes, virtuels et les synonymes.
412     * On garde l'historique du passage en taxon valide, puis du passage en synonyme (date de fin
413     * référent).
414     * Dans COST : "Use the FAO reference list ftp://ftp.fao.org/FI/stat/data/ASFIS_sp.zip"
415     * @param parentTaxonNameIn TaxonName
416     */
417    public void setParentTaxonName(TaxonName parentTaxonNameIn)
418    {
419        this.parentTaxonName = parentTaxonNameIn;
420    }
421
422    private Collection<TaxonName> childTaxonNames = new HashSet<TaxonName>();
423
424    /**
425     * Classe regroupant les taxons. Il s'agit en fait d'une combinaison entre un rang taxinomique,
426     * un nom
427     * de taxon, un code et éventuellement un auteur et une date.
428     * Cette classe regroupe les taxons valides, provisoires, obsolètes, virtuels et les synonymes.
429     * On garde l'historique du passage en taxon valide, puis du passage en synonyme (date de fin
430     * référent).
431     * Dans COST : "Use the FAO reference list ftp://ftp.fao.org/FI/stat/data/ASFIS_sp.zip"
432     * @return this.childTaxonNames Collection<TaxonName>
433     */
434    public Collection<TaxonName> getChildTaxonNames()
435    {
436        return this.childTaxonNames;
437    }
438
439    /**
440     * Classe regroupant les taxons. Il s'agit en fait d'une combinaison entre un rang taxinomique,
441     * un nom
442     * de taxon, un code et éventuellement un auteur et une date.
443     * Cette classe regroupe les taxons valides, provisoires, obsolètes, virtuels et les synonymes.
444     * On garde l'historique du passage en taxon valide, puis du passage en synonyme (date de fin
445     * référent).
446     * Dans COST : "Use the FAO reference list ftp://ftp.fao.org/FI/stat/data/ASFIS_sp.zip"
447     * @param childTaxonNamesIn Collection<TaxonName>
448     */
449    public void setChildTaxonNames(Collection<TaxonName> childTaxonNamesIn)
450    {
451        this.childTaxonNames = childTaxonNamesIn;
452    }
453
454    /**
455     * Classe regroupant les taxons. Il s'agit en fait d'une combinaison entre un rang taxinomique,
456     * un nom
457     * de taxon, un code et éventuellement un auteur et une date.
458     * Cette classe regroupe les taxons valides, provisoires, obsolètes, virtuels et les synonymes.
459     * On garde l'historique du passage en taxon valide, puis du passage en synonyme (date de fin
460     * référent).
461     * Dans COST : "Use the FAO reference list ftp://ftp.fao.org/FI/stat/data/ASFIS_sp.zip"
462     * @param elementToAdd TaxonName
463     * @return <tt>true</tt> if this collection changed as a result of the
464     *         call
465     */
466    public boolean addChildTaxonNames(TaxonName elementToAdd)
467    {
468        return this.childTaxonNames.add(elementToAdd);
469    }
470
471    /**
472     * Classe regroupant les taxons. Il s'agit en fait d'une combinaison entre un rang taxinomique,
473     * un nom
474     * de taxon, un code et éventuellement un auteur et une date.
475     * Cette classe regroupe les taxons valides, provisoires, obsolètes, virtuels et les synonymes.
476     * On garde l'historique du passage en taxon valide, puis du passage en synonyme (date de fin
477     * référent).
478     * Dans COST : "Use the FAO reference list ftp://ftp.fao.org/FI/stat/data/ASFIS_sp.zip"
479     * @param elementToRemove TaxonName
480     * @return <tt>true</tt> if this collection changed as a result of the
481     *         call
482     */
483    public boolean removeChildTaxonNames(TaxonName elementToRemove)
484    {
485        return this.childTaxonNames.remove(elementToRemove);
486    }
487
488    private Collection<TaxonNameHistory> parentTaxonNameHistories = new HashSet<TaxonNameHistory>();
489
490    /**
491     * 
492     * @return this.parentTaxonNameHistories Collection<TaxonNameHistory>
493     */
494    public Collection<TaxonNameHistory> getParentTaxonNameHistories()
495    {
496        return this.parentTaxonNameHistories;
497    }
498
499    /**
500     * 
501     * @param parentTaxonNameHistoriesIn Collection<TaxonNameHistory>
502     */
503    public void setParentTaxonNameHistories(Collection<TaxonNameHistory> parentTaxonNameHistoriesIn)
504    {
505        this.parentTaxonNameHistories = parentTaxonNameHistoriesIn;
506    }
507
508    /**
509     * 
510     * @param elementToAdd TaxonNameHistory
511     * @return <tt>true</tt> if this collection changed as a result of the
512     *         call
513     */
514    public boolean addParentTaxonNameHistories(TaxonNameHistory elementToAdd)
515    {
516        return this.parentTaxonNameHistories.add(elementToAdd);
517    }
518
519    /**
520     * 
521     * @param elementToRemove TaxonNameHistory
522     * @return <tt>true</tt> if this collection changed as a result of the
523     *         call
524     */
525    public boolean removeParentTaxonNameHistories(TaxonNameHistory elementToRemove)
526    {
527        return this.parentTaxonNameHistories.remove(elementToRemove);
528    }
529
530    private Collection<TaxonNameHistory> taxonNamehistories = new HashSet<TaxonNameHistory>();
531
532    /**
533     * 
534     * @return this.taxonNamehistories Collection<TaxonNameHistory>
535     */
536    public Collection<TaxonNameHistory> getTaxonNamehistories()
537    {
538        return this.taxonNamehistories;
539    }
540
541    /**
542     * 
543     * @param taxonNamehistoriesIn Collection<TaxonNameHistory>
544     */
545    public void setTaxonNamehistories(Collection<TaxonNameHistory> taxonNamehistoriesIn)
546    {
547        this.taxonNamehistories = taxonNamehistoriesIn;
548    }
549
550    /**
551     * 
552     * @param elementToAdd TaxonNameHistory
553     * @return <tt>true</tt> if this collection changed as a result of the
554     *         call
555     */
556    public boolean addTaxonNamehistories(TaxonNameHistory elementToAdd)
557    {
558        return this.taxonNamehistories.add(elementToAdd);
559    }
560
561    /**
562     * 
563     * @param elementToRemove TaxonNameHistory
564     * @return <tt>true</tt> if this collection changed as a result of the
565     *         call
566     */
567    public boolean removeTaxonNamehistories(TaxonNameHistory elementToRemove)
568    {
569        return this.taxonNamehistories.remove(elementToRemove);
570    }
571
572    private TaxonomicLevel taxonomicLevel;
573
574    /**
575     * Liste des rangs taxinomiques possibles.
576     * C’est le nom du rang dans la classification systématique ; les niveaux systématiques sont
577     * désignés
578     * par des termes consacrés (ex. : espèce, genre, famille, etc.). Le niveau systématique d’un
579     * taxon
580     * peut changer avec l’évolution de la classification ; dans ce cas, son libellé est susceptible
581     * de
582     * changer également car les suffixes notamment obéissent à des règles strictes de nomenclature
583     * (règle
584     * [R0018]).
585     * Les niveaux systématiques pris en compte dans le référentiel taxinomique Quadrige² sont (par
586     * ordre
587     * de rang) (le nom anglais de chaque niveau est indiqué entre parenthèses) :
588     * -    Règne (kingdom)
589     * -    Sous-règne (subkingdom)
590     * -    Division (division) / Embranchement (phylum)
591     * -    Subdivision (subdivision) / Sous-embranchement (subphylum)
592     * -    Super-classe (superclass)
593     * -    Classe (class)
594     * -    Sous-classe (subclass)
595     * -    Infra-classe (infraclass)
596     * -    Super-ordre (superordo)
597     * -    Ordre (ordo)
598     * -    Sous-ordre (subordo)
599     * -    Infra-ordre (infraordo)
600     * -    Section (section)
601     * -    Sous-section (subsection)
602     * -    Super-famille (superfamily)
603     * -    Famille (family)
604     * -    Sous-famille (subfamily)
605     * -    Tribu (tribe)
606     * -    Sous-tribu (subtribe)
607     * -    Genre (genus)
608     * -    Sous-genre (subgenus)
609     * -    Espèce (species)
610     * -    Sous-espèce (subspecies)
611     * -    Variété (variety)
612     * -    Sous-variété (subvariety)
613     * -    Forme (forma)
614     * -    Sous-forme (subforma)
615     * -    Incertae sedis (dummy = taxons inclassables)
616     * @return this.taxonomicLevel TaxonomicLevel
617     */
618    public TaxonomicLevel getTaxonomicLevel()
619    {
620        return this.taxonomicLevel;
621    }
622
623    /**
624     * Liste des rangs taxinomiques possibles.
625     * C’est le nom du rang dans la classification systématique ; les niveaux systématiques sont
626     * désignés
627     * par des termes consacrés (ex. : espèce, genre, famille, etc.). Le niveau systématique d’un
628     * taxon
629     * peut changer avec l’évolution de la classification ; dans ce cas, son libellé est susceptible
630     * de
631     * changer également car les suffixes notamment obéissent à des règles strictes de nomenclature
632     * (règle
633     * [R0018]).
634     * Les niveaux systématiques pris en compte dans le référentiel taxinomique Quadrige² sont (par
635     * ordre
636     * de rang) (le nom anglais de chaque niveau est indiqué entre parenthèses) :
637     * -    Règne (kingdom)
638     * -    Sous-règne (subkingdom)
639     * -    Division (division) / Embranchement (phylum)
640     * -    Subdivision (subdivision) / Sous-embranchement (subphylum)
641     * -    Super-classe (superclass)
642     * -    Classe (class)
643     * -    Sous-classe (subclass)
644     * -    Infra-classe (infraclass)
645     * -    Super-ordre (superordo)
646     * -    Ordre (ordo)
647     * -    Sous-ordre (subordo)
648     * -    Infra-ordre (infraordo)
649     * -    Section (section)
650     * -    Sous-section (subsection)
651     * -    Super-famille (superfamily)
652     * -    Famille (family)
653     * -    Sous-famille (subfamily)
654     * -    Tribu (tribe)
655     * -    Sous-tribu (subtribe)
656     * -    Genre (genus)
657     * -    Sous-genre (subgenus)
658     * -    Espèce (species)
659     * -    Sous-espèce (subspecies)
660     * -    Variété (variety)
661     * -    Sous-variété (subvariety)
662     * -    Forme (forma)
663     * -    Sous-forme (subforma)
664     * -    Incertae sedis (dummy = taxons inclassables)
665     * @param taxonomicLevelIn TaxonomicLevel
666     */
667    public void setTaxonomicLevel(TaxonomicLevel taxonomicLevelIn)
668    {
669        this.taxonomicLevel = taxonomicLevelIn;
670    }
671
672    private ReferenceTaxon referenceTaxon;
673
674    /**
675     * 
676     * @return this.referenceTaxon ReferenceTaxon
677     */
678    public ReferenceTaxon getReferenceTaxon()
679    {
680        return this.referenceTaxon;
681    }
682
683    /**
684     * 
685     * @param referenceTaxonIn ReferenceTaxon
686     */
687    public void setReferenceTaxon(ReferenceTaxon referenceTaxonIn)
688    {
689        this.referenceTaxon = referenceTaxonIn;
690    }
691
692    /**
693     * Returns <code>true</code> if the argument is an TaxonName instance and all identifiers for this entity
694     * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
695     */
696    @Override
697    public boolean equals(Object object)
698    {
699        if (this == object)
700        {
701            return true;
702        }
703        if (!(object instanceof TaxonName))
704        {
705            return false;
706        }
707        final TaxonName that = (TaxonName)object;
708        if (this.id == null || that.getId() == null || !this.id.equals(that.getId()))
709        {
710            return false;
711        }
712        return true;
713    }
714
715    /**
716     * Returns a hash code based on this entity's identifiers.
717     */
718    @Override
719    public int hashCode()
720    {
721        int hashCode = 0;
722        hashCode = 29 * hashCode + (this.id == null ? 0 : this.id.hashCode());
723
724        return hashCode;
725    }
726
727    /**
728     * Constructs new instances of {@link TaxonName}.
729     */
730    public static final class Factory
731    {
732        /**
733         * Constructs a new instance of {@link TaxonName}.
734         * @return new TaxonNameImpl()
735         */
736        public static TaxonName newInstance()
737        {
738            return new TaxonNameImpl();
739        }
740
741        /**
742         * Constructs a new instance of {@link TaxonName}, taking all required and/or
743         * read-only properties as arguments, except for identifiers.
744         * @param name String
745         * @param isNaming Boolean
746         * @param isReferent Boolean
747         * @param upperRank Integer
748         * @param isVirtual Boolean
749         * @param isObsolete Boolean
750         * @param isTemporary Boolean
751         * @param startDate Date
752         * @param creationDate Date
753         * @param updateDate Timestamp
754         * @param taxonomicLevel TaxonomicLevel
755         * @param referenceTaxon ReferenceTaxon
756         * @return newInstance
757         */
758        public static TaxonName newInstance(String name, Boolean isNaming, Boolean isReferent, Integer upperRank, Boolean isVirtual, Boolean isObsolete, Boolean isTemporary, Date startDate, Date creationDate, Timestamp updateDate, TaxonomicLevel taxonomicLevel, ReferenceTaxon referenceTaxon)
759        {
760            final TaxonName entity = new TaxonNameImpl();
761            entity.setName(name);
762            entity.setIsNaming(isNaming);
763            entity.setIsReferent(isReferent);
764            entity.setUpperRank(upperRank);
765            entity.setIsVirtual(isVirtual);
766            entity.setIsObsolete(isObsolete);
767            entity.setIsTemporary(isTemporary);
768            entity.setStartDate(startDate);
769            entity.setCreationDate(creationDate);
770            entity.setUpdateDate(updateDate);
771            entity.setTaxonomicLevel(taxonomicLevel);
772            entity.setReferenceTaxon(referenceTaxon);
773            return entity;
774        }
775
776        /**
777         * Constructs a new instance of {@link TaxonName}, taking all possible properties
778         * (except the identifier(s))as arguments.
779         * @param name String
780         * @param completeName String
781         * @param isNaming Boolean
782         * @param isReferent Boolean
783         * @param upperRank Integer
784         * @param isVirtual Boolean
785         * @param isObsolete Boolean
786         * @param isTemporary Boolean
787         * @param startDate Date
788         * @param endDate Date
789         * @param comments String
790         * @param creationDate Date
791         * @param updateDate Timestamp
792         * @param citation Citation
793         * @param parentTaxonName TaxonName
794         * @param childTaxonNames Collection<TaxonName>
795         * @param parentTaxonNameHistories Collection<TaxonNameHistory>
796         * @param taxonNamehistories Collection<TaxonNameHistory>
797         * @param taxonomicLevel TaxonomicLevel
798         * @param referenceTaxon ReferenceTaxon
799         * @return newInstance TaxonName
800         */
801        public static TaxonName newInstance(String name, String completeName, Boolean isNaming, Boolean isReferent, Integer upperRank, Boolean isVirtual, Boolean isObsolete, Boolean isTemporary, Date startDate, Date endDate, String comments, Date creationDate, Timestamp updateDate, Citation citation, TaxonName parentTaxonName, Collection<TaxonName> childTaxonNames, Collection<TaxonNameHistory> parentTaxonNameHistories, Collection<TaxonNameHistory> taxonNamehistories, TaxonomicLevel taxonomicLevel, ReferenceTaxon referenceTaxon)
802        {
803            final TaxonName entity = new TaxonNameImpl();
804            entity.setName(name);
805            entity.setCompleteName(completeName);
806            entity.setIsNaming(isNaming);
807            entity.setIsReferent(isReferent);
808            entity.setUpperRank(upperRank);
809            entity.setIsVirtual(isVirtual);
810            entity.setIsObsolete(isObsolete);
811            entity.setIsTemporary(isTemporary);
812            entity.setStartDate(startDate);
813            entity.setEndDate(endDate);
814            entity.setComments(comments);
815            entity.setCreationDate(creationDate);
816            entity.setUpdateDate(updateDate);
817            entity.setCitation(citation);
818            entity.setParentTaxonName(parentTaxonName);
819            entity.setChildTaxonNames(childTaxonNames);
820            entity.setParentTaxonNameHistories(parentTaxonNameHistories);
821            entity.setTaxonNamehistories(taxonNamehistories);
822            entity.setTaxonomicLevel(taxonomicLevel);
823            entity.setReferenceTaxon(referenceTaxon);
824            return entity;
825        }
826    }
827
828    /**
829     * @see Comparable#compareTo
830     */
831    public int compareTo(TaxonName o)
832    {
833        int cmp = 0;
834        if (this.getId() != null)
835        {
836            cmp = this.getId().compareTo(o.getId());
837        }
838        else
839        {
840            if (this.getName() != null)
841            {
842                cmp = (cmp != 0 ? cmp : this.getName().compareTo(o.getName()));
843            }
844            if (this.getCompleteName() != null)
845            {
846                cmp = (cmp != 0 ? cmp : this.getCompleteName().compareTo(o.getCompleteName()));
847            }
848            if (this.isIsNaming() != null)
849            {
850                cmp = (cmp != 0 ? cmp : this.isIsNaming().compareTo(o.isIsNaming()));
851            }
852            if (this.isIsReferent() != null)
853            {
854                cmp = (cmp != 0 ? cmp : this.isIsReferent().compareTo(o.isIsReferent()));
855            }
856            if (this.getUpperRank() != null)
857            {
858                cmp = (cmp != 0 ? cmp : this.getUpperRank().compareTo(o.getUpperRank()));
859            }
860            if (this.isIsVirtual() != null)
861            {
862                cmp = (cmp != 0 ? cmp : this.isIsVirtual().compareTo(o.isIsVirtual()));
863            }
864            if (this.isIsObsolete() != null)
865            {
866                cmp = (cmp != 0 ? cmp : this.isIsObsolete().compareTo(o.isIsObsolete()));
867            }
868            if (this.isIsTemporary() != null)
869            {
870                cmp = (cmp != 0 ? cmp : this.isIsTemporary().compareTo(o.isIsTemporary()));
871            }
872            if (this.getStartDate() != null)
873            {
874                cmp = (cmp != 0 ? cmp : this.getStartDate().compareTo(o.getStartDate()));
875            }
876            if (this.getEndDate() != null)
877            {
878                cmp = (cmp != 0 ? cmp : this.getEndDate().compareTo(o.getEndDate()));
879            }
880            if (this.getComments() != null)
881            {
882                cmp = (cmp != 0 ? cmp : this.getComments().compareTo(o.getComments()));
883            }
884            if (this.getCreationDate() != null)
885            {
886                cmp = (cmp != 0 ? cmp : this.getCreationDate().compareTo(o.getCreationDate()));
887            }
888            if (this.getUpdateDate() != null)
889            {
890                cmp = (cmp != 0 ? cmp : this.getUpdateDate().compareTo(o.getUpdateDate()));
891            }
892        }
893        return cmp;
894    }
895// HibernateEntity.vsl merge-point
896// TaxonName.java merge-point
897}