Daobab Key Objects

Content providers

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

     - 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.

As mentioned, Plate is able to store data of columns with the same name, but belonging to different tables.

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 results in use:

Query returned object

Depending on query parameters, select return object types are as follows

Query looking toOne resultMany results
field/column/functionValue with related typeList with related type
set of fields/columns/functionsPlate or FlatPlatePlates(List of Plate) or FlatPlates
entity/tableEntity specifiedEntities (List of entity objects)

Share This Page


©Elephant Software Klaudiusz Wojtkowiak
e-mail: contact@daobab.io