Default relations?

Hi,
I want to create several types of java objects, so I wrote a simple Entity-Attribute-Relation model. Now I wanted to specialize a bit, i.e. creating a subclass of Entity that already has 4 relations to 4 Attributes. Can such be achieved? Or are there better ways to do the same? The reason I like to make the relations is that the code is then generated similarly to the other specialized objects.
My case (simplified)
Entity -> Attributes
^
FooEntity
I want the FooEntity to contain 4 relations to attributes, i.e. dateCreated, dateMofified. These should be relations to Attributes. I know I can code them in a template, but then I can't use the nice code-generation capalibities
I want to create several types of java objects, so I wrote a simple Entity-Attribute-Relation model. Now I wanted to specialize a bit, i.e. creating a subclass of Entity that already has 4 relations to 4 Attributes. Can such be achieved? Or are there better ways to do the same? The reason I like to make the relations is that the code is then generated similarly to the other specialized objects.
My case (simplified)
Entity -> Attributes
^
FooEntity
I want the FooEntity to contain 4 relations to attributes, i.e. dateCreated, dateMofified. These should be relations to Attributes. I know I can code them in a template, but then I can't use the nice code-generation capalibities