business object and codelist
Posted
by feiroox
on Stack Overflow
See other posts from Stack Overflow
or by feiroox
Published on 2010-05-24T14:11:06Z
Indexed on
2010/05/24
20:41 UTC
Read the original article
Hit count: 259
Hi How to design a business object?
I have a library which returns me an Object which have ten lists of other different objects. I need to store it into database all. List of objects are often like:
class Item {
private int id;
private String name;
private double point;
}
But the name is often the same. Like basic title of the product or code. Containing from 3 characters up to 70characters.
Should I make conversion for every Object to: (or something similar)
class ConvertedItem {
private int id;
private int code;
private double point;
}
And have a separated table of codes ( I guess around 60).
Or do not bother with duplicated stuff?
It's not mission critical app. What would you do in my case?
thanks in advance
© Stack Overflow or respective owner