Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Hibernate-Interview-Questions Presistace classes in hibernate

Have Programming Question? Ask it here!
 
 
 


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


Explain the persistence class in hibernate?


Advertisement
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....



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
DAO Classes
DAO Classes  login page code for Dao classes
Java classes
Java classes  Which class is extended by all other 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
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
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 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
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   What is difference between Jdbc and Hibernate
hibernate
hibernate  what is hibernate flow
hibernate
hibernate  what is hibernate listeners
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
Helper classes in java
Helper classes in java  helper classes
Hibernate
Hibernate  how to use pagination concept in Hibernate
hibernate
hibernate  what is hibernate why we use
Hibernate
Hibernate  hibernate delete query execution
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
hibernate
hibernate  how to uses optional column in hibernate
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
Classes in Java
Classes in Java       Exceptions: There are some kind of errors that might occur during the execution of the program. An exception is an event that occurs and  interrupts
core classes of Struts
core classes of Struts  What are the core classes of Struts
core classes of the Struts Framework
core classes of the Struts Framework  What are the core classes of the Struts Framework
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
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
Hibernate  Please tell me the difference between hibernate and jdbc
hibernate
hibernate  why we should use hibernate projection
hibernate
hibernate  pls give one simple example program for hibernate
Hibernate
Hibernate  How do you handle parent - child tables relationships in hibernate? How do you handle Detach state in hibernate
hibernate
hibernate  how to execute a sequence(in database) from Hibernate program or java program   Please visit the following link: Hibernate Tutorials
hibernate
hibernate  can any one one explain what is hibernate ?   Please visit the following link: Hibernate Tutorials
Hibernate
Hibernate  hello, how to run hibernate program in netbeans?please send me step by step instructions to run hibernate in netbeans
Anonymous Inner Classes - Anonymous Inner Classes tutorial
.style1 { text-align: center; } Anonymous Inner Classes Except the inner class, there are two types of supplementary  inner classes... inner classes. The class declared inside the body of a method without naming
Hibernate
Hibernate  hi sir i need hibernate complete tutorial for download   Hi Friend, Please visit the following link: Hibernate Tutorials Thanks
hibernate
hibernate  how to impot mysql database client jar file into eclipse for hibernate configuration   Hi Friend, Please visit the following link: http://www.roseindia.net/hibernate/runninge-xample.shtml Thanks
Hibernate - Hibernate
Hibernate Features  Hibernate features in eclipse
HIBERNATE
HIBERNATE  How u connects database using hibernate 3.0? Where you have written the database configuration details
hibernate
hibernate  hi what are the necessary jar files that we need to set in the classpath to execute a hibernate application
hibernate
hibernate  How to know how many columns changed in a table when we are using hibernate
Java list of uninstantiated classes
Java list of uninstantiated classes  Java list of uninstantiated classes
php classes example
php classes example  How to write a class in PHP
php classes and objects
php classes and objects  using a object with a member method of the class
hibernate
hibernate  Is there any other way to call procedure in hibernate other than named query????? if we are using session object to get the connection then why hibernate we can directly call by using a simple java class??????? please
hibernate
hibernate   i am using hibernate3.2.5 and oracle9i. First i set classpath to ojdbc14.jar and all the hibernate jar files to path env variable.After that when i try to execute the program i got an error "unknown oracle major
Advertisements
 

 

 

DMCA.com