From: Nico K. <nkl...@us...> - 2008-01-14 22:24:49
|
Update of /cvsroot/mmapps/mmapps/mmcommons/src/java/net/sf/mmapps/commons/beans In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22214/mmcommons/src/java/net/sf/mmapps/commons/beans Modified Files: NodetypeBean.java NodeBean.java MMBaseNodeMapper.java Log Message: Add type string to NodeBean Index: NodetypeBean.java =================================================================== RCS file: /cvsroot/mmapps/mmapps/mmcommons/src/java/net/sf/mmapps/commons/beans/NodetypeBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NodetypeBean.java 6 Apr 2006 10:00:33 -0000 1.1 --- NodetypeBean.java 14 Jan 2008 22:24:43 -0000 1.2 *************** *** 17,21 **** */ public class NodetypeBean extends NodeBean { ! public String name; public String getName() { --- 17,24 ---- */ public class NodetypeBean extends NodeBean { ! ! private static final long serialVersionUID = -4892877864883371932L; ! ! public String name; public String getName() { Index: NodeBean.java =================================================================== RCS file: /cvsroot/mmapps/mmapps/mmcommons/src/java/net/sf/mmapps/commons/beans/NodeBean.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NodeBean.java 20 Sep 2007 18:24:27 -0000 1.2 --- NodeBean.java 14 Jan 2008 22:24:43 -0000 1.3 *************** *** 8,14 **** */ public class NodeBean implements Serializable { - private int id; // mmbase number ! private String type; // mmbase otype private String owner; --- 8,17 ---- */ public class NodeBean implements Serializable { ! private static final long serialVersionUID = -8280773380954246333L; ! ! private int id; // mmbase number ! ! private String nodeType; // mmbase otype private String owner; *************** *** 22,31 **** } ! public String getType() { ! return type; } ! public void setType(String type) { ! this.type = type; } --- 25,34 ---- } ! public String getNodeType() { ! return nodeType; } ! public void setNodeType(String type) { ! this.nodeType = type; } Index: MMBaseNodeMapper.java =================================================================== RCS file: /cvsroot/mmapps/mmapps/mmcommons/src/java/net/sf/mmapps/commons/beans/MMBaseNodeMapper.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MMBaseNodeMapper.java 20 Sep 2007 18:24:27 -0000 1.4 --- MMBaseNodeMapper.java 14 Jan 2008 22:24:43 -0000 1.5 *************** *** 46,51 **** fname = "id"; } else if (fname.equalsIgnoreCase("otype")) { ! // fname = "type"; ! // v = getOType(v); } --- 46,51 ---- fname = "id"; } else if (fname.equalsIgnoreCase("otype")) { ! fname = "nodeType"; ! v = getOType(v); } *************** *** 80,84 **** } ! /** * Maps fields from a MMBase node to a Java Class * --- 80,91 ---- } ! private static Object getOType(Object v) { ! if (v instanceof NodeManager) { ! return ((NodeManager) v).getName(); ! } ! return null; ! } ! ! /** * Maps fields from a MMBase node to a Java Class * |