Eamon CS  3.1.0
Eamon.Framework.DataStorage.Generic.IDbTable< T > Interface Template Reference

Represents a collection of records of type T in a database. More...

Inheritance diagram for Eamon.Framework.DataStorage.Generic.IDbTable< T >:
Eamon.Game.DataStorage.Generic.DbTable< T >

Public Member Functions

RetCode FreeRecords (bool dispose=true)
 Fully reinitializes the IDbTable and restores it to its initial (empty) state. More...
 
long GetRecordCount ()
 Gets the number of records of type T stored in the Records collection. More...
 
FindRecord (long uid)
 Gets a record from the Records collection. More...
 
FindRecord (Type type, bool exactMatch=false)
 Gets a record from the Records collection based on interface type. More...
 
RetCode AddRecord (T record, bool makeCopy=false)
 Adds a record to the Records collection. More...
 
RemoveRecord (long uid)
 Removes a record from the Records collection. More...
 
RemoveRecord (Type type, bool exactMatch=false)
 Removes a record from the Records collection based on interface type. More...
 
long GetRecordUid (bool allocate=true)
 Gets the next available record Uid. More...
 
void FreeRecordUid (long uid)
 Frees a record Uid, making it available again for use. More...
 

Properties

ICollection< T > Records [get, set]
 Gets or sets the collection of records stored in the database table. More...
 
SortedSet< long > FreeUids [get, set]
 Gets or sets the collection of Uids available for reuse by new instances of this record type; may be empty. More...
 
long CurrUid [get, set]
 Gets or sets a sequence number representing the last Uid (unique ID) allocated to a record of type T. More...
 

Detailed Description

Represents a collection of records of type T in a database.

Type Constraints
T :class 
T :IGameBase 

Member Function Documentation

◆ AddRecord()

RetCode Eamon.Framework.DataStorage.Generic.IDbTable< T >.AddRecord ( record,
bool  makeCopy = false 
)

Adds a record to the Records collection.

Parameters
record
makeCopy
Returns

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

◆ FindRecord() [1/2]

T Eamon.Framework.DataStorage.Generic.IDbTable< T >.FindRecord ( long  uid)

Gets a record from the Records collection.

Parameters
uid
Returns

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

◆ FindRecord() [2/2]

T Eamon.Framework.DataStorage.Generic.IDbTable< T >.FindRecord ( Type  type,
bool  exactMatch = false 
)

Gets a record from the Records collection based on interface type.

Parameters
type
exactMatch
Returns

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

◆ FreeRecords()

RetCode Eamon.Framework.DataStorage.Generic.IDbTable< T >.FreeRecords ( bool  dispose = true)

Fully reinitializes the IDbTable and restores it to its initial (empty) state.

Parameters
dispose
Returns

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

◆ FreeRecordUid()

void Eamon.Framework.DataStorage.Generic.IDbTable< T >.FreeRecordUid ( long  uid)

Frees a record Uid, making it available again for use.

Parameters
uid

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

◆ GetRecordCount()

long Eamon.Framework.DataStorage.Generic.IDbTable< T >.GetRecordCount ( )

Gets the number of records of type T stored in the Records collection.

Returns

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

◆ GetRecordUid()

long Eamon.Framework.DataStorage.Generic.IDbTable< T >.GetRecordUid ( bool  allocate = true)

Gets the next available record Uid.

Parameters
allocate
Returns

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

◆ RemoveRecord() [1/2]

T Eamon.Framework.DataStorage.Generic.IDbTable< T >.RemoveRecord ( long  uid)

Removes a record from the Records collection.

Parameters
uid
Returns

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

◆ RemoveRecord() [2/2]

T Eamon.Framework.DataStorage.Generic.IDbTable< T >.RemoveRecord ( Type  type,
bool  exactMatch = false 
)

Removes a record from the Records collection based on interface type.

Parameters
type
exactMatch
Returns

Implemented in Eamon.Game.DataStorage.Generic.DbTable< T >.

Property Documentation

◆ CurrUid

Gets or sets a sequence number representing the last Uid (unique ID) allocated to a record of type T.

◆ FreeUids

SortedSet<long> Eamon.Framework.DataStorage.Generic.IDbTable< T >.FreeUids
getset

Gets or sets the collection of Uids available for reuse by new instances of this record type; may be empty.

◆ Records

ICollection<T> Eamon.Framework.DataStorage.Generic.IDbTable< T >.Records
getset

Gets or sets the collection of records stored in the database table.


The documentation for this interface was generated from the following file: