// license-header java merge-point // // Attention: Generated code! Do not modify by hand! // Generated by EntityEmbeddable.vsl in andromda-ejb3-cartridge on 09/18/2014 16:56:07. // package org.andromda.test.howto16.a; import java.io.Serializable; import java.util.Collection; import java.util.Date; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** *
* TODO: Model Documentation for org.andromda.test.howto16.a.Person *
* * Autogenerated POJO EJB class for Person containing the * bulk of the entity implementation. * * This is autogenerated by AndroMDA using the EJB3 * cartridge. * * DO NOT MODIFY this class. */ @Entity @Table(name="PERSON") @NamedQueries ({ @NamedQuery(name="Person.findAll", query="SELECT p from Person as p"), @NamedQuery(name="Person.findByName", query="SELECT p from Person as p WHERE p.name = :name") }) public class Person implements Serializable, Comparable* TODO: Model Documentation for name *
* Get the name property. * @return String The value of name */ @Column(name="NAME", unique=true, nullable=false, insertable=true, updatable=true, length=50) @NotNull(message="name is required") @Size(max=50) public String getName() { return this.name; } /** ** TODO: Model Documentation for name *
* Set the name property. * @param value the new value */ public void setName(String value) { this.name = value; } /** ** TODO: Model Documentation for birthDate *
* Get the birthDate property. * @return Date The value of birthDate */ @Column(name="BIRTH_DATE", nullable=false, insertable=true, updatable=true) @Temporal(TemporalType.TIMESTAMP) @NotNull(message="birthDate is required") public Date getBirthDate() { return this.birthDate; } /** ** TODO: Model Documentation for birthDate *
* Set the birthDate property. * @param value the new value */ public void setBirthDate(Date value) { this.birthDate = value; } /** ** TODO: Model Documentation for id *
* Get the id property. * @return Long The value of id */ @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name="ID", nullable=false, insertable=true, updatable=true) public Long getId() { return this.id; } /** ** TODO: Model Documentation for id *
* Set the id property. * @param value the new value */ public void setId(Long value) { this.id = value; } // ------------- 1 Relations ------------------ /** ** TODO: Model Documentation for cars *
* Get the cars Collection * @return Set* TODO: Model Documentation for cars *
* Set the cars * @param carsIn */ public void setCars (Set* TODO: Model Documentation for cars *
* Get the carsLabels * @return String */ @Transient public String getCarsLabels() { return this.carsLabels; } /** ** TODO: Model Documentation for cars *
* Set the carsLabels * @param carsLabelsIn */ public void setCarsLabels (String carsLabelsIn) { this.carsLabels = carsLabelsIn; } // --------------- Constructors ----------------- /** * Default empty no-arg constructor */ public Person() { // Default empty constructor } /** * Constructor with all updatable Entity attributes except auto incremented identifiers. * * @param name String value for the name property required=true lower=1 * @param birthDate Date value for the birthDate property required=true lower=1 */ public Person(String name, Date birthDate) { this.name = name; this.birthDate = birthDate; } /** * Constructor with all Entity attribute values and CMR relations. * * @param name String value for the name property * @param birthDate Date value for the birthDate property * @param cars Set