also add new table in the database in google appengine. I upload the
below code but it's not working and i can't modify my database.
package Entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.google.appengine.api.datastore.Key;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
/**
*
* @author snamrata
*/
@Entity
@Table(name = "productrequestdetails")
@NamedQueries({
@NamedQuery(name = "Productrequestdetails.findAll", query = "SELECT
p FROM Productrequestdetails p"),
@NamedQuery(name = "Productrequestdetails.findByProductId", query =
"SELECT p FROM Productrequestdetails p WHERE p.productId
= :productId"),
@NamedQuery(name = "Productrequestdetails.DeleteByProductId", query
= "DELETE FROM Productrequestdetails WHERE productId = :productId"),
@NamedQuery(name = "Productrequestdetails.DeleteByMemberId", query =
"DELETE FROM Productrequestdetails WHERE memberId = :memberId"),
@NamedQuery(name = "Productrequestdetails.findByMemberId", query =
"SELECT p FROM Productrequestdetails p WHERE p.memberId = :memberId"),
@NamedQuery(name = "Productrequestdetails.findBySzProductTitle",
query = "SELECT p FROM Productrequestdetails p WHERE p.szProductTitle
= :szProductTitle"),
@NamedQuery(name = "Productrequestdetails.findBySzProductImage",
query = "SELECT p FROM Productrequestdetails p WHERE p.szProductImage
= :szProductImage"),
@NamedQuery(name = "Productrequestdetails.findBySzProductUrl", query
= "SELECT p FROM Productrequestdetails p WHERE p.szProductUrl
= :szProductUrl"),
@NamedQuery(name = "Productrequestdetails.findByVotingstatus", query
= "SELECT p FROM Productrequestdetails p WHERE p.votingstatus
= :votingstatus"),
@NamedQuery(name = "Productrequestdetails.findByPostedOn", query =
"SELECT p FROM Productrequestdetails p WHERE p.postedOn = :postedOn"),
@NamedQuery(name = "Productrequestdetails.findByUpdatedOn", query =
"SELECT p FROM Productrequestdetails p WHERE p.updatedOn
= :updatedOn") })
public class Productrequestdetails implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 30)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "productId")
private Key productId;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 30)
@Column(name = "memberId")
private String memberId;
@Basic(optional = false)
@Column(name = "szProductTitle")
private String szProductTitle;
@Basic(optional = false)
@Lob
@Column(name = "szProductDescription")
private String szProductDescription;
@Basic(optional = false)
@Column(name = "szProductImage")
private String szProductImage;
@Basic(optional = false)
@Column(name = "szProductUrl")
private String szProductUrl;
@Basic(optional = false)
@Column(name = "votingstatus")
private boolean votingstatus;
@Basic(optional = false)
@Column(name = "postedOn")
@Temporal(TemporalType.TIMESTAMP)
private Date postedOn;
@Basic(optional = false)
@Column(name = "updatedOn")
@Temporal(TemporalType.TIMESTAMP)
private Date updatedOn;
public Productrequestdetails() {
}
public Productrequestdetails(Key productId) {
this.productId = productId;
}
public Productrequestdetails(Key productId, String szProductTitle,
String szProductDescription, String szProductImage,
String szProductUrl, boolean votingstatus, Date postedOn,
Date updatedOn) {
this.productId = productId;
this.szProductTitle = szProductTitle;
this.szProductDescription = szProductDescription;
this.szProductImage = szProductImage;
this.szProductUrl = szProductUrl;
this.votingstatus = votingstatus;
this.postedOn = postedOn;
this.updatedOn = updatedOn;
}
public Key getProductId() {
return productId;
}
public void setProductId(Key productId) {
this.productId = productId;
}
public String getSzProductTitle() {
return szProductTitle;
}
public void setSzProductTitle(String szProductTitle) {
this.szProductTitle = szProductTitle;
}
public String getSzProductDescription() {
return szProductDescription;
}
public void setSzProductDescription(String szProductDescription) {
this.szProductDescription = szProductDescription;
}
public String getSzProductImage() {
return szProductImage;
}
public void setSzProductImage(String szProductImage) {
this.szProductImage = szProductImage;
}
public String getSzProductUrl() {
return szProductUrl;
}
public void setSzProductUrl(String szProductUrl) {
this.szProductUrl = szProductUrl;
}
public boolean getVotingstatus() {
return votingstatus;
}
public void setVotingstatus(boolean votingstatus) {
this.votingstatus = votingstatus;
}
public Date getPostedOn() {
return postedOn;
}
public void setPostedOn(Date postedOn) {
this.postedOn = postedOn;
}
public Date getUpdatedOn() {
return updatedOn;
}
public void setUpdatedOn(Date updatedOn) {
this.updatedOn = updatedOn;
}
public String getmemberId() {
return memberId;
}
public void setmemberId(String memberid) {
this.memberId = memberid;
}
@Override
public int hashCode() {
int hash = 0;
hash += (productId != null ? productId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields
are
// not set
if (!(object instanceof Productrequestdetails)) {
return false;
}
Productrequestdetails other = (Productrequestdetails) object;
if ((this.productId == null && other.productId != null)
|| (this.productId != null && !this.productId
.equals(other.productId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "doigetit.Productrequestdetails[productId=" + productId +
"]";
}
}
so, Please suggest me to modify my database.
Thanks,
Bipin Vekariya.
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment