Skip to content

Instantly share code, notes, and snippets.

@vdenotaris
Created September 25, 2014 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vdenotaris/38077fdeee2e5683cd62 to your computer and use it in GitHub Desktop.
Save vdenotaris/38077fdeee2e5683cd62 to your computer and use it in GitHub Desktop.
package it.prisma.dal.entities.accounting;
// Generated 17-set-2014 21.25.53 by Hibernate Tools 3.4.0.CR1
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
* OrganizationReferents generated by hbm2java
*/
@Entity
@Table(name = "OrganizationReferent")
public class OrganizationReferent implements java.io.Serializable {
private static final long serialVersionUID = 108372503169196850L;
private Long organizationReferentId;
private Organization organization;
private String firstName;
private String middleName;
private String lastName;
private String email;
private String mobilePhone;
public OrganizationReferent() {
}
public OrganizationReferent(Organization organization, String firstName,
String lastName, String email) {
this.organization = organization;
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
}
public OrganizationReferent(Organization organization, String firstName,
String lastName, String email, String mobilePhone) {
this.organization = organization;
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.mobilePhone = mobilePhone;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "organizationReferentsID", unique = true, nullable = false)
public Long getOrganizationReferentId() {
return this.organizationReferentId;
}
public void setOrganizationReferentsId(Long organizationReferentId) {
this.organizationReferentId = organizationReferentId;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "Organization_organizationID", nullable = false)
public Organization getOrganization() {
return this.organization;
}
public void setOrganization(Organization organization) {
this.organization = organization;
}
@Column(name = "firstName", nullable = false, length = 45)
public String getFirstName() {
return this.firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
@Column(name = "middleName", nullable = true, length = 45)
public String getMiddleName() {
return this.middleName;
}
public void setMiddleName(String middleName) {
this.middleName = middleName;
}
@Column(name = "lastName", nullable = false, length = 45)
public String getLastName() {
return this.lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@Column(name = "email", nullable = false, length = 100)
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
@Column(name = "mobilePhone", length = 45)
public String getMobilePhone() {
return this.mobilePhone;
}
public void setMobilePhone(String mobilePhone) {
this.mobilePhone = mobilePhone;
}
}
package it.prisma.dal.entities.accounting;
// Generated 17-set-2014 21.25.53 by Hibernate Tools 3.4.0.CR1
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
* Organization generated by hbm2java
*/
@Entity
@Table(name = "Organization")
public class Organization implements java.io.Serializable {
/**
*
*/
private static final long serialVersionUID = -6767671523646423540L;
private Long organizationId;
private String name;
private String description;
private String logoUri;
private String websiteUri;
private String websiteLabel;
private Date createdAt;
private Date modifiedAt;
private Set workgroups = new HashSet(0);
private Set organizationReferents = new HashSet(0);
private Set identityProviders = new HashSet(0);
public Organization() {
}
public Organization(String name, String description, Date createdAt,
Date modifiedAt) {
this.name = name;
this.description = description;
this.createdAt = createdAt;
this.modifiedAt = modifiedAt;
}
public Organization(String name,
String description, String logoUri, String websiteUri,
String websiteLabel, Date createdAt, Date modifiedAt,
Set workgroups, Set organizationReferents, Set identityProviders) {
this.name = name;
this.description = description;
this.logoUri = logoUri;
this.websiteUri = websiteUri;
this.websiteLabel = websiteLabel;
this.createdAt = createdAt;
this.modifiedAt = modifiedAt;
this.workgroups = workgroups;
this.organizationReferents = organizationReferents;
this.identityProviders = identityProviders;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "organizationID", unique = true, nullable = false)
public Long getOrganizationId() {
return this.organizationId;
}
public void setOrganizationId(Long organizationId) {
this.organizationId = organizationId;
}
@Column(name = "name", nullable = false, length = 45)
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "description", nullable = false, length = 65535)
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
@Column(name = "logoURI", length = 2083)
public String getLogoUri() {
return this.logoUri;
}
public void setLogoUri(String logoUri) {
this.logoUri = logoUri;
}
@Column(name = "websiteURI", length = 2083)
public String getWebsiteUri() {
return this.websiteUri;
}
public void setWebsiteUri(String websiteUri) {
this.websiteUri = websiteUri;
}
@Column(name = "websiteLabel", length = 100)
public String getWebsiteLabel() {
return this.websiteLabel;
}
public void setWebsiteLabel(String websiteLabel) {
this.websiteLabel = websiteLabel;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "createdAt", nullable = false, length = 19)
public Date getCreatedAt() {
return this.createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "modifiedAt", nullable = false, length = 19)
public Date getModifiedAt() {
return this.modifiedAt;
}
public void setModifiedAt(Date modifiedAt) {
this.modifiedAt = modifiedAt;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "organization")
public Set getWorkgroups() {
return this.workgroups;
}
public void setWorkgroups(Set workgroups) {
this.workgroups = workgroups;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "organization")
public Set getOrganizationReferents() {
return this.organizationReferents;
}
public void setOrganizationReferents(Set organizationReferents) {
this.organizationReferents = organizationReferents;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "organization")
public Set getIdentityProviders() {
return this.identityProviders;
}
public void setIdentityProviders(Set identityProviders) {
this.identityProviders = identityProviders;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment