Hi,

You should use an enum class for the properties (so that you can
extend later on) and store them as proposed above in a Set<>

regards

didier

On Apr 10, 8:29 am, Ravi Sharma <ping2r...@gmail.com> wrote:
> May be you can do womething like this
>
> class HouseProperty{
> Key id;
> String Name;}
>
> in above class you can create your all properties like
> hasAirCond,hasInternet etc. One property
> per Row.
> and in House you can have somethin glike this
> class House{
> Set<Key> properties;
>
> }
>
> and if some house has airCond, then add one key to this collection
> house.properties.add(<Key corresponding to airCon>);
>
> if some house has two or more then
> house.properties.add(<Key corresponding to airCon>);
> house. properties.add(<Key corresponding to hasInternet >);
> house. properties.add(<Key corresponding to some other feature.>);
>
> If you do like this, you dont need to worry about increasing the table
> columns later as you will be doing in your current solution. If new
> prooperty of a house comes just add another row and your solution will keep
> working.
>
> Thanks,
> Ravi.
>
> On Sun, Apr 10, 2011 at 7:22 AM, Thomas Wiradikusuma <wiradikus...@gmail.com
>
> > wrote:
> > Hi guys,
>
> > I want to model an object with lots of small properties, e.g.:
>
> > House {
> >  boolean hasAirCond, boolean hasInternet, boolean nearSchool, etc;
> > }
>
> > Is this naive way the best way to model it? Is there any better "GAE-
> > way" to do this?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-java@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to