***************** CnxContact.java ***************** package persistent.core;
// Generated Feb 25, 2010 6:21:46 PM by Hibernate Tools 3.2.2.GA
import java.util.Date; 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; import javax.persistence.Temporal; import javax.persistence.TemporalType;
/** * CnxContact generated by hbm2java */ @Entity @Table(name = "cnx_contact", catalog = "uhc_staging_2") public class CnxContact implements java.io.Serializable {
private Integer contactId; private Account account; private String contactGuid; private long orgid; private Date dateOwnerModified; private Integer homeAddressUid; private Integer altAddressUid; private Integer busAddressUid; private Integer mailingAddressUid; private String leadId; private String customerId; private boolean deleted; private Date dateEntered; private Date dateModified; private Long modifiedUserId; private Long createdBy; private String firstName; private Character middleInitial; private String lastName; private String suffix; private String title; private Date birthdate; private String ssn; private Boolean doNotCall; private Boolean fedDoNotCall; private Date cmsPtcExpire; private String phoneHome; private String phoneMobile; private String phoneWork; private String phoneOther; private String phoneFax; private String email1; private String email2; private Boolean emailOptOut; private Boolean doNotMail; private Character gender; private Character type; private Integer primaryContact; private int firstTouchTpid; private int lastTouchTpid;
public CnxContact() { }
public CnxContact(long orgid, boolean deleted, Date dateEntered, Date dateModified, int firstTouchTpid, int lastTouchTpid) { this.orgid = orgid; this.deleted = deleted; this.dateEntered = dateEntered; this.dateModified = dateModified; this.firstTouchTpid = firstTouchTpid; this.lastTouchTpid = lastTouchTpid; }
public CnxContact(Account account, String contactGuid, long orgid, Date dateOwnerModified, Integer homeAddressUid, Integer altAddressUid, Integer busAddressUid, Integer mailingAddressUid, String leadId, String customerId, boolean deleted, Date dateEntered, Date dateModified, Long modifiedUserId, Long createdBy, String firstName, Character middleInitial, String lastName, String suffix, String title, Date birthdate, String ssn, Boolean doNotCall, Boolean fedDoNotCall, Date cmsPtcExpire, String phoneHome, String phoneMobile, String phoneWork, String phoneOther, String phoneFax, String email1, String email2, Boolean emailOptOut, Boolean doNotMail, Character gender, Character type, Integer primaryContact, int firstTouchTpid, int lastTouchTpid) { this.account = account; this.contactGuid = contactGuid; this.orgid = orgid; this.dateOwnerModified = dateOwnerModified; this.homeAddressUid = homeAddressUid; this.altAddressUid = altAddressUid; this.busAddressUid = busAddressUid; this.mailingAddressUid = mailingAddressUid; this.leadId = leadId; this.customerId = customerId; this.deleted = deleted; this.dateEntered = dateEntered; this.dateModified = dateModified; this.modifiedUserId = modifiedUserId; this.createdBy = createdBy; this.firstName = firstName; this.middleInitial = middleInitial; this.lastName = lastName; this.suffix = suffix; this.title = title; this.birthdate = birthdate; this.ssn = ssn; this.doNotCall = doNotCall; this.fedDoNotCall = fedDoNotCall; this.cmsPtcExpire = cmsPtcExpire; this.phoneHome = phoneHome; this.phoneMobile = phoneMobile; this.phoneWork = phoneWork; this.phoneOther = phoneOther; this.phoneFax = phoneFax; this.email1 = email1; this.email2 = email2; this.emailOptOut = emailOptOut; this.doNotMail = doNotMail; this.gender = gender; this.type = type; this.primaryContact = primaryContact; this.firstTouchTpid = firstTouchTpid; this.lastTouchTpid = lastTouchTpid; }
@Id @GeneratedValue(strategy = IDENTITY) @Column(name = "contact_id", unique = true, nullable = false) public Integer getContactId() { return this.contactId; }
public void setContactId(Integer contactId) { this.contactId = contactId; }
@ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "aid") public Account getAccount() { return this.account; }
public void setAccount(Account account) { this.account = account; }
@Column(name = "contact_guid", length = 36) public String getContactGuid() { return this.contactGuid; }
public void setContactGuid(String contactGuid) { this.contactGuid = contactGuid; }
@Column(name = "orgid", nullable = false, precision = 10, scale = 0) public long getOrgid() { return this.orgid; }
public void setOrgid(long orgid) { this.orgid = orgid; }
@Temporal(TemporalType.TIMESTAMP) @Column(name = "date_owner_modified", length = 19) public Date getDateOwnerModified() { return this.dateOwnerModified; }
public void setDateOwnerModified(Date dateOwnerModified) { this.dateOwnerModified = dateOwnerModified; }
@Column(name = "home_address_uid") public Integer getHomeAddressUid() { return this.homeAddressUid; }
public void setHomeAddressUid(Integer homeAddressUid) { this.homeAddressUid = homeAddressUid; }
@Column(name = "alt_address_uid") public Integer getAltAddressUid() { return this.altAddressUid; }
public void setAltAddressUid(Integer altAddressUid) { this.altAddressUid = altAddressUid; }
@Column(name = "bus_address_uid") public Integer getBusAddressUid() { return this.busAddressUid; }
public void setBusAddressUid(Integer busAddressUid) { this.busAddressUid = busAddressUid; }
@Column(name = "mailing_address_uid") public Integer getMailingAddressUid() { return this.mailingAddressUid; }
public void setMailingAddressUid(Integer mailingAddressUid) { this.mailingAddressUid = mailingAddressUid; }
@Column(name = "lead_id", length = 50) public String getLeadId() { return this.leadId; }
public void setLeadId(String leadId) { this.leadId = leadId; }
@Column(name = "customer_id", length = 50) public String getCustomerId() { return this.customerId; }
public void setCustomerId(String customerId) { this.customerId = customerId; }
@Column(name = "deleted", nullable = false) public boolean isDeleted() { return this.deleted; }
public void setDeleted(boolean deleted) { this.deleted = deleted; }
@Temporal(TemporalType.TIMESTAMP) @Column(name = "date_entered", nullable = false, length = 19) public Date getDateEntered() { return this.dateEntered; }
public void setDateEntered(Date dateEntered) { this.dateEntered = dateEntered; }
@Temporal(TemporalType.TIMESTAMP) @Column(name = "date_modified", nullable = false, length = 19) public Date getDateModified() { return this.dateModified; }
public void setDateModified(Date dateModified) { this.dateModified = dateModified; }
@Column(name = "modified_user_id", precision = 10, scale = 0) public Long getModifiedUserId() { return this.modifiedUserId; }
public void setModifiedUserId(Long modifiedUserId) { this.modifiedUserId = modifiedUserId; }
@Column(name = "created_by", precision = 10, scale = 0) public Long getCreatedBy() { return this.createdBy; }
public void setCreatedBy(Long createdBy) { this.createdBy = createdBy; }
@Column(name = "first_name", length = 50) public String getFirstName() { return this.firstName; }
public void setFirstName(String firstName) { this.firstName = firstName; }
@Column(name = "middle_initial", length = 1) public Character getMiddleInitial() { return this.middleInitial; }
public void setMiddleInitial(Character middleInitial) { this.middleInitial = middleInitial; }
@Column(name = "last_name", length = 50) public String getLastName() { return this.lastName; }
public void setLastName(String lastName) { this.lastName = lastName; }
@Column(name = "suffix", length = 20) public String getSuffix() { return this.suffix; }
public void setSuffix(String suffix) { this.suffix = suffix; }
@Column(name = "title", length = 20) public String getTitle() { return this.title; }
public void setTitle(String title) { this.title = title; }
@Temporal(TemporalType.DATE) @Column(name = "birthdate", length = 10) public Date getBirthdate() { return this.birthdate; }
public void setBirthdate(Date birthdate) { this.birthdate = birthdate; }
@Column(name = "ssn", length = 12) public String getSsn() { return this.ssn; }
public void setSsn(String ssn) { this.ssn = ssn; }
@Column(name = "do_not_call") public Boolean getDoNotCall() { return this.doNotCall; }
public void setDoNotCall(Boolean doNotCall) { this.doNotCall = doNotCall; }
@Column(name = "fed_do_not_call") public Boolean getFedDoNotCall() { return this.fedDoNotCall; }
public void setFedDoNotCall(Boolean fedDoNotCall) { this.fedDoNotCall = fedDoNotCall; }
@Temporal(TemporalType.DATE) @Column(name = "cms_ptc_expire", length = 10) public Date getCmsPtcExpire() { return this.cmsPtcExpire; }
public void setCmsPtcExpire(Date cmsPtcExpire) { this.cmsPtcExpire = cmsPtcExpire; }
@Column(name = "phone_home", length = 25) public String getPhoneHome() { return this.phoneHome; }
public void setPhoneHome(String phoneHome) { this.phoneHome = phoneHome; }
@Column(name = "phone_mobile", length = 25) public String getPhoneMobile() { return this.phoneMobile; }
public void setPhoneMobile(String phoneMobile) { this.phoneMobile = phoneMobile; }
@Column(name = "phone_work", length = 25) public String getPhoneWork() { return this.phoneWork; }
public void setPhoneWork(String phoneWork) { this.phoneWork = phoneWork; }
@Column(name = "phone_other", length = 25) public String getPhoneOther() { return this.phoneOther; }
public void setPhoneOther(String phoneOther) { this.phoneOther = phoneOther; }
@Column(name = "phone_fax", length = 25) public String getPhoneFax() { return this.phoneFax; }
public void setPhoneFax(String phoneFax) { this.phoneFax = phoneFax; }
@Column(name = "email1", length = 100) public String getEmail1() { return this.email1; }
public void setEmail1(String email1) { this.email1 = email1; }
@Column(name = "email2", length = 100) public String getEmail2() { return this.email2; }
public void setEmail2(String email2) { this.email2 = email2; }
@Column(name = "email_opt_out") public Boolean getEmailOptOut() { return this.emailOptOut; }
public void setEmailOptOut(Boolean emailOptOut) { this.emailOptOut = emailOptOut; }
@Column(name = "do_not_mail") public Boolean getDoNotMail() { return this.doNotMail; }
public void setDoNotMail(Boolean doNotMail) { this.doNotMail = doNotMail; }
@Column(name = "gender", length = 1) public Character getGender() { return this.gender; }
public void setGender(Character gender) { this.gender = gender; }
@Column(name = "type", length = 1) public Character getType() { return this.type; }
public void setType(Character type) { this.type = type; }
@Column(name = "primary_contact") public Integer getPrimaryContact() { return this.primaryContact; }
public void setPrimaryContact(Integer primaryContact) { this.primaryContact = primaryContact; }
@Column(name = "first_touch_tpid", nullable = false) public int getFirstTouchTpid() { return this.firstTouchTpid; }
public void setFirstTouchTpid(int firstTouchTpid) { this.firstTouchTpid = firstTouchTpid; }
@Column(name = "last_touch_tpid", nullable = false) public int getLastTouchTpid() { return this.lastTouchTpid; }
public void setLastTouchTpid(int lastTouchTpid) { this.lastTouchTpid = lastTouchTpid; }
} ************************************************************ Using this code to fetch records from database:
Session session = HibernateUtil.getSessionFactory().openSession(); CnxContact contact = (CnxContact)session.get(CnxContact.class, new Integer(6)); ***************************************************************
It's only stack trace: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
|