Download PDF documentation

Transcript
OpenEngSBModels
object, it creates a FileWrapper object out of it. A FileWrapper object contains the name of the file and
a byte array which holds the zip compressed content of the file object.
If such a FileWrapper would be accessed by a getter of a file object, the ModelUtils does the conversion
work of the FileWrapper to the file object for you. So this feature is completely transparent for the
normal user. Note that the conversion of a file object to a FileWrapper and the other way round has
only to be done if getOpenEngSBModelEntries is called. For now this is only the case at two points:
when a model has to be saved into the EDB or when a model is sent via remote.
49.4. Model Ids
For easier maintaining and faster finding of models (and also to enable the versioning possibility), the
user is able to define a field to be the id of a model. An important point to consider here is that this id
has to be unique for a connector of a domain (this is because the id will be enlarged with the domain
id and the connector id).
To define a field to be the id of the model you simply have to add an annotation to the corresponding
setter. The annotation is called OpenEngSBModelId. If no id is defined for a model and this model
has to be inserted into the EDB, the EDB just take an arbitrary id to save the model.
104