Update of
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/person
In directory
james.mmbase.org:/tmp/cvs-serv1865/community/src/java/com/finalist/cmsc/services/community/person
Modified Files:
Tag: b1_4
PersonService.java PersonHibernateService.java
Log Message:
CMSC-830 - change functionname to match returnvalue (+formatting, + javadoc)
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/person
See also: http://www.mmbase.org/jira/browse/CMSC-830
Index: PersonService.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/person/PersonService.java,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -u -b -r1.2.2.3 -r1.2.2.4
--- PersonService.java 26 Mar 2008 09:31:57 -0000 1.2.2.3
+++ PersonService.java 26 Mar 2008 09:44:08 -0000 1.2.2.4
@@ -25,7 +25,15 @@
Person getPersonByUserId(String userId);
- List<Person> getPerson(Person person);
+ /**
+ * Get a list of matching persons that match the given example. The fields
+ * that are set on the example Person are the criteria for the search.
+ *
+ * @param example
+ * the example person
+ * @return a list of persons that match the given example.
+ */
+ List<Person> getPersons(Person example);
Person getPersonByAuthenticationId(Long authenticationId);
Index: PersonHibernateService.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/person/PersonHibernateService.java,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -u -b -r1.2.2.4 -r1.2.2.5
--- PersonHibernateService.java 26 Mar 2008 09:31:57 -0000 1.2.2.4
+++ PersonHibernateService.java 26 Mar 2008 09:44:08 -0000 1.2.2.5
@@ -41,11 +41,12 @@
/** [EMAIL PROTECTED] */
@Transactional
@SuppressWarnings("unchecked")
- public List<Person> getPerson(Person person) {
- if (person == null)
+ public List<Person> getPersons(Person example) {
+ if (example == null) {
return Collections.emptyList();
+ }
- List personList =
getSession().createCriteria(Person.class).add(Example.create(person)).list();
+ List personList =
getSession().createCriteria(Person.class).add(Example.create(example)).list();
return personList;
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs