This would probably be easiest to implement using an
EntityMaintanence entity with entityEnum, serviceName, lastRun as fields. Then create services and simple-methods to run whatever kind of maintenance that is necessary. ========Vinay wrote: Hello, I find need for an entity cleanup tool that can delete or export an entity and all related entities excluding seed. I use very drastic database delete and ant run-install for this purpose while I am getting familiar with OFBiz. Even in production, I can see need to cleanup entities for signups that were not completed or some selected past data. I expect something like this to work as follows: 1. If the entity's primary key is non-numeric, assume it is seed data and do nothing. 2. From each numeric field of the target entity, find all the related entities and put them on the entity list. (If you know of Java function and syntax that would do it, I would like to know.) 3. Find all entities that use any of the target entity's primary keys and add them to this entity list. (Again, I would want to know Java function to do it.) 4. For every entry on the entity list, perform the find functions 2 and 3 recursively. 5. Present the entire list to the admin with checkbox to include/exclude operation. 6. Perform delete or export operation as selected. I can do this in Java with some help :-) Regards, Vinay Agarwal -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.ofbiz.org/pipermail/users/attachments/20060301/11cb3da0/attachment.htm _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
if you look at the webtools -> Entity Data Maintenance
you can expand from that. Chris Howe sent the following on 3/1/06 12:30 PM: > This would probably be easiest to implement using an > EntityMaintanence entity with entityEnum, serviceName, > lastRun as fields. Then create services and > simple-methods to run whatever kind of maintenance > that is necessary. > > ========Vinay wrote: > Hello, > > > > I find need for an entity cleanup tool that can delete > or export an entity > and all related entities excluding seed. I use very > drastic database delete > and ant run-install for this purpose while I am > getting familiar with OFBiz. > Even in production, I can see need to cleanup entities > for signups that were > not completed or some selected past data. I expect > something like this to > work as follows: > > > > 1. If the entity's primary key is non-numeric, assume > it is seed data > and do nothing. > 2. From each numeric field of the target entity, find > all the related > entities and put them on the entity list. (If you know > of Java function and > syntax that would do it, I would like to know.) > 3. Find all entities that use any of the target > entity's primary keys > and add them to this entity list. (Again, I would want > to know Java function > to do it.) > 4. For every entry on the entity list, perform the > find functions 2 and > 3 recursively. > 5. Present the entire list to the admin with checkbox > to > include/exclude operation. > 6. Perform delete or export operation as selected. > > > > I can do this in Java with some help :-) > > > > Regards, > > Vinay Agarwal > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.ofbiz.org/pipermail/users/attachments/20060301/11cb3da0/attachment.htm > > _______________________________________________ > Users mailing list > [hidden email] > http://lists.ofbiz.org/mailman/listinfo/users > _______________________________________________ Users mailing list [hidden email] http://lists.ofbiz.org/mailman/listinfo/users |
Free forum by Nabble | Edit this page |