1 /* 2 * EL4J, the Extension Library for the J2EE, adds incremental enhancements to 3 * the spring framework, http://el4j.sf.net 4 * Copyright (C) 2010 by ELCA Informatique SA, Av. de la Harpe 22-24, 5 * 1000 Lausanne, Switzerland, http://www.elca.ch 6 * 7 * EL4J is published under the GNU Lesser General Public License (LGPL) 8 * Version 2.1. See http://www.gnu.org/licenses/ 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * For alternative licensing, please contact info@elca.ch 16 */ 17 package ch.elca.el4j.tests.aspects.model; 18 19 import javax.persistence.Entity; 20 21 import org.hibernate.annotations.GenericGenerator; 22 import org.hibernate.validator.Length; 23 import org.hibernate.validator.NotEmpty; 24 25 import ch.elca.el4j.services.persistence.generic.dto.AbstractIntKeyIntOptimisticLockingDto; 26 27 /** 28 * Domain class to test aspects behavior in Spring/EL4J. 29 * 30 * @svnLink $Revision: 4253 $;$Date: 2010-12-21 11:08:04 +0100 (Di, 21. Dez 2010) $;$Author: swismer $;$URL: https://el4j.svn.sourceforge.net/svnroot/el4j/branches/el4j_3_1/el4j/framework/tests/aspects/src/main/java/ch/elca/el4j/tests/aspects/model/AspectsTests.java $ 31 * 32 * @author Martin Zeltner (MZE) 33 */ 34 @Entity 35 @GenericGenerator(name = "keyid_generator", 36 strategy = "ch.elca.el4j.services.persistence.hibernate.TriggerAssignedIdentityGenerator") 37 public class AspectsTests extends AbstractIntKeyIntOptimisticLockingDto { 38 /** Serial version UID. */ 39 private static final long serialVersionUID = 229623693736593007L; 40 41 /** Name. */ 42 private String name; 43 44 /** Description. */ 45 private String description; 46 47 /** 48 * @return Returns the name. 49 */ 50 @NotEmpty 51 @Length(max = 64) 52 public String getName() { 53 return name; 54 } 55 56 /** 57 * @param name Is the name to set. 58 */ 59 public void setName(String name) { 60 this.name = name; 61 } 62 63 /** 64 * @return Returns the description. 65 */ 66 @Length(max = 256) 67 public String getDescription() { 68 return description; 69 } 70 71 /** 72 * @param description Is the description to set. 73 */ 74 public void setDescription(String description) { 75 this.description = description; 76 } 77 }