TracNav
Table of Contents
Introduction
Application overview
Installation
Generation
- MOLGENIS workspace basics
- Running the generator
- Modeling a new MOLGENIS
- Modeling an existing database
- molgenis.properties file
Plug-ins
Language Reference
<entity>
The <entity> element defines the structure of one data entity and will result in a table in the database, and several Java classes. Example usage of the <entity> element:
<entity name="unique_name"> <description>This is my first entity.</description> <field name="name" type="string"/> <field name="investigation" type="string"/> <unique fields="name,investigation"/> </entity>
Required attributes
- name="name": globally unique name for this entity (within this blueprint).
Optional attributes
- label="Nice screen name": an user-friendly alias to show as form header (default: copied from name).
- extends="other_entity": you can use inheritance to make your entity inherit the fields of its 'superclass' using extends.
- abstract="true": you define what programmers call 'interfaces'. This are abstract objects that you can use as 'contract' for other entities to 'implement'..
- implements="abstract_entity": you can use inheritance to make your entity inherit the fields of its 'interface' using implements and refering to 'abstract' entities. The implemented fields are copied to this entity.
- decorator="package.class": you can add custom code to change the way entities are added, updated and removed. See the section on how to write a MappingDecorator? plugin.
Child elements
The <entity> element can contain
Last modified by mswertz, 08/22/10 23:30:55 (2 weeks ago)
![(please configure the [header_logo] section in trac.ini)](http://gbic.target.rug.nl/trac/molgenis/chrome/site/molgenis_logo.jpg)