Interface IRedbObject

Assembly: redb.Core.dll

Base interface for all REDB objects
Allows working with objects as classes rather than IDs
Enriched with full functionality for working with trees, timestamps and auditing

public interface IRedbObject

Properties

DateBegin

Object validity start date (optional)

DateTimeOffset? DateBegin { get; set; }

DateComplete

Object validity end date (optional)

DateTimeOffset? DateComplete { get; set; }

DateCreate

Object creation date and time

DateTimeOffset DateCreate { get; set; }

DateModify

Object last modification date and time

DateTimeOffset DateModify { get; set; }

Hash

MD5 hash of object for integrity control

Guid? Hash { get; set; }

HasParent

Checks if object has a parent

bool HasParent { get; }

Id

Unique object identifier

long Id { get; set; }

IsRoot

Checks if object is root (has no parent)

bool IsRoot { get; }

Key

Object key field

long? Key { get; set; }

Name

Object name

string Name { get; set; }

Note

Object notes

string? Note { get; set; }

OwnerId

Object owner identifier

long OwnerId { get; set; }

ParentId

Parent object identifier

long? ParentId { get; set; }

SchemeId

Object scheme identifier

long SchemeId { get; set; }

ValueBool

Primitive boolean value (for primitive schemas)

bool? ValueBool { get; set; }

ValueBytes

Primitive byte array value (for primitive schemas)

byte[]? ValueBytes { get; set; }

ValueDatetime

Primitive datetime value (for primitive schemas)

DateTimeOffset? ValueDatetime { get; set; }

ValueDouble

Primitive double value (for primitive schemas)

double? ValueDouble { get; set; }

ValueGuid

Primitive GUID value (for primitive schemas)

Guid? ValueGuid { get; set; }

ValueLong

Primitive long value (for primitive schemas)

long? ValueLong { get; set; }

ValueNumeric

Primitive decimal value (for primitive schemas)

decimal? ValueNumeric { get; set; }

ValueString

Primitive string value (for primitive schemas)

string? ValueString { get; set; }

WhoChangeId

Identifier of user who last modified the object

long WhoChangeId { get; set; }

Methods

ResetId(bool)

Reset object ID to 0 and optionally ParentId to null

void ResetId(bool withParent = true)

ResetIds(bool)

Reset object ID and ParentId (recursively processes nested objects)

void ResetIds(bool recursive = false)