Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Articles
Articles_pt
CreateDAO_es
CreateDAO_pt
CreateDAO_sp
CreateDAOiBATIS
CreateManager
CreateManager_es
CreateManager_ko
CreateManager_zh
...and 3 more




JSPWiki v2.2.33

[RSS]


Hide Menu

CreateDAO


Difference between version 112 and version 111:

At line 91 changed 1 line.
At this point, you can actually create the person table by running "ant setup-db". This task creates the Person.hbm.xml file and creates a database table called "person." From the ant console, you can see the table schema the Hibernate creates for you:
At this point, you can create the person table by running __ant setup-db__. This task creates the Person.hbm.xml file and creates a database table called "person". From the ant console, you can see the table schema the Hibernate creates for you:
At line 160 changed 1 line.
Run "ant setup-db" again to get the additional columns added to your table.
Run __ant setup-db__ again to get the additional columns added to your table.
At line 188 changed 1 line.
__NOTE:__ If you'd like to generate all the DAOs/Managers/Tests, run "ant install-detailed" instead of "ant install". Before you install anything, the files will be created in the extras/appgen/build/gen directory (in case you want to look at them before installing). If you just want to test the tool, you can cd to this directory and run "ant test" to see the contents of these tutorials created.
__NOTE:__ If you'd like to generate all the DAOs/Managers/Tests, run __ant install-detailed__ instead of __ant install__. Before you install anything, the files will be created in the extras/appgen/build/gen directory (in case you want to look at them before installing). If you just want to test the tool, you can cd to this directory and run __ant test__ to see the contents of these tutorials created.
At line 300 changed 1 line.
;:%%(color: blue)''This way, you can eliminate the "create new" functionality in the testGetPerson method. If you'd rather add this record directly into the database (via SQL or a GUI), you can rebuild your sample-data.xml file using "ant db-export" and then "cp db-export.xml metadata/sql/sample-data.xml".''%%
;:%%(color: blue)''This way, you can eliminate the "create new" functionality in the testGetPerson method. If you'd rather add this record directly into the database (via SQL or a GUI), you can rebuild your sample-data.xml file using __ant db-export__ and then __cp db-export.xml metadata/sql/sample-data.xml__.''%%
At line 303 changed 1 line.
;:''I tend to just hard-code test values into Java code - but the .properties file is an option that works great for large objects.''
;:%%(color: blue)''I tend to just hard-code test values into Java code - but the .properties file is an option that works great for large objects.''%%
At line 336 changed 1 line.
;:''The ant task for running dao tests is called "test-dao". If you pass in a testcase parameter (using -Dtestcase=name), it will look for **/*${testcase}* - allowing us to pass in Person, PersonDao, or PersonDaoTest - all of which will execute the PersonDaoTest class.''
;:''The ant task for running dao tests is called __test-dao__. If you pass in a testcase parameter (using __-Dtestcase=name__), it will look for **/*${testcase}* - allowing us to pass in Person, PersonDao, or PersonDaoTest - all of which will execute the PersonDaoTest class.''
At line 371 changed 1 line.
Now, if you try to run "ant test-dao -Dtestcase=PersonDao", you will get the same error. We need to configure Spring so it knows that PersonDaoHibernate is the implementation of PersonDAO, and we also need to tell it about the Person object.
Now, if you try to run __ant test-dao -Dtestcase=PersonDao__, you will get the same error. We need to configure Spring so it knows that PersonDaoHibernate is the implementation of PersonDAO, and we also need to tell it about the Person object.
At line 402 changed 1 line.
Save all your edited files and try running "ant test-dao -Dtestcase=PersonDao" one more time.
Save all your edited files and try running __ant test-dao -Dtestcase=PersonDao__ one more time.

Back to CreateDAO, or to the Page History.