ContentAdapterConfiguration

class kanzi::connect::ContentAdapterConfiguration

Configuration for the content adapter, defines the data model of the data object tree and source of the data in content system.

Public Types

enum Type

Type of content adapter.

Values:

enumerator Single

Content adapter translates only single rows.

enumerator List

Content adapter translates lists of id’s that are separated by ‘;’.

Public Functions

ContentAdapterConfiguration()

Constructor.

bool fillOverrideValues(ContentAdapterConfiguration &overriderConf)

Override this objects contents from another configuration.

Return

True if no errors when overriding

Parameters
  • overriderConf: instance whose values are used to override, if it contains new fields they are move copied

Field *getField(const string &fieldName)

Finds the given field within the configuration.

Return

Pointer to the field, null pointer if not found

Parameters
  • fieldName: identifies the field by its name

bool isRuntimeData() const

Is this object a runtime data object.

Return

true if runtime data.

Public Members

int m_creditReturnInterval
int m_credits
string m_dataObjectName

Name of the root data object.

string m_dynamicSourceName

if this is dynamic service holds the name

vector<Field> m_fields

Columns to read from the table.

string m_filter

Where clause for filtering output rows.

size_t m_limitCount

Output row count.

size_t m_limitIndex

Output row index.

RuntimeDataObjectSharedPtr m_runtimeObject
bool m_singleShot

If true, stops content subscription after first result.

string m_sort

Order by clause for sorting output rows.

size_t m_subscriptionBlockSize

Size of subscription block. How many rows are loaded simultaneously.

Type m_type

Type of the adapter.

string m_uri

Name of the database table.

class Field

Describes a single column in database.

Public Functions

Field(const string &column, DataObject::Type type, const string &name)

Constructor.

Parameters
  • column: Name of the column in table.

  • type: Datatype of the column.

  • name: Name of the data object that holds the output value.

Field(const Field &other) = default

Copy constructor.

Parameters
  • other: Other field to copy

Field(Field &&other)

Move constructor.

Parameters
  • other: Other field to move from

bool fillOverrideValues(const Field &overriderField)

Override this fields data with data from another field.

Parameters
  • overriderField: Instance whose data is used

Field &operator=(Field &&other)

Move assignment.

Parameters
  • other: Other field to move from

Field &operator=(const Field &other) = default

Copy assignment operator.

Parameters
  • other: Other field to assign to this

Public Members

string m_column

The name of the database column.

string m_dynamicSourceName

Name of a external object.

string m_lookupColumn

The column that can be used to filter out certain results from the items.

string m_name

The name of the data field.

string m_preloadUrl

If resource, a placeholder resource to be shown while preloading.

DataObject::Type m_type

The type of the data field.