Update of
/var/cvs/contributions/CMSContainer_Modules/community/src/java/com/finalist/cmsc/services/community/person
In directory
james.mmbase.org:/tmp/cvs-serv1610/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 argument (+formatting)
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.2
retrieving revision 1.2.2.3
diff -u -b -r1.2.2.2 -r1.2.2.3
--- PersonService.java 25 Mar 2008 18:46:26 -0000 1.2.2.2
+++ PersonService.java 26 Mar 2008 09:31:57 -0000 1.2.2.3
@@ -6,7 +6,7 @@
The license (Mozilla version 1.0) can be read at the MMBase site.
See http://www.MMBase.org/license
-*/
+ */
package com.finalist.cmsc.services.community.person;
import java.util.List;
@@ -27,11 +27,12 @@
List<Person> getPerson(Person person);
- Person getPersonByAuthentication(Long authenticationId);
+ Person getPersonByAuthenticationId(Long authenticationId);
Person createPerson(String firstName, String infix, String lastName, Long
authenticationId);
- /* Save or update the person to the database
+ /*
+ * Save or update the person to the database
*/
void updatePerson(Person person);
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.3
retrieving revision 1.2.2.4
diff -u -b -r1.2.2.3 -r1.2.2.4
--- PersonHibernateService.java 25 Mar 2008 18:46:26 -0000 1.2.2.3
+++ PersonHibernateService.java 26 Mar 2008 09:31:57 -0000 1.2.2.4
@@ -41,14 +41,11 @@
/** [EMAIL PROTECTED] */
@Transactional
@SuppressWarnings("unchecked")
- public List<Person> getPerson(Person person){
+ public List<Person> getPerson(Person person) {
if (person == null)
return Collections.emptyList();
- List personList = getSession()
- .createCriteria(Person.class)
- .add(Example.create(person))
- .list();
+ List personList =
getSession().createCriteria(Person.class).add(Example.create(person)).list();
return personList;
}
@@ -71,7 +68,7 @@
person.setFirstName(firstName);
person.setInfix(infix);
person.setLastName(lastName);
- person.setAuthenticationId(authenticationId); //used to
find account
+ person.setAuthenticationId(authenticationId); // used to find account
getSession().save(person);
return person;
}
@@ -85,7 +82,6 @@
getSession().flush();
}
-
/** [EMAIL PROTECTED] */
@Transactional
public boolean deletePersonByUserId(String userId) {
@@ -101,7 +97,7 @@
private Person findPersonByUserId(String userId) {
Long authenticationId =
authenticationService.getAuthenticationIdForUserId(userId);
- return getPersonByAuthentication(authenticationId);
+ return getPersonByAuthenticationId(authenticationId);
}
@SuppressWarnings("unchecked")
@@ -117,12 +113,10 @@
/** [EMAIL PROTECTED] */
@Transactional(readOnly = true)
- public Person getPersonByAuthentication(Long authenticationId) {
+ public Person getPersonByAuthenticationId(Long authenticationId) {
Person person = null;
if (authenticationId != null) {
- Criteria criteria = getSession()
- .createCriteria(Person.class)
- .add(Restrictions.eq("authenticationId",
authenticationId));
+ Criteria criteria =
getSession().createCriteria(Person.class).add(Restrictions.eq("authenticationId",
authenticationId));
person = findPersonByCriteria(criteria);
}
return person;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs