Field - interface to describe particular field.
Implementation is written as a value into entity map.
Has three types <E,F,R>
E - type of entity class having this field
F - field type
R - points to himself implementation
Provides:
- getFieldName - field name used as a key into entity map.
- getEntityName - name of entity having this field (table name)
- getFieldClass - Class<F> which is a field class
- getEntityClass - Class<E> which is an entity class
- getValue/setValue - real value of type F
- getInstance - particular E entity having this particular field
Column - is an extension of above Field, filled with followed information:
- getColumnName - database column name
Entity - Main object contains many fields. An extention of Map<String,Object>, in which Columns/Fields are stored.
Every column/field is stored with fieldName as a key and value as a value into Map.Entry.
Each instance is a table row implementation.
Implements Column/Fields interfaces.
May implement PrimaryKey or PrimaryComposeKey interfaes.
Plate - Some set of cells from various columns, but not necessarily from a single table. Related to a particular row in a database.
FlatPlate - a plate subtype with unique set of columns.
If Plate has a unique set of column names, it may be converted to FlatPlate, which is easier to send immediately via JSON.
Field List - a list of fields, some cells from a particular column. The List has an object type specified in the Column.
Entities - collection class (List) of Entities. But not only - it's also a QueryTarget, so may be used for further in-memory query executions.
Plates - collection wrapper (implementation of List) of Plates.
May be QueryTarget as well.
FlatPlates - collection wrapper(List) of FlatPlate.
It's not a QueryTarget.
Query looking to | One result | Many results |
---|---|---|
field/column/function | Value with related type | List with related type |
set of fields/columns/functions | Plate or FlatPlate | Plates(List of Plate) or FlatPlates |
entity/table | Entity specified | Entities (List of entity objects) |