On Jun 20, 2011, at 1:12 PM, Ramsey Gurley wrote:
>
> On Jun 20, 2011, at 12:48 PM, Martin Samm wrote:
>
>> All,
>>
>> not sure if filter is the right term here, but heres the question.
>>
>> i have a number of objects to which i'm adding an 'installation' identifier so that i can segregate data.
>>
>> Theres already a large codebase accessing these objects.
>>
>> What i want to do is, whenever i issue a query against those objects, 'filter' on installation, i.e., only select those objects which to refer to a particular installation.
>>
>> Obviously i could amend every fetch currently in place (which may take some time!) but i wondered if there was something analogous to Springs idea of aspects (sort of)?
>>
>> i.e. can i 'trap' each query and filter to/limit to a particular value?
>>
>> many thanks
>>
>> martin
>>
>
> Sounds like an EOQualifier.
>
> http://webobjects.mdimension.com/javadoc/WebObjects/5.4.3/com/webobjects/eocontrol/EOQualifier.html
>
> Ramsey
>
Then I realized you knew this part already (^_^)
If you are using D2W, this is easy, as you could simply provide a queryDataSourceDelegate for your query pages on that entity. If not, you could potentially model that as inheritance, but I wouldn't recommend this just to filter fetches.
Ramsey
|