Update of /var/cvs/contributions/natmm/src/nl/mmatch
In directory james.mmbase.org:/tmp/cvs-serv28517/src/nl/mmatch
Modified Files:
CSVReader.java
Log Message:
NMCMS-136
See also: http://cvs.mmbase.org/viewcvs/contributions/natmm/src/nl/mmatch
See also: http://www.mmbase.org/jira/browse/NMCMS-136
Index: CSVReader.java
===================================================================
RCS file: /var/cvs/contributions/natmm/src/nl/mmatch/CSVReader.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- CSVReader.java 30 May 2007 13:59:26 -0000 1.20
+++ CSVReader.java 20 May 2008 14:36:09 -0000 1.21
@@ -141,7 +141,7 @@
// mark all relations for employees and departments
log.info("markNodesAndRelations " + thisType);
NodeManager relatedNodeNM = cloud.getNodeManager(thisType);
- NodeList thisnodesList = relatedNodeNM.getList(null,null,null);
+ NodeList thisnodesList = relatedNodeNM.getList("importstatus not like
'%" + IGNORE_BEAUFORT + "%'",null,null);
RelationList relations = null;
Node thisnode = null;
int i = 0;
@@ -174,7 +174,7 @@
// deletes all nodes relations for employees and departments, which
are inactive
log.info("deleteNodesAndRelations " + thisType);
NodeManager relatedNodeNM = cloud.getNodeManager(thisType);
- NodeList thisnodesList = relatedNodeNM.getList(null,null,null);
+ NodeList thisnodesList = relatedNodeNM.getList("importstatus not like
'%" + IGNORE_BEAUFORT + "%'",null,null);
RelationList relations = null;
Node thisnode = null;
int i = 0;
@@ -355,6 +355,10 @@
}
}
+
+ // if null means not in db - new medewerker. set to active to prevent
NullPE. also being in beaufort means it is an active medewerker
+ if ((personsNode.getValue("importstatus") == null) ||
(!personsNode.getValue("importstatus").equals(IGNORE_BEAUFORT))) {
+
personsNode.setValue("externid", thisPerson.get("SOFI_NR"));
String alias = (String) personsNode.getValue("account");
if(alias==null||alias.equals("")) { // no alias found, use the created
one
@@ -371,11 +375,10 @@
personsNode.setValue("lastname", thisPerson.get("E_NAAM"));
}
personsNode.setValue("gender",getGender((String)
thisPerson.get("GENDER")));
- // if null means not in db - new medewerker. set to active to prevent
NullPE. also being in beaufort means it is an active medewerker
- if ((personsNode.getValue("importstatus") == null) ||
(!personsNode.getValue("importstatus").equals(IGNORE_BEAUFORT))) {
+
personsNode.setValue("importstatus","active");
- }
personsNode.commit();
+ }
return personsNode;
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs