History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: BPM-284
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Wouter Zoons
Reporter: Philip Mark Donaghy
Votes: (View)
Watchers: (View)
Operations

If you were logged in you would be able to see more operations.
Bpm4Struts Cartridge

ValueObject as an argument to a create method

Created: 27/Apr/06 05:47 AM   Updated: 27/Apr/08 10:11 AM
Component/s: CRUD
Affects Version/s: 3.2-RC1
Fix Version/s: None

File Attachments: 1. Text File crud.txt (6 kb)



 Description   
It would be easier to code using the CRUD services if there was a create method and a update method that takes a value object.

 All   Comments   Change History      Sort Order:
Comment by Philip Mark Donaghy [28/Apr/06 11:46 AM]
I've started a patch for this. The right thing to do is add a create(vo) an update(vo) and a read(id) so that objects can be loaded and modified on an individual basis.

The following files are affected. I see now that this should actually be a Spring cartridge issue.

spring/crud/SpringCrudService.vsl is the service interface
spring/crud/SpringCrudDao.vsl is the spring dao interface

spring/crud/SpringCrudServiceBase.vsl is the service implementation
spring/crud/SpringCrudDaoBase.vsl is the spring dao implementation


Comment by Philip Mark Donaghy [28/Apr/06 12:44 PM]
Currently I'm using BeanUtils.copyProperties(entity, valueObject) but I think that a method called fromValueObject or toEntity in spring/crud/SpringCrudServiceBase.vsl would be appropriate and reduce the need for making calls to methods by reflection. Therefore saving resources.

Comment by Philip Mark Donaghy [11/May/06 03:11 PM]
This patch contains the following methods,

public EntityValueObject create(EntityValueObject)
public EntityValueObject read(EntityIdentifierObject)
public List read(EntityValueObject)
public EntityValueObject update(EntityValueObject)

These methods delegate to existing crud methods. A topic has been created on the forum which explains it in more detail, http://galaxy.andromda.org/forum/viewtopic.php?t=2413

Philip