
1.The xpetstore example was studied to find how to use the ant build process.
	- the relevant part is xpetstore-servlet which uses hibernate as it's store. It shows how xdoclet tagged
	simple domain files are used to generate hibernate configuration files.

2. hibernate documentation was read , especially the code in cirrus.hibernate.eg. package.
	- make the demo.sh working by correctly configuring the right driver and database, user, password.
	- find the right driver ( it's jdbc-2 for postgres ). Mandrake 9.1 has a good set of postgres jdbc
	driver's in a package. Otherwise, the driver should be in the postgres distribution.
	

3. Find or read how to make a analysis model. Fowler Analysis patterns was used, because of its level of  generality.

4. Why UML diagrams?  
    - When dealing with a more complex domain model, the diagrams help to switch perspective when programmiing.
        - this allows the step -by -step implementation of the model, whilst sticking to  
            quite highly defined specifications.


    - Why a more complex domain model?
        - breaks the data into small units, and classifies the data.
        - rules can be made for classes of data, and rules for instances of classes.
        - these rules are triggers for deriving deductive data. 
        - small units of data can be collected for research later.
       
    - the drawback of UML is the work required to accurately map diagram to programming, with consistent naming.
            - a uml to java  mapping tool helps.

5.construction piecemeal -  since uml generates only the java classes, need to 
	a) add hibernate doclets for class, id, discriminator, property, one-one, many-to-one
	b) add custom hbm files for one-to-many , many-to-many bidirectional association mappings.

	tips:-  - debug one many-to-many association between two classes, building one custom_hbm file.
		use this as a template. ( add templates in netbeans).
		
		- debug a one-to-many association.  Use this as a template. Use hibernate documentation
		on advanced O-R mapping to see how to do bidirectional associations.

		


Things to Do:

downloads:
	ant ( build tool, documentation (only the core part ) )
	xpetstore ( for documentation, ant build.xml file,  libraries and examples)
	hibernate (for documentation , demo.sh example)
	hibernate web -  hibernate  xdoclet configuration, extra example ( www.bluemars.net/71.html)
	xdoclet ( for documentation )
	xdoclet website - hibernate tags html page (xdoclet for hibernate documentation)
	Poseidon Community Edition( for analysis design tool, and auto generation of code that has some association maintenance
		   functionality - easy to handcode, but already auto-generated).

Configuration chores:
	modify hba_conf to include user and password for connection:
		- may be hard to actually locate where default data directory is, : try   
				ls -R /var | grep pgsql
	
	need also to add user and password , e.g. through psql
		add user
		alter user .. with password ..
		grant usage on schema public to ..;


	modify hibernate.properties and uncomment the postgres configuration, and add the user and password.
	
	find and  copy an appropriate driver to the lib directory e.g.
			find /usr/share/p*  -name "*.jar"
		if there is 1,2,3 drivers then 2 is probably the right one.
		
	restart the pgsql to enable the new user:
		su 
		su postgres
		pg_ctl restart -D <your default data directory>
	
		
		   
	
	
	



