| Convert |
|
| Entity |
Annotation for entities
greenDAO only persist objects of classes which are marked with this annotation
|
| Generated |
Marks that a field, constructor or method was generated by greenDAO
All the code elements that are marked with this annotation can be changed/removed during next run of generation in
respect of model changes.
|
| Id |
Marks field is the primary key of the entity's table
|
| Index |
Can be used to:
- specifies that the property should be indexed
- define multi-column index through Entity.indexes()
|
| JoinEntity |
Defines *-to-* relation with join table
|
| JoinProperty |
Defines name and referencedName properties for relations
|
| Keep |
Specifies that the target should be kept during next run of greenDAO generation.
|
| NotNull |
Specifies that property is not null
|
| OrderBy |
Specifies ordering of related collection of ToMany relation
E.g.: @OrderBy("name, age DESC") List collection;
If used as marker (@OrderBy List collection), then collection is ordered by primary key
|
| Property |
Optional: configures the mapped column for a persistent field.
|
| ToMany |
Defines *-to-N relation
|
| ToOne |
Defines *-to-1 relation with base on existing property as foreign key or with base on
automatically created backing column
In case foreignKey is not specified, the following annotations can be applied together with @ToOne:
- Property to specify backing column name
- Unique to put the unique constraint on backing column during table creation
- NotNull to put the NOT NULL constraint on backing column during table creation
|
| Transient |
Transient fields are not persisted in the database.
|
| Unique |
Marks property should have a UNIQUE constraint during table creation.
|