prmr / Creco

Recommendation System for Consumer Products
Apache License 2.0
6 stars 2 forks source link

Merge TypeValue and AttributeValue #28

Closed prmr closed 10 years ago

prmr commented 10 years ago

Can these classes be merged and the extra functionality of AttributeValue moved into TypedValue? In any case it would be preferable to use primitive types as early as possible, i.e., as soon as the typed value is internally converted.

asutcl commented 10 years ago

I have started the merge in the attribute_merge branch. A few things I want to post if anyone has objections please let me know.

I've created a few getters to get either a double, a string or a boolean. This should be done after checking the type against the Type enum.

Should we keep both INTEGER and DOUBLE in the enum or collapse them into a NUMERIC category with the possibility of having a STAR category for 5 star ratings?

I have marked the getValue() that returns an object as deprecated for now to give everyone the time to adjust their code.

asutcl commented 10 years ago

I have merged the main branch into the attribute_merge branch. There were a few conflicts with the SearchController. I didn't merge back into master. I have fixed them but if you were working on it please merge the attribute_merge into your code and fix conflicts if there are any and check that it still works as intended.

This issue will remain open because I have not merged back into the main due to this fact.

The ranges should also probably be moved to the ScoredAttribute class. This will require a bit of code reworking in the SearchController so I will wait to discuss this before doing so.

asutcl commented 10 years ago

AttributeValue is now deprecated, use TypedValue instead.