Sebastien, You're generic implementation is fine as long as TypeHelper.INSTANCE is the right scope where the type is registered.
If you aren't interested in supporting dynamic subclasses of static classes, then getStaticType() is always == DataObject.getType(), so you might not even need to implement getStaticType(). Frank Jean-Sebastien Delfino <[EMAIL PROTECTED]> 11/19/2007 11:25 AM Please respond to [email protected] To [email protected] cc Subject Re: How to write a simple SDO class for the tutorial? kelvin goodson wrote: > I missed you last point in my reply. getStaticType() is required to > underpin fundamental EMF behaviour. Without it EMF's capacity to know > the class of an EObject (which all our DataObjects are derived from) > is broken for all static classes, and that would break many SDO > behaviours, e.g. serialization, copying, and I'm sure lots more. > > Kelvin. > Assuming that my DataObjects are simple classes without interfaces, isn't the type already registered with my DataObject's class? In other words can I implement getStaticType generically as follows: Type getStaticType() { TypeHelper.INSTANCE.getType(this.getClass()); } -- Jean-Sebastien --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
