Defining Entities
This is the manual for older MicroStream versions (Version < 5.0).
The new documentation (Version >= 5.0) is located at:
The entity types are just simple interfaces with value methods, which have following requirements:
A return type, no void
No parameters
No type parameters
No declared checked exceptions
You are not limited otherwise. Use any types you want. Inheritance and generics are supported as well.
Entities
public interface Beeing<B>
{
public B partner();
}public interface Named
{
public String name();
}public interface Animal extends Beeing<Animal>, Entity
{
public String species();
}public interface Pet extends Animal, Named
{
}public interface Human extends Beeing<Human>, Named, Entity
{
}There is one base type (Beeing), one feature interface (Named) and three entities (Animal, Pet, Human).
Generated Code
The code generator takes care of the three entities, and its output looks like this:
Last updated