Excellent. I have one comment (consistent with my position in the
previous message). Configuration of the factory below should be
attached to the stack objects (e.g. DataDomain), not the mapping
objects (DataMap):
+
+ /**
+ * Sets factory for creating QueryBuilders
+ */
+ public void setQueryBuilderFactory(BatchQueryBuilderFactory
queryBuilderFactory) {
+ this.queryBuilderFactory = queryBuilderFactory;
+ }
+
+ /**
+ *..eturn factory for creating QueryBuilders. Might be null
+ */
+ public BatchQueryBuilderFactory getQueryBuilderFactory() {
+ return queryBuilderFactory;
+ }
Cheers,
Andrus
P.S. Maybe you can separately commit the..eprecated part of the
patch ;-)
On Jun 2, 2009, at 5:07 PM, Andrey Razumovsky wrote:
> For not to be unsubstantiated, I uploaded my vision of the feature.
> Note
> that there is no modeler support. It allows to provide custom
> factory that
> creates builders of INSERT, UPDATE, DELETE queries. 'Soft-delete'
> factory is
> included.
> I do not say that 'soft delete' checkbox is not needed, but uploaded
> code is
> much more generic and allows to plug any behavior (maybe even Ari's
> proposed
> 'versions'). 'Soft' strategy can be configured with 'deleted' field
> name and
> will not fire UPDATE if such field does not exist in DB table.
>
> Please add your comments!
>
> Thanks,
> Andrey
>
> 2009/6/2 Andrus Adamchik <andru..bjectstyle.org>
>
>>
>> On Jun 2, 2009, at 2:54 PM, Andrey Razumovsky wrote:
>>
>> But I'm no fan of adding some sort of 'soft' checkbox for
>> dbattributes
>>>
>>
>> I was suggesting marking entity with a "soft delete" checkbox (not
>> individual attribute - this would make no sense), and creating a
>> criteria
>> based on qualifier that references an attribute.
>>
>> Modeler support will be covered by setting class name of strategy
>>>
>>
>> I am afraid this approach will be rather arbitrary to the end user,
>> so I
>> suggest we discuss it some more before putting it in Cayenne.
>> Marking an
>> entity to use "soft delete" based on some criteria is a clear and
>> understandable feature. Setting a "delete strategy" is not, and will
>> contribute to confusion. This is totally be ok as a backend
>> extension point,
>> but I will hate to see that as a general use feature.
>>
>> Andrus
>>
>>
>>
This archive was generated by hypermail 2.0.0 : Tue Jun 02 2009 - 10:16:46 EDT