Map the class to the database with Hibernate
Xml version = '1.0' encoding = 'uTF-8'?>
// sessionFactory is the concept of Hibernate, corresponding to a data store, if there are multiple databases, you can create multiple XML configuration files, and create multiple // CONFIGURATION and SESSIONFAACTORY objects in your program.
xml version = "1.0"?>
class> hibernate-maping> ========================== ============================================================================================================================================================================================================= ========================================================================================================================================================================================================================================== #
Public class mlab imports serializable {// seqid is a special property that represents this class's database identifier (primary key), private int seqid; private intens; private string roomID; // full constructor public mlab (int SEQID, INT Score, string roomid) {this.seqid = seqid; this.score = score; this.roomid = roomID;
// default constructor public mLab () {}
Public int getseqid () {return this.seqid;}
Public void setseqid (int seqid) {this.seqid = seqid;}
Public int getscore () {return this.score;}
Public void setscore (int score) {this.score = score;}
Public string getroomid () {return this.roomID;
Public void setroom {this.roomid = roomid;}}