UniHousing / UnivHousing

A demo for mvc
0 stars 1 forks source link

implement the po,dao and service layer #6

Closed jessexu20 closed 9 years ago

jessexu20 commented 9 years ago

Implement the assigned classes in po,dao and service You don't have to implement the action layer but you can do that to try to show the page...

Create your own branch to do such changes and do not merge into master at this time

Please note, you should implement the *.hbm.xml in com.javaweb.po, add Interface and Implementation Class in com.javaweb.dao, add Interface and Implementation Class in com.javaweb.service and create beans in the WEB-INF/applicationContext.xml

When you are doing the *.hbm.xml ,you should copy paste the old one such as user.hbm.xml and rename it instead of creating a new one just for you can get a pretty xml UI.

Please note that there is little difference in name between the database and Java Project. For example, in java, we use CamelCase to denote as birthDate while in SQL table we use underscore birth_date. In this case, when you are writing/editing the hbm.xml, you can use the column attribute to do that, such as the following.

     <property column="birth_date"  name="birthDate" type="date"/>

Also assign table attribute in the *.hbm.xml for example:

    <class name="com.javaweb.po.User" table="user">

Please finish the above before this Saturday.

@dragonfly90 @OliviaHY @Expo0911