1 10 package org.mmbase.module.core; 11 12 import java.util.*; 13 14 24 public class VirtualNode extends MMObjectNode { 25 26 30 public VirtualNode(MMObjectBuilder parent) { 31 super(parent, false); 32 } 33 34 37 public VirtualNode(Map values) { 38 super(new VirtualBuilder(MMBase.getMMBase()), values); 39 } 40 41 public boolean isVirtual() { 42 return true; 43 } 44 45 48 protected boolean checkFieldExistance(String fieldName) { 49 return true; 50 } 51 52 58 public boolean commit() { 59 return false; 60 } 61 62 67 public int insert(String userName) { 68 throw new UnsupportedOperationException ("Method insert is not implemented on a virtual node."); 69 } 70 71 76 public boolean hasRelations() { 77 return false; 78 } 79 80 85 public Enumeration getRelations() { 86 return new java.util.Vector (0).elements(); 87 } 88 89 94 public int getRelationCount() { 95 return 0; 96 } 97 98 104 public int getRelationCount(String wantedtype) { 105 return 0; 106 } 107 108 113 public int getAge() { 114 return 0; 115 } 116 117 public int getOType() { 118 return -1; 119 } 120 121 } 122 | Popular Tags |