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.grouping; 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 fr.ifremer.adagio.core.dao.referential.Status; 032import fr.ifremer.adagio.core.dao.referential.ValidityStatus; 033import java.io.Serializable; 034import java.sql.Timestamp; 035import java.util.Collection; 036import java.util.HashSet; 037 038/** 039 * <html> 040 * <head> 041 * <style> 042 * p {padding:0px; margin:0px;} 043 * </style> 044 * </head> 045 * <body> 046 * <p> 047 * Un regroupement représente un groupement d'entités (du référentiel ou 048 * bien de navires), correspondant à un niveau de regroupement donné (<i>GroupingLevel</i>). 049 * </p> 050 * <p> 051 * </p> 052 * <p> 053 * Un regroupement peut faire référence à une ou plusieurs entités du 054 * référentiel (<i>GroupingItem</i>). Généralement, surtout les 055 * regroupements de plus bas niveau sont liés à des entités du référentiel 056 * (plus facile à maintenir), puis une table technique remplie toutes les 057 * associations possible avec les ancêtres (cf <i>GroupingItemHierarchy</i>). 058 * </p> 059 * <p> 060 * </p> 061 * <p> 062 * Un regroupement peut avoir un regroupement parent. 063 * </p> 064 * </body> 065 * </html> 066 */ 067// HibernateEntity.vsl annotations merge-point 068public abstract class Grouping 069 implements Serializable, Comparable<Grouping> 070{ 071 /** 072 * The serial version UID of this class. Needed for serialization. 073 */ 074 private static final long serialVersionUID = -1546894849821973064L; 075 076 // Generate 7 attributes 077 private Integer id; 078 079 /** 080 * Identifiant interne. Généré par le système. 081 * @return this.id Integer 082 */ 083 public Integer getId() 084 { 085 return this.id; 086 } 087 088 /** 089 * Identifiant interne. Généré par le système. 090 * @param idIn Integer 091 */ 092 public void setId(Integer idIn) 093 { 094 this.id = idIn; 095 } 096 097 private String label; 098 099 /** 100 * <html> 101 * <head> 102 * <style> 103 * p {padding:0px; margin:0px;} 104 * </style> 105 * </head> 106 * <body> 107 * <p> 108 * Code mnémotechnique représentant le regroupement. 109 * </p> 110 * <p> 111 * </p> 112 * <p> 113 * Par exemple : 114 * </p> 115 * <p> 116 * - pour une classe taille de navire : "[0-10[m", "[10-20[m", etc. 117 * </p> 118 * <p> 119 * - pour un regroupement de métiers, le code du regroupement, etc. 120 * </p> 121 * </body> 122 * </html> 123 * @return this.label String 124 */ 125 public String getLabel() 126 { 127 return this.label; 128 } 129 130 /** 131 * <html> 132 * <head> 133 * <style> 134 * p {padding:0px; margin:0px;} 135 * </style> 136 * </head> 137 * <body> 138 * <p> 139 * Code mnémotechnique représentant le regroupement. 140 * </p> 141 * <p> 142 * </p> 143 * <p> 144 * Par exemple : 145 * </p> 146 * <p> 147 * - pour une classe taille de navire : "[0-10[m", "[10-20[m", etc. 148 * </p> 149 * <p> 150 * - pour un regroupement de métiers, le code du regroupement, etc. 151 * </p> 152 * </body> 153 * </html> 154 * @param labelIn String 155 */ 156 public void setLabel(String labelIn) 157 { 158 this.label = labelIn; 159 } 160 161 private String name; 162 163 /** 164 * 165 * @return this.name String 166 */ 167 public String getName() 168 { 169 return this.name; 170 } 171 172 /** 173 * 174 * @param nameIn String 175 */ 176 public void setName(String nameIn) 177 { 178 this.name = nameIn; 179 } 180 181 private Double minValue; 182 183 /** 184 * <html> 185 * <head> 186 * <style> 187 * p {padding:0px; margin:0px;} 188 * </style> 189 * </head> 190 * <body> 191 * <p> 192 * Valeur minimum de la caractéristique de regroupement. 193 * </p> 194 * <p> 195 * </p> 196 * <p> 197 * Uniquement dans le cas où une caractéristique a été définie sur le 198 * niveau de regroupement parent (uniquement si <i>GroupLevel.featuresPmfm </i>est 199 * renseigné). 200 * </p> 201 * <p> 202 * </p> 203 * <p> 204 * Exemple : Si la caractéristique est "Longueur du navire", la valeur min 205 * vaudra "10", pour une classe de taille de 10 à 20 m. 206 * </p> 207 * </body> 208 * </html> 209 * @return this.minValue Double 210 */ 211 public Double getMinValue() 212 { 213 return this.minValue; 214 } 215 216 /** 217 * <html> 218 * <head> 219 * <style> 220 * p {padding:0px; margin:0px;} 221 * </style> 222 * </head> 223 * <body> 224 * <p> 225 * Valeur minimum de la caractéristique de regroupement. 226 * </p> 227 * <p> 228 * </p> 229 * <p> 230 * Uniquement dans le cas où une caractéristique a été définie sur le 231 * niveau de regroupement parent (uniquement si <i>GroupLevel.featuresPmfm </i>est 232 * renseigné). 233 * </p> 234 * <p> 235 * </p> 236 * <p> 237 * Exemple : Si la caractéristique est "Longueur du navire", la valeur min 238 * vaudra "10", pour une classe de taille de 10 à 20 m. 239 * </p> 240 * </body> 241 * </html> 242 * @param minValueIn Double 243 */ 244 public void setMinValue(Double minValueIn) 245 { 246 this.minValue = minValueIn; 247 } 248 249 private Double maxValue; 250 251 /** 252 * <html> 253 * <head> 254 * <style> 255 * p {padding:0px; margin:0px;} 256 * </style> 257 * </head> 258 * <body> 259 * <p> 260 * Valeur maximale de la caractéristique de regroupement. 261 * </p> 262 * <p> 263 * </p> 264 * <p> 265 * Uniquement dans le cas où une caractéristique a été définie sur le 266 * niveau de regroupement parent (uniquement si <i>GroupLevel.featuresPmfm </i>est 267 * renseigné). 268 * </p> 269 * <p> 270 * </p> 271 * <p> 272 * Par convention, la valeur maximale du regroupement est EXCLUE. 273 * </p> 274 * <p> 275 * </p> 276 * <p> 277 * Exemple : Si la caractéristique est "Longueur du navire", la valeur max 278 * vaudra "20", pour une classe de taille de [10-20[m (20 étant exclu). 279 * </p> 280 * </body> 281 * </html> 282 * @return this.maxValue Double 283 */ 284 public Double getMaxValue() 285 { 286 return this.maxValue; 287 } 288 289 /** 290 * <html> 291 * <head> 292 * <style> 293 * p {padding:0px; margin:0px;} 294 * </style> 295 * </head> 296 * <body> 297 * <p> 298 * Valeur maximale de la caractéristique de regroupement. 299 * </p> 300 * <p> 301 * </p> 302 * <p> 303 * Uniquement dans le cas où une caractéristique a été définie sur le 304 * niveau de regroupement parent (uniquement si <i>GroupLevel.featuresPmfm </i>est 305 * renseigné). 306 * </p> 307 * <p> 308 * </p> 309 * <p> 310 * Par convention, la valeur maximale du regroupement est EXCLUE. 311 * </p> 312 * <p> 313 * </p> 314 * <p> 315 * Exemple : Si la caractéristique est "Longueur du navire", la valeur max 316 * vaudra "20", pour une classe de taille de [10-20[m (20 étant exclu). 317 * </p> 318 * </body> 319 * </html> 320 * @param maxValueIn Double 321 */ 322 public void setMaxValue(Double maxValueIn) 323 { 324 this.maxValue = maxValueIn; 325 } 326 327 private Timestamp updateDate; 328 329 /** 330 * 331 * @return this.updateDate Timestamp 332 */ 333 public Timestamp getUpdateDate() 334 { 335 return this.updateDate; 336 } 337 338 /** 339 * 340 * @param updateDateIn Timestamp 341 */ 342 public void setUpdateDate(Timestamp updateDateIn) 343 { 344 this.updateDate = updateDateIn; 345 } 346 347 private String comments; 348 349 /** 350 * 351 * @return this.comments String 352 */ 353 public String getComments() 354 { 355 return this.comments; 356 } 357 358 /** 359 * 360 * @param commentsIn String 361 */ 362 public void setComments(String commentsIn) 363 { 364 this.comments = commentsIn; 365 } 366 367 // Generate 12 associations 368 private ValidityStatus validityStatus; 369 370 /** 371 * Etat de validation d'une donnée du référentiel. Utile pour les responsables de référentiel. 372 * Validity status of a referential data. 373 * @return this.validityStatus ValidityStatus 374 */ 375 public ValidityStatus getValidityStatus() 376 { 377 return this.validityStatus; 378 } 379 380 /** 381 * Etat de validation d'une donnée du référentiel. Utile pour les responsables de référentiel. 382 * Validity status of a referential data. 383 * @param validityStatusIn ValidityStatus 384 */ 385 public void setValidityStatus(ValidityStatus validityStatusIn) 386 { 387 this.validityStatus = validityStatusIn; 388 } 389 390 private Grouping parentGrouping; 391 392 /** 393 * Le regroupement parent (optionnel). 394 * @return this.parentGrouping Grouping 395 */ 396 public Grouping getParentGrouping() 397 { 398 return this.parentGrouping; 399 } 400 401 /** 402 * Le regroupement parent (optionnel). 403 * @param parentGroupingIn Grouping 404 */ 405 public void setParentGrouping(Grouping parentGroupingIn) 406 { 407 this.parentGrouping = parentGroupingIn; 408 } 409 410 private Collection<Grouping> groupings = new HashSet<Grouping>(); 411 412 /** 413 * <html> 414 * <head> 415 * <style> 416 * p {padding:0px; margin:0px;} 417 * </style> 418 * </head> 419 * <body> 420 * <p> 421 * Un regroupement représente un groupement d'entités (du référentiel ou 422 * bien de navires), correspondant à un niveau de regroupement donné (<i>GroupingLevel</i>). 423 * </p> 424 * <p> 425 * </p> 426 * <p> 427 * Un regroupement peut faire référence à une ou plusieurs entités du 428 * référentiel (<i>GroupingItem</i>). Généralement, surtout les 429 * regroupements de plus bas niveau sont liés à des entités du référentiel 430 * (plus facile à maintenir), puis une table technique remplie toutes les 431 * associations possible avec les ancêtres (cf <i>GroupingItemHierarchy</i>). 432 * </p> 433 * <p> 434 * </p> 435 * <p> 436 * Un regroupement peut avoir un regroupement parent. 437 * </p> 438 * </body> 439 * </html> 440 * @return this.groupings Collection<Grouping> 441 */ 442 public Collection<Grouping> getGroupings() 443 { 444 return this.groupings; 445 } 446 447 /** 448 * <html> 449 * <head> 450 * <style> 451 * p {padding:0px; margin:0px;} 452 * </style> 453 * </head> 454 * <body> 455 * <p> 456 * Un regroupement représente un groupement d'entités (du référentiel ou 457 * bien de navires), correspondant à un niveau de regroupement donné (<i>GroupingLevel</i>). 458 * </p> 459 * <p> 460 * </p> 461 * <p> 462 * Un regroupement peut faire référence à une ou plusieurs entités du 463 * référentiel (<i>GroupingItem</i>). Généralement, surtout les 464 * regroupements de plus bas niveau sont liés à des entités du référentiel 465 * (plus facile à maintenir), puis une table technique remplie toutes les 466 * associations possible avec les ancêtres (cf <i>GroupingItemHierarchy</i>). 467 * </p> 468 * <p> 469 * </p> 470 * <p> 471 * Un regroupement peut avoir un regroupement parent. 472 * </p> 473 * </body> 474 * </html> 475 * @param groupingsIn Collection<Grouping> 476 */ 477 public void setGroupings(Collection<Grouping> groupingsIn) 478 { 479 this.groupings = groupingsIn; 480 } 481 482 /** 483 * <html> 484 * <head> 485 * <style> 486 * p {padding:0px; margin:0px;} 487 * </style> 488 * </head> 489 * <body> 490 * <p> 491 * Un regroupement représente un groupement d'entités (du référentiel ou 492 * bien de navires), correspondant à un niveau de regroupement donné (<i>GroupingLevel</i>). 493 * </p> 494 * <p> 495 * </p> 496 * <p> 497 * Un regroupement peut faire référence à une ou plusieurs entités du 498 * référentiel (<i>GroupingItem</i>). Généralement, surtout les 499 * regroupements de plus bas niveau sont liés à des entités du référentiel 500 * (plus facile à maintenir), puis une table technique remplie toutes les 501 * associations possible avec les ancêtres (cf <i>GroupingItemHierarchy</i>). 502 * </p> 503 * <p> 504 * </p> 505 * <p> 506 * Un regroupement peut avoir un regroupement parent. 507 * </p> 508 * </body> 509 * </html> 510 * @param elementToAdd Grouping 511 * @return <tt>true</tt> if this collection changed as a result of the 512 * call 513 */ 514 public boolean addGroupings(Grouping elementToAdd) 515 { 516 return this.groupings.add(elementToAdd); 517 } 518 519 /** 520 * <html> 521 * <head> 522 * <style> 523 * p {padding:0px; margin:0px;} 524 * </style> 525 * </head> 526 * <body> 527 * <p> 528 * Un regroupement représente un groupement d'entités (du référentiel ou 529 * bien de navires), correspondant à un niveau de regroupement donné (<i>GroupingLevel</i>). 530 * </p> 531 * <p> 532 * </p> 533 * <p> 534 * Un regroupement peut faire référence à une ou plusieurs entités du 535 * référentiel (<i>GroupingItem</i>). Généralement, surtout les 536 * regroupements de plus bas niveau sont liés à des entités du référentiel 537 * (plus facile à maintenir), puis une table technique remplie toutes les 538 * associations possible avec les ancêtres (cf <i>GroupingItemHierarchy</i>). 539 * </p> 540 * <p> 541 * </p> 542 * <p> 543 * Un regroupement peut avoir un regroupement parent. 544 * </p> 545 * </body> 546 * </html> 547 * @param elementToRemove Grouping 548 * @return <tt>true</tt> if this collection changed as a result of the 549 * call 550 */ 551 public boolean removeGroupings(Grouping elementToRemove) 552 { 553 return this.groupings.remove(elementToRemove); 554 } 555 556 private GroupingClassification groupingClassification; 557 558 /** 559 * <html> 560 * <head> 561 * <style> 562 * p {padding:0px; margin:0px;} 563 * </style> 564 * </head> 565 * <body> 566 * <p> 567 * Classification du regroupement. 568 * </p> 569 * <p> 570 * Lien utilisé pour optimiser les performances, car déjà présent dans le <i>GroupingLevel</i> 571 * lié. 572 * </p> 573 * <p> 574 * </p> 575 * <p> 576 * Doit être identique à la classification du <i>GroupingLevel</i> 577 * lié. 578 * </p> 579 * </body> 580 * </html> 581 * @return this.groupingClassification GroupingClassification 582 */ 583 public GroupingClassification getGroupingClassification() 584 { 585 return this.groupingClassification; 586 } 587 588 /** 589 * <html> 590 * <head> 591 * <style> 592 * p {padding:0px; margin:0px;} 593 * </style> 594 * </head> 595 * <body> 596 * <p> 597 * Classification du regroupement. 598 * </p> 599 * <p> 600 * Lien utilisé pour optimiser les performances, car déjà présent dans le <i>GroupingLevel</i> 601 * lié. 602 * </p> 603 * <p> 604 * </p> 605 * <p> 606 * Doit être identique à la classification du <i>GroupingLevel</i> 607 * lié. 608 * </p> 609 * </body> 610 * </html> 611 * @param groupingClassificationIn GroupingClassification 612 */ 613 public void setGroupingClassification(GroupingClassification groupingClassificationIn) 614 { 615 this.groupingClassification = groupingClassificationIn; 616 } 617 618 private Status status; 619 620 /** 621 * Etat de saisie (actif/Inactif) du regroupement. 622 * @return this.status Status 623 */ 624 public Status getStatus() 625 { 626 return this.status; 627 } 628 629 /** 630 * Etat de saisie (actif/Inactif) du regroupement. 631 * @param statusIn Status 632 */ 633 public void setStatus(Status statusIn) 634 { 635 this.status = statusIn; 636 } 637 638 private Collection<GroupingItem> groupingItems = new HashSet<GroupingItem>(); 639 640 /** 641 * <html> 642 * <head> 643 * <style> 644 * p {padding:0px; margin:0px;} 645 * </style> 646 * </head> 647 * <body> 648 * <p> 649 * <i>GroupingItem</i> permet de lister les entités du référentiel qui 650 * appartiennent à un regroupement. 651 * </p> 652 * </body> 653 * </html> 654 * @return this.groupingItems Collection<GroupingItem> 655 */ 656 public Collection<GroupingItem> getGroupingItems() 657 { 658 return this.groupingItems; 659 } 660 661 /** 662 * <html> 663 * <head> 664 * <style> 665 * p {padding:0px; margin:0px;} 666 * </style> 667 * </head> 668 * <body> 669 * <p> 670 * <i>GroupingItem</i> permet de lister les entités du référentiel qui 671 * appartiennent à un regroupement. 672 * </p> 673 * </body> 674 * </html> 675 * @param groupingItemsIn Collection<GroupingItem> 676 */ 677 public void setGroupingItems(Collection<GroupingItem> groupingItemsIn) 678 { 679 this.groupingItems = groupingItemsIn; 680 } 681 682 /** 683 * <html> 684 * <head> 685 * <style> 686 * p {padding:0px; margin:0px;} 687 * </style> 688 * </head> 689 * <body> 690 * <p> 691 * <i>GroupingItem</i> permet de lister les entités du référentiel qui 692 * appartiennent à un regroupement. 693 * </p> 694 * </body> 695 * </html> 696 * @param elementToAdd GroupingItem 697 * @return <tt>true</tt> if this collection changed as a result of the 698 * call 699 */ 700 public boolean addGroupingItems(GroupingItem elementToAdd) 701 { 702 return this.groupingItems.add(elementToAdd); 703 } 704 705 /** 706 * <html> 707 * <head> 708 * <style> 709 * p {padding:0px; margin:0px;} 710 * </style> 711 * </head> 712 * <body> 713 * <p> 714 * <i>GroupingItem</i> permet de lister les entités du référentiel qui 715 * appartiennent à un regroupement. 716 * </p> 717 * </body> 718 * </html> 719 * @param elementToRemove GroupingItem 720 * @return <tt>true</tt> if this collection changed as a result of the 721 * call 722 */ 723 public boolean removeGroupingItems(GroupingItem elementToRemove) 724 { 725 return this.groupingItems.remove(elementToRemove); 726 } 727 728 private GroupingLevel groupingLevel; 729 730 /** 731 * <html> 732 * <head> 733 * <style> 734 * p {padding:0px; margin:0px;} 735 * </style> 736 * </head> 737 * <body> 738 * <p> 739 * Niveau de regroupement, d'une classification donnée. 740 * </p> 741 * <p> 742 * </p> 743 * <p> 744 * Exemple : pour les métiers, on peut avoir les niveaux de regroupement 745 * suivants : arts, grandes familles d’engins, … 746 * </p> 747 * <p> 748 * </p> 749 * <p> 750 * Un niveau de regroupement peut avoir un niveau parent. 751 * </p> 752 * <p> 753 * </p> 754 * <p> 755 * Un niveau de regroupement contient un ou plusieurs regroupements (<i>Grouping</i>). 756 * </p> 757 * </body> 758 * </html> 759 * @return this.groupingLevel GroupingLevel 760 */ 761 public GroupingLevel getGroupingLevel() 762 { 763 return this.groupingLevel; 764 } 765 766 /** 767 * <html> 768 * <head> 769 * <style> 770 * p {padding:0px; margin:0px;} 771 * </style> 772 * </head> 773 * <body> 774 * <p> 775 * Niveau de regroupement, d'une classification donnée. 776 * </p> 777 * <p> 778 * </p> 779 * <p> 780 * Exemple : pour les métiers, on peut avoir les niveaux de regroupement 781 * suivants : arts, grandes familles d’engins, … 782 * </p> 783 * <p> 784 * </p> 785 * <p> 786 * Un niveau de regroupement peut avoir un niveau parent. 787 * </p> 788 * <p> 789 * </p> 790 * <p> 791 * Un niveau de regroupement contient un ou plusieurs regroupements (<i>Grouping</i>). 792 * </p> 793 * </body> 794 * </html> 795 * @param groupingLevelIn GroupingLevel 796 */ 797 public void setGroupingLevel(GroupingLevel groupingLevelIn) 798 { 799 this.groupingLevel = groupingLevelIn; 800 } 801 802 /** 803 * Returns <code>true</code> if the argument is an Grouping instance and all identifiers for this entity 804 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise. 805 */ 806 @Override 807 public boolean equals(Object object) 808 { 809 if (this == object) 810 { 811 return true; 812 } 813 if (!(object instanceof Grouping)) 814 { 815 return false; 816 } 817 final Grouping that = (Grouping)object; 818 if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) 819 { 820 return false; 821 } 822 return true; 823 } 824 825 /** 826 * Returns a hash code based on this entity's identifiers. 827 */ 828 @Override 829 public int hashCode() 830 { 831 int hashCode = 0; 832 hashCode = 29 * hashCode + (this.id == null ? 0 : this.id.hashCode()); 833 834 return hashCode; 835 } 836 837 /** 838 * Constructs new instances of {@link Grouping}. 839 */ 840 public static final class Factory 841 { 842 /** 843 * Constructs a new instance of {@link Grouping}. 844 * @return new GroupingImpl() 845 */ 846 public static Grouping newInstance() 847 { 848 return new GroupingImpl(); 849 } 850 851 /** 852 * Constructs a new instance of {@link Grouping}, taking all required and/or 853 * read-only properties as arguments, except for identifiers. 854 * @param label String 855 * @param name String 856 * @param updateDate Timestamp 857 * @param validityStatus ValidityStatus 858 * @param groupingClassification GroupingClassification 859 * @param status Status 860 * @param groupingLevel GroupingLevel 861 * @return newInstance 862 */ 863 public static Grouping newInstance(String label, String name, Timestamp updateDate, ValidityStatus validityStatus, GroupingClassification groupingClassification, Status status, GroupingLevel groupingLevel) 864 { 865 final Grouping entity = new GroupingImpl(); 866 entity.setLabel(label); 867 entity.setName(name); 868 entity.setUpdateDate(updateDate); 869 entity.setValidityStatus(validityStatus); 870 entity.setGroupingClassification(groupingClassification); 871 entity.setStatus(status); 872 entity.setGroupingLevel(groupingLevel); 873 return entity; 874 } 875 876 /** 877 * Constructs a new instance of {@link Grouping}, taking all possible properties 878 * (except the identifier(s))as arguments. 879 * @param label String 880 * @param name String 881 * @param minValue Double 882 * @param maxValue Double 883 * @param updateDate Timestamp 884 * @param comments String 885 * @param validityStatus ValidityStatus 886 * @param parentGrouping Grouping 887 * @param groupings Collection<Grouping> 888 * @param groupingClassification GroupingClassification 889 * @param status Status 890 * @param groupingItems Collection<GroupingItem> 891 * @param groupingLevel GroupingLevel 892 * @return newInstance Grouping 893 */ 894 public static Grouping newInstance(String label, String name, Double minValue, Double maxValue, Timestamp updateDate, String comments, ValidityStatus validityStatus, Grouping parentGrouping, Collection<Grouping> groupings, GroupingClassification groupingClassification, Status status, Collection<GroupingItem> groupingItems, GroupingLevel groupingLevel) 895 { 896 final Grouping entity = new GroupingImpl(); 897 entity.setLabel(label); 898 entity.setName(name); 899 entity.setMinValue(minValue); 900 entity.setMaxValue(maxValue); 901 entity.setUpdateDate(updateDate); 902 entity.setComments(comments); 903 entity.setValidityStatus(validityStatus); 904 entity.setParentGrouping(parentGrouping); 905 entity.setGroupings(groupings); 906 entity.setGroupingClassification(groupingClassification); 907 entity.setStatus(status); 908 entity.setGroupingItems(groupingItems); 909 entity.setGroupingLevel(groupingLevel); 910 return entity; 911 } 912 } 913 914 /** 915 * @see Comparable#compareTo 916 */ 917 public int compareTo(Grouping o) 918 { 919 int cmp = 0; 920 if (this.getId() != null) 921 { 922 cmp = this.getId().compareTo(o.getId()); 923 } 924 else 925 { 926 if (this.getLabel() != null) 927 { 928 cmp = (cmp != 0 ? cmp : this.getLabel().compareTo(o.getLabel())); 929 } 930 if (this.getName() != null) 931 { 932 cmp = (cmp != 0 ? cmp : this.getName().compareTo(o.getName())); 933 } 934 if (this.getMinValue() != null) 935 { 936 cmp = (cmp != 0 ? cmp : this.getMinValue().compareTo(o.getMinValue())); 937 } 938 if (this.getMaxValue() != null) 939 { 940 cmp = (cmp != 0 ? cmp : this.getMaxValue().compareTo(o.getMaxValue())); 941 } 942 if (this.getUpdateDate() != null) 943 { 944 cmp = (cmp != 0 ? cmp : this.getUpdateDate().compareTo(o.getUpdateDate())); 945 } 946 if (this.getComments() != null) 947 { 948 cmp = (cmp != 0 ? cmp : this.getComments().compareTo(o.getComments())); 949 } 950 } 951 return cmp; 952 } 953// HibernateEntity.vsl merge-point 954// Grouping.java merge-point 955}