You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jim Barrows <ji...@gmail.com> on 2007/12/10 04:16:44 UTC
Looking for example of how to grab a parent entity and it's children
IE I want the Income type, and it's children, and it's children, etc.
I'm hoping we've done this before, and I don't have to pioneer anything :)
--
James A Barrows
Re: Looking for example of how to grab a parent entity and it's children
Posted by Jim Barrows <ji...@gmail.com>.
That's pretty much my plan. Start with the basics, and then pretty
it up later.
On Dec 9, 2007 10:59 PM, Jacopo Cappellato <ti...@sastau.it> wrote:
> Jim,
>
> if you are starting the implementation of the incoming statement and
> balance sheet reports (that would be great), I'd strongly recommend that
> the first version of them would be in html (screen widget + form widget
> or ftl and bsh). We can then add to it other variants implemented with
> other tools (e.g. JasperReports).
> If you need help to play with ftl or form/screen widget code we can
> help... you may start with the implementation of the bsh script to
> gather the data for the report, then we can think about the best way to
> represent them (ftl or form widget).
>
> What do you think?
>
> Jacopo
>
>
>
> Jim Barrows wrote:
> > Oh, I just need to create an income statement, so I need all the
> > accounts that have an account class that inherits from Income, and the
> > same thing for Expense, Assets, and Liabilities :)
> > I was hoping for something less code intensive :) Ah well... :)
> >
> > On Dec 9, 2007 9:30 PM, Hans Bakker <ma...@antwebsystems.com> wrote:
> >> It depends what you want to do with the result...
> >> If on screen in an ftl look at the 'cms' option of a website or the
> >> navigate option under dataresource in the content component.
> >>
> >> If you want it in Java or Bsh create a recursive function to get the
> >> childs or parents of a record. Look at the WorkEffortChild and
> >> WorkEffortParent relationships for an example.
> >>
> >> Regards, Hans
> >>
> >> On Sun, 2007-12-09 at 20:16 -0700, Jim Barrows wrote:
> >>> IE I want the Income type, and it's children, and it's children, etc.
> >>> I'm hoping we've done this before, and I don't have to pioneer anything :)
> >>>
> >> --
> >> http://Antwebsystems.com : OFBiz Quality support for competitive rates.
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
>
--
James A Barrows
Re: Looking for example of how to grab a parent entity and it's children
Posted by Jacopo Cappellato <ti...@sastau.it>.
Jim,
if you are starting the implementation of the incoming statement and
balance sheet reports (that would be great), I'd strongly recommend that
the first version of them would be in html (screen widget + form widget
or ftl and bsh). We can then add to it other variants implemented with
other tools (e.g. JasperReports).
If you need help to play with ftl or form/screen widget code we can
help... you may start with the implementation of the bsh script to
gather the data for the report, then we can think about the best way to
represent them (ftl or form widget).
What do you think?
Jacopo
Jim Barrows wrote:
> Oh, I just need to create an income statement, so I need all the
> accounts that have an account class that inherits from Income, and the
> same thing for Expense, Assets, and Liabilities :)
> I was hoping for something less code intensive :) Ah well... :)
>
> On Dec 9, 2007 9:30 PM, Hans Bakker <ma...@antwebsystems.com> wrote:
>> It depends what you want to do with the result...
>> If on screen in an ftl look at the 'cms' option of a website or the
>> navigate option under dataresource in the content component.
>>
>> If you want it in Java or Bsh create a recursive function to get the
>> childs or parents of a record. Look at the WorkEffortChild and
>> WorkEffortParent relationships for an example.
>>
>> Regards, Hans
>>
>> On Sun, 2007-12-09 at 20:16 -0700, Jim Barrows wrote:
>>> IE I want the Income type, and it's children, and it's children, etc.
>>> I'm hoping we've done this before, and I don't have to pioneer anything :)
>>>
>> --
>> http://Antwebsystems.com : OFBiz Quality support for competitive rates.
>>
>>
>>
>>
>
>
>
Re: Looking for example of how to grab a parent entity and it's children
Posted by Jacopo Cappellato <ti...@sastau.it>.
I've created two tasks to keep track of this effort:
https://issues.apache.org/jira/browse/OFBIZ-1501
https://issues.apache.org/jira/browse/OFBIZ-1502
Jacopo
Jacopo Cappellato wrote:
> Jim,
>
> you can use the following recirsive method as an example:
>
> org.ofbiz.accounting.util.UtilAccounting.isAccountClassClass(...)
>
> Feel free to submit a patch (for review) when you need it.
>
> Jacopo
>
>
> Jacopo Cappellato wrote:
>> We will probably need a recursive method/service to do this. The
>> method can simply return a List of glAccountId strings. Its input will
>> be the Account Class and organizationPartyId.
>> The method can be implemented in the
>> org.ofbiz.accounting.util.UtilAccounting class
>>
>> Then the returned List object can then easily be used to compose an
>> entity condition object for queries.
>>
>> Jacopo
>>
>>
>> Jim Barrows wrote:
>>> Oh, I just need to create an income statement, so I need all the
>>> accounts that have an account class that inherits from Income, and the
>>> same thing for Expense, Assets, and Liabilities :)
>>> I was hoping for something less code intensive :) Ah well... :)
>>>
>>> On Dec 9, 2007 9:30 PM, Hans Bakker <ma...@antwebsystems.com>
>>> wrote:
>>>> It depends what you want to do with the result...
>>>> If on screen in an ftl look at the 'cms' option of a website or the
>>>> navigate option under dataresource in the content component.
>>>>
>>>> If you want it in Java or Bsh create a recursive function to get the
>>>> childs or parents of a record. Look at the WorkEffortChild and
>>>> WorkEffortParent relationships for an example.
>>>>
>>>> Regards, Hans
>>>>
>>>> On Sun, 2007-12-09 at 20:16 -0700, Jim Barrows wrote:
>>>>> IE I want the Income type, and it's children, and it's children, etc.
>>>>> I'm hoping we've done this before, and I don't have to pioneer
>>>>> anything :)
>>>>>
>>>> --
>>>> http://Antwebsystems.com : OFBiz Quality support for competitive rates.
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>
Re: Looking for example of how to grab a parent entity and it's children
Posted by Jacopo Cappellato <ti...@sastau.it>.
Jim,
you can use the following recirsive method as an example:
org.ofbiz.accounting.util.UtilAccounting.isAccountClassClass(...)
Feel free to submit a patch (for review) when you need it.
Jacopo
Jacopo Cappellato wrote:
> We will probably need a recursive method/service to do this. The method
> can simply return a List of glAccountId strings. Its input will be the
> Account Class and organizationPartyId.
> The method can be implemented in the
> org.ofbiz.accounting.util.UtilAccounting class
>
> Then the returned List object can then easily be used to compose an
> entity condition object for queries.
>
> Jacopo
>
>
> Jim Barrows wrote:
>> Oh, I just need to create an income statement, so I need all the
>> accounts that have an account class that inherits from Income, and the
>> same thing for Expense, Assets, and Liabilities :)
>> I was hoping for something less code intensive :) Ah well... :)
>>
>> On Dec 9, 2007 9:30 PM, Hans Bakker <ma...@antwebsystems.com>
>> wrote:
>>> It depends what you want to do with the result...
>>> If on screen in an ftl look at the 'cms' option of a website or the
>>> navigate option under dataresource in the content component.
>>>
>>> If you want it in Java or Bsh create a recursive function to get the
>>> childs or parents of a record. Look at the WorkEffortChild and
>>> WorkEffortParent relationships for an example.
>>>
>>> Regards, Hans
>>>
>>> On Sun, 2007-12-09 at 20:16 -0700, Jim Barrows wrote:
>>>> IE I want the Income type, and it's children, and it's children, etc.
>>>> I'm hoping we've done this before, and I don't have to pioneer
>>>> anything :)
>>>>
>>> --
>>> http://Antwebsystems.com : OFBiz Quality support for competitive rates.
>>>
>>>
>>>
>>>
>>
>>
>>
>
Re: Looking for example of how to grab a parent entity and it's children
Posted by Jacopo Cappellato <ti...@sastau.it>.
We will probably need a recursive method/service to do this. The method
can simply return a List of glAccountId strings. Its input will be the
Account Class and organizationPartyId.
The method can be implemented in the
org.ofbiz.accounting.util.UtilAccounting class
Then the returned List object can then easily be used to compose an
entity condition object for queries.
Jacopo
Jim Barrows wrote:
> Oh, I just need to create an income statement, so I need all the
> accounts that have an account class that inherits from Income, and the
> same thing for Expense, Assets, and Liabilities :)
> I was hoping for something less code intensive :) Ah well... :)
>
> On Dec 9, 2007 9:30 PM, Hans Bakker <ma...@antwebsystems.com> wrote:
>> It depends what you want to do with the result...
>> If on screen in an ftl look at the 'cms' option of a website or the
>> navigate option under dataresource in the content component.
>>
>> If you want it in Java or Bsh create a recursive function to get the
>> childs or parents of a record. Look at the WorkEffortChild and
>> WorkEffortParent relationships for an example.
>>
>> Regards, Hans
>>
>> On Sun, 2007-12-09 at 20:16 -0700, Jim Barrows wrote:
>>> IE I want the Income type, and it's children, and it's children, etc.
>>> I'm hoping we've done this before, and I don't have to pioneer anything :)
>>>
>> --
>> http://Antwebsystems.com : OFBiz Quality support for competitive rates.
>>
>>
>>
>>
>
>
>
Re: Looking for example of how to grab a parent entity and it's children
Posted by Jim Barrows <ji...@gmail.com>.
Oh, I just need to create an income statement, so I need all the
accounts that have an account class that inherits from Income, and the
same thing for Expense, Assets, and Liabilities :)
I was hoping for something less code intensive :) Ah well... :)
On Dec 9, 2007 9:30 PM, Hans Bakker <ma...@antwebsystems.com> wrote:
> It depends what you want to do with the result...
> If on screen in an ftl look at the 'cms' option of a website or the
> navigate option under dataresource in the content component.
>
> If you want it in Java or Bsh create a recursive function to get the
> childs or parents of a record. Look at the WorkEffortChild and
> WorkEffortParent relationships for an example.
>
> Regards, Hans
>
> On Sun, 2007-12-09 at 20:16 -0700, Jim Barrows wrote:
> > IE I want the Income type, and it's children, and it's children, etc.
> > I'm hoping we've done this before, and I don't have to pioneer anything :)
> >
> --
> http://Antwebsystems.com : OFBiz Quality support for competitive rates.
>
>
>
>
--
James A Barrows
Re: Looking for example of how to grab a parent entity and it's
children
Posted by Hans Bakker <ma...@antwebsystems.com>.
It depends what you want to do with the result...
If on screen in an ftl look at the 'cms' option of a website or the
navigate option under dataresource in the content component.
If you want it in Java or Bsh create a recursive function to get the
childs or parents of a record. Look at the WorkEffortChild and
WorkEffortParent relationships for an example.
Regards, Hans
On Sun, 2007-12-09 at 20:16 -0700, Jim Barrows wrote:
> IE I want the Income type, and it's children, and it's children, etc.
> I'm hoping we've done this before, and I don't have to pioneer anything :)
>
--
http://Antwebsystems.com : OFBiz Quality support for competitive rates.