Skip to content

Instantly share code, notes, and snippets.

@gbougeard
Created May 1, 2012 14:17
Show Gist options
  • Save gbougeard/2568203 to your computer and use it in GitHub Desktop.
Save gbougeard/2568203 to your computer and use it in GitHub Desktop.
FormationItem entity
@Entity
@Table(name = FormationItem.TABLE_NAME)
public class FormationItem implements Serializable {
private static final long serialVersionUID = 1L;
public static final String TABLE_NAME = "formation_item";
public static final String COL_ID = "id_formation_item";
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = COL_ID)
private Long idFormationItem;
public static final String PROP_NUM = "numItem";
public static final String COL_NUM = "num_item";
@Basic(optional = false)
@NotNull(message = "Numero obligatoire")
@Column(name = COL_NUM)
private Integer numItem;
public static final String PROP_COORD = "coord";
@Basic(optional = false)
@Column(name = PROP_COORD)
private Integer coord;
public static final String COL_ID_FORMATION = "id_formation";
public static final String PROP_FORMATION = "formation";
@ManyToOne(cascade= CascadeType.ALL)
@JoinColumn(name = COL_ID_FORMATION)
private Formation formation;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment