Académique Documents
Professionnel Documents
Culture Documents
pavan
Share
More
Next Blog
Techno-functional 12 Years EMR/PMS experience.Love to work in Practice Management software. EDI 4010, EDI 5010, CMS 15
Email : vbsenthilinnet@gmail.com
Previous Part 1
In the part 1, we have listed all the records from the DB.
I would like to do some changes in the Part 1 without adding any other stuff. Open PracticeDAO. Java and let us have a close look on the following line;
Query q1 = session.createQuery("from Practice ");
Here, we did not specify any columns, so it will fill up the values for all the columns matching with our java bean. But in the list, we need only to display four columns such as
Practice Name, city, State and Zip Code.
So how we can retrieve only selected columns in the create query ? You can see this example to achieve the result.
So as per that example, first let us constructors in our practice.java as shown here.
package domain;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "practice")
public class Practice {
private Integer practiceID;
private String practiceName;
private String city;
private String ZipCode;
private String state;
private Integer isActive;
emrpms.blogspot.in/2012/06/zk-mvvm-crud-listing-add-delete-update_06.html
1/5
27/09/2012
Next Part 3
No comments:
Post a Comment
Enter your comment...
Preview
Newer Post
emrpms.blogspot.in/2012/06/zk-mvvm-crud-listing-add-delete-update_06.html
Home
Older Post
2/5
27/09/2012
emrpms.blogspot.in/2012/06/zk-mvvm-crud-listing-add-delete-update_06.html
3/5
27/09/2012
emrpms.blogspot.in/2012/06/zk-mvvm-crud-listing-add-delete-update_06.html
4/5
27/09/2012
emrpms.blogspot.in/2012/06/zk-mvvm-crud-listing-add-delete-update_06.html
5/5