I don't know of a way to align the service methods, since our services can handle multiple domain classes, so we can't just define an interface for it.
All our classes that support the new-style attributes implement org.openmrs.customdatatype.Customizable<A extends Attribute>. It does not have a remove method, so could you propose one? (Note that we'd typically want to *void* the attribute, not actually remove it from the db.) Unfortunately, PersonAttribute does not implement the new Attribute interface--we'll have to deal with retrofitting that at some point, but we can definitely focus on making sure that the new-style Attributes (LocationAttribute, ProviderAttribute, VisitAttribute) behave consistently with all the methods we want. -Darius On Thu, May 17, 2012 at 11:56 AM, Burke Mamlin <bmam...@regenstrief.org>wrote: > Agree these should be aligned. Not sure if there is an automatic way to > align them. > > -Burke > > > On Thu, May 17, 2012 at 12:14 PM, Saptarshi Purkayastha > <sun...@gmail.com>wrote: > >> Comparing the newly introduced LocationAttribute and >> LocationAttributeType to the PersonAttribute and PersonAttributeType, I see >> some differences in their methods. >> >> for e.g. We do not have the LocationAttributeType search by name which is >> convenient in the PersonAttributeType through the >> PersonService.getPersonAttributeTypeByName(String name) available, but is >> missing in LocationService to find LocationAttributeType. Also similar with >> getPersonAttributeTypes(String exactName, String format, Integer >> foreignKey, Boolean searchable) is missing from LocationService. >> >> There is also the missing convenience method >> Location.removeLocationAttribute(LocationAttribute) that is available in >> Person.removePersonAttribute(PersonAttribute). There might be other >> differences as well. >> >> Is there some way we can ensure that the API methods are similar across >> similar domain objects?? May be the BaseAttributeType is the way to do it, >> but PersonAttributeType is not part of it... >> >> --- >> Regards, >> Saptarshi PURKAYASTHA >> >> My Tech Blog: http://sunnytalkstech.blogspot.com >> You Live by CHOICE, Not by CHANCE >> ------------------------------ >> Click here to >> unsubscribe<lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l>from >> OpenMRS Developers' mailing list > > > ------------------------------ > Click here to > unsubscribe<lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to lists...@listserv.iupui.edu with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l]