Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

Presistace classes in hibernate

Ads

 
 

Share on Google+Share on Google+

samar
Presistace classes in hibernate
2 Answer(s)      6 years and 5 months ago
Posted in : Hibernate Interview Questions

Explain the persistence class in hibernate?

Ads
View Answers

March 8, 2011 at 3:21 PM


Hi Samar,

Persistence class is a class in our web application. It holds the entities of the business application (Example- Employee id and name etc.). Hibernate works better if these classes follow some rules. It is also known as the Plain Old Java Object (POJO) programming model.

Thanks...



March 8, 2011 at 3:26 PM


Hi Samar,

  Persistence class is a class in our web application. It holds the entities of the business application (Example- Employee id and name etc.). Hibernate works better if these classes follow some rules. It is also known as the Plain Old Java Object (POJO) programming model.

Example of POJO

package net.roseindia.Model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "userinfo")
public class AddInformation implements Serializable {
private int id; 
private String firstname;

@Id
@GeneratedValue
@Column(name = "id")
public int getId() {
    return id;
}

@Column(name = "firstname")
public String getFirstname() {
        return firstname;
    }
public void setId(int id) {
        this.id = id;
    }

public void setFirstname(String firstname) {
        this.firstname = firstname;
    }
}

Thanks....


Ads









Related Tutorials/Questions & Answers:
Presistace classes in hibernate
Presistace classes in hibernate  Explain the persistence class in hibernate
Hibernate Classes
In this section, you will learn about persistent classes in Hibernate
Advertisements
Hibernate create POJO classes
Hibernate create POJO classes In this tutorial you will learn how to create a POJO class in Hibernate. POJO (Plain Old Java Object) is a programming model...) to create a classes that implements the entities of the business problem. These can
Hibernate API
Hibernate API In this section we will learn about important Hibernate API. Hibernate one of the best ORM tool to develop database driven applications in Java. Hibernate provides API to perform CRUD operations on the persistence objects
Java classes
Java classes  Which class is extended by all other classes
DAO Classes
DAO Classes  login page code for Dao classes
java classes
java classes  Which class is the super class for all classes in java.lang package
wrapper classes
wrapper classes  Explain wrapper classes and their use?   Java Wrapper Class Wrapper class is a wrapper around a primitive data type... of the primitive wrapper classes in Java are immutable i.e. once assigned a value
Inner classes
Inner classes   Hi I am bharat . I am student learning java course . I have one question about inner classes . question is how to access the instance method of Non-static classes which is defined in the outer
classes and objects
classes and objects  Define a class named Doctor whose objects... methods, and an equals method as well. Further, define two classes: Patient... classes a reasonable complement of constructors and accessor methods, and an equals
classes in c++
classes in c++  1- design and implement a class datatype that implement the day of the week in the program.the class datatype should store the day, such as sun for sunday. the programe should be able to perform the following
HIBERNATE
HIBERNATE   What is difference between Jdbc and Hibernate
hibernate
hibernate  what is hibernate listeners
hibernate
hibernate  what is hibernate flow
Helper classes in java
Helper classes in java  helper classes
Classes and Objects
Classes and Objects       Objects and classes are the fundamental parts of object-orientated programming technique. A class... illustrates how to define our own classes, that includes declaring and defining
Hibernate
Hibernate  hibernate delete query execution
hibernate
hibernate  what is hibernate why we use
Hibernate
Hibernate  how to use pagination concept in Hibernate
hibernate
hibernate  how to uses optional column in hibernate
hibernate
hibernate  please give me the link where i can freely download hibernate software(with dependencies)   Learn hibernate, if you want to learn hibernate, please visit the following link: Hibernate Tutorials
Nested classes: Examples and tutorials
Nested classes: Examples and tutorials       Nested classes Here is another advantage of the Java... within another class, such class is called a nested class. Inner classes can
hibernate
hibernate   I want to learn how to use hibernate framework in web application . for storing database in our application
hibernate
hibernate   I want to learn how to use hibernate framework in web application . for storing database in our application
core classes of the Struts Framework
core classes of the Struts Framework  What are the core classes of the Struts Framework
core classes of Struts
core classes of Struts  What are the core classes of Struts
Factory classes in flex
Factory classes in flex  Hi.. What are the factory classes in flex? please give the name of all factory classes....... Thanks
hibernate
why hibernate?  why hibernate?   Hibernate: -Hibernate... library. It solves object-relational impedance mismatch problems. Hibernate makes the application development process easy Hibernate saves the development
hibernate
hibernate  pls give one simple example program for hibernate