CS340Group/hit — pull request #15 by nickethier (2012-09-24 01:05:51+00:00)
Title: BIG CHANGES!!!

Ok so first off I will most likely not be able to do alot Monday so here are my changes:

### Line Endings

This has already been pushed to master, but I wanted to make sure you all were aware. When Brendon pushes changes all of his line endings are CRLF while Murphy and I are LF because were mac. This makes diffs really hard to read. I set up a .gitattributes file. essentially what will happen is code will still maintain the same line endings that your OS uses but when you commit all line ending will change to LF so they are all the same.

### StorageUnit/ProductGroup package move

So I moved the StorageUnit* and ProductGroup* classes into the productcontrainer package. This lets us make better use of inheritance. When they were in previous package they would not inherit protected methods. I did this so we could set up alot of the same protected methods on the ProductContainer class.

## Vault abstract class obliterated

I was running into a super stange bug. Basically When I would add an Item model to the ItemVault all the other Vault sizes would grow by 1. What was happening was since they all extended the base static class they were also all using the same static dataVault object which literally ment that they were all saving to the same Vault. This created alot of issues when you started adding alot of different items to the vault as the find* methods expect the dataVault to all be its own object type. Thus I got rid of the extending and just added a dataVault to each Vault.

## TESTS!!!

I wrote a ton of tests. These are by no means complete but I figured it was a good start. I've got about %75 coverage. I'm sure this will change once we start adding more data constraints, and validation checks.

## Miscellaneous

I tweaked a lot of little things. Please use the inline comments if something looks odd or even if you don't understand what I'm doing. I want everyone to be on the same page before we merge this.

## Todo

I'm a sinner and didn't write any javadoc.

In the ProductGroup, the querys need to be checked. We need to solidify what we're going to name what is currently Parent and Rootparent. The query expects storageunit for chaining there.

We need to write Controller/Manager Classes that do all the heavy lifting. Stuff like move Product from Group A to Group B.

## Conclusion

I think I've just about got everything wired up on the Vault side. I hope everything looks good!