ofbiz is not object oriented so you will have problems from the Get go.
the Design focus with ofbiz is the entity and services. If you
circumvent that, then you are beyond what most can support.
Your best bet is to study the persistent layer of ofbiz.
=========================
BJ Freeman
Strategic Power Office with Supplier Automation
<http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist
Chat Y! messenger: bjfr33man
David van der Staak sent the following on 12/10/2010 4:53 AM:
And ofcourse I make a huge mistake in my first post on this list by forgetting
to change the subject ..... attempt 2!
Hi all,
I've been trying to merge our existing project to one based on OfBIZ. I've had
a bit of succes thus far, but I've hit a snag.
We used to run on a MySQL. I build a Database.class which had a few easy to use
methods, which you could hand an id to retrieve an object or hand an object for
storage. The objects themself also have a store method, which was shorthand for
calling the Database.store() method yourself.
A problem I'm running into right now is how to store and retrieve a pyramid of
objects. I used to be able to call Database.get(id) which would give me an
object, which was a child of SObject, and have a specialized method which would
also take a class argument. The main problem is in the first retrieval method,
the generic one. All of the find methods I can see require me to use an entity
name, but I can't be sure which entity name I should use, unless I use at least
one more call to the database as I would have to store yet another piece of
information in a seperate entity.
Is there an easier way then having to store yet another entity, and do 2 finds
when I need to recreate an object?
Second point: Is there a method which can create an object for me? Do I need to
subclass a specific class or use a specific method? All that I have found thus
far is that the find methods return a genericValue. I suppose I could get all
the values and stick them into my own object, but I'm not sure that's the
proper way of doing it.
Thanks for the time, help and patience.
David van der Staak