[
http://jira.amdatu.org/jira/browse/AMDATU-208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bram de Kruijff updated AMDATU-208:
-----------------------------------
Fix Version/s: 0.3.0
> Refactor CRUD API of Tenant services to be consistent with retuning null and
> throwing checked exceptions
> --------------------------------------------------------------------------------------------------------
>
> Key: AMDATU-208
> URL: http://jira.amdatu.org/jira/browse/AMDATU-208
> Project: Amdatu
> Issue Type: Task
> Components: Amdatu Core
> Affects Versions: 0.1.0
> Reporter: Ivo Ladage - van Doorn
> Fix For: 0.3.0
>
>
> The current CRUD API of the (combined) TenantManagementService and
> TenantStorageProvider uses the following inconsistent approach:
> create(id) -> returns null if an entity with that id already exists
> update(id) -> creates a new entity if it didn't exist yet
> delete(id) -> throws checked exception if it doesn't exist
> get(id) -> returns null if it doesn't exist
> I believe this is not consistent and not correct. IMHO this is how a typical
> CRUD API should look like:
> create(id) -> throws checked AlreadyExistsException if an entity with that
> id already exists
> update(id) -> throws checked NotFoundException if an entity with that id does
> not exist
> delete(id) -> throws checked NotFoundException if an entity with that id
> does not exist
> get(id) -> returns null OR throws checked NotFoundException if it
> doesn't exist (either of the two seems ok to me)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
http://jira.amdatu.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers