| 1 10 11 package org.mmbase.bridge.util; 12 13 import java.util.Locale ; 14 import java.util.Collection ; 15 import org.mmbase.util.LocalizedString; 16 import org.mmbase.bridge.*; 17 import org.mmbase.datatypes.DataType; 18 19 20 28 29 public abstract class FieldWrapper implements Field { 30 protected final Field field; 31 32 public FieldWrapper(Field field) { 33 this.field = field; 34 } 35 public abstract NodeManager getNodeManager(); 36 37 public int getState() { return Field.STATE_VIRTUAL; } 38 39 public DataType getDataType() { return field.getDataType(); } 40 public boolean isUnique() { return field.isUnique(); } 41 public boolean hasIndex() { return field.hasIndex(); } 42 public int getType() { return field.getType(); } 43 public int getListItemType() { return field.getListItemType(); } 44 public int getSearchPosition() { return field.getSearchPosition(); } 45 public int getListPosition() { return field.getListPosition(); } 46 public int getEditPosition() { return field.getEditPosition(); } 47 public int getStoragePosition() { return field.getStoragePosition(); } 48 public String getGUIType() { return field.getGUIType(); } 49 public boolean isRequired() { return field.isRequired(); } 50 public int getMaxLength() { return field.getMaxLength(); } 51 public Collection validate(Object value) { return field.validate(value); } 52 public boolean isVirtual() { return true; } 53 public boolean isReadOnly() { return true; } 54 public String getName() { return field.getName(); } 55 public String getGUIName() { return field.getGUIName(); } 56 public String getGUIName(Locale locale) { return field.getGUIName(locale); } 57 public LocalizedString getLocalizedGUIName() { return field.getLocalizedGUIName(); } 58 public void setGUIName(String g, Locale locale) { throw new UnsupportedOperationException (); } 59 public void setGUIName(String g) { throw new UnsupportedOperationException (); } 60 public LocalizedString getLocalizedDescription() { return field.getLocalizedDescription(); } 61 public String getDescription(Locale locale) { return field.getDescription(locale); } 62 public String getDescription() { return field.getDescription(); } 63 public void setDescription(String description, Locale locale) { throw new UnsupportedOperationException (); } 64 public void setDescription(String description) { throw new UnsupportedOperationException (); } 65 66 67 public Field getField() { 68 return field; 69 } 70 } 71 | Popular Tags |