[Snmap-developer] SNMAP/src/net/sf/snmap/mapping SimpleValue.java,NONE,1.1
Status: Planning
Brought to you by:
arden
|
From: arden l. <ar...@us...> - 2006-01-13 03:22:43
|
Update of /cvsroot/snmap/SNMAP/src/net/sf/snmap/mapping In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7500/src/net/sf/snmap/mapping Added Files: SimpleValue.java Log Message: --- NEW FILE: SimpleValue.java --- package net.sf.snmap.mapping; import org.snmp4j.smi.OID; import net.sf.snmap.MappingException; import net.sf.snmap.util.ReflectHelper; /** * Any value that maps to columns. * @author Gavin King */ public class SimpleValue implements KeyValue { private static final long serialVersionUID = 8311998547913915506L; private String typeName = null; // TODO : I have not used ObjectType. private ObjectType objectType; public String getTypeName() { return typeName; } public void setTypeName(String type) { this.typeName = type; } public boolean isSimpleValue() { return true; } public void setTypeUsingReflection(String className, String propertyName) throws MappingException { if (typeName==null) { if (className==null) { throw new MappingException("you must specify types for a dynamic entity: " + propertyName); } typeName = ReflectHelper.reflectedPropertyClass(className, propertyName).getName(); } } public ObjectType getObjectType() { return objectType; } public void setObjectType( ObjectType objectType ) { this.objectType = objectType; } } |