NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CBlobRecord Class Reference

Search Toolkit Book for CBlobRecord

#include <objtools/pubseq_gateway/impl/cassandra/blob_record.hpp>

Public Types

using TSatKey = int32_t
 
using TSize = int64_t
 
using TTimestamp = int64_t
 
using TBlobChunk = vector< unsigned char >
 

Public Member Functions

 CBlobRecord ()
 
 CBlobRecord (TSatKey key)
 
 CBlobRecord (CBlobRecord const &)=default
 
 CBlobRecord (CBlobRecord &&)=default
 
CBlobRecordoperator= (CBlobRecord const &)=default
 
CBlobRecordoperator= (CBlobRecord &&)=default
 
CBlobRecordSetKey (TSatKey value)
 
CBlobRecordSetModified (TTimestamp value)
 
CBlobRecordSetFlags (TBlobFlagBase value)
 
CBlobRecordSetSize (TSize value)
 
CBlobRecordSetSizeUnpacked (TSize value)
 
CBlobRecordSetDateAsn1 (TTimestamp value)
 
CBlobRecordSetHupDate (TTimestamp value)
 
CBlobRecordSetDiv (string value)
 
CBlobRecordSetId2Info (string const &value)
 
CBlobRecordSetId2Info (int16_t sat, int32_t info, int32_t chunks, int32_t version=0)
 
CBlobRecordSetUserName (string value)
 
CBlobRecordSetNChunks (int32_t value)
 
CBlobRecordResetNChunks ()
 
CBlobRecordSetOwner (int32_t value)
 
CBlobRecordSetClass (int16_t value)
 
CBlobRecordSetGzip (bool value)
 
CBlobRecordSetNot4Gbu (bool value)
 
CBlobRecordSetSuppress (bool value)
 
CBlobRecordSetWithdrawn (bool value)
 
CBlobRecordSetDead (bool value)
 
CBlobRecordSetBigBlobSchema (bool value)
 
CBlobRecordAppendBlobChunk (TBlobChunk &&chunk)
 
CBlobRecordInsertBlobChunk (size_t index, TBlobChunk &&chunk)
 
CBlobRecordClearBlobChunks ()
 
TSatKey GetKey () const
 
TTimestamp GetModified () const
 
TBlobFlagBase GetFlags () const
 
bool GetFlag (EBlobFlags flag_value) const
 
TSize GetSize () const
 
TSize GetSizeUnpacked () const
 
int16_t GetClass () const
 
TTimestamp GetDateAsn1 () const
 
TTimestamp GetHupDate () const
 
string GetDiv () const
 
string GetId2Info () const
 
int32_t GetOwner () const
 
string GetUserName () const
 
int32_t GetNChunks () const
 
const TBlobChunkGetChunk (size_t index) const
 
bool NoData () const
 
void VerifyBlobSize () const
 
bool IsDataEqual (CBlobRecord const &blob) const
 
string ToString () const
 
bool IsConfidential () const
 

Private Member Functions

CBlobRecordSetFlag (bool set_flag, EBlobFlags flag_value)
 

Private Attributes

TTimestamp m_Modified
 
int64_t m_Flags
 
TSize m_Size
 
TSize m_SizeUnpacked
 
TTimestamp m_DateAsn1
 
TTimestamp m_HupDate
 
string m_Div
 
string m_Id2Info
 
string m_UserName
 
TSatKey m_SatKey
 
int32_t m_NChunks
 
int32_t m_Owner
 
int16_t m_Class
 
vector< TBlobChunkm_BlobChunks
 

Detailed Description

Definition at line 52 of file blob_record.hpp.

Member Typedef Documentation

◆ TBlobChunk

using CBlobRecord::TBlobChunk = vector<unsigned char>

Definition at line 57 of file blob_record.hpp.

◆ TSatKey

Definition at line 54 of file blob_record.hpp.

◆ TSize

Definition at line 55 of file blob_record.hpp.

◆ TTimestamp

Definition at line 56 of file blob_record.hpp.

Constructor & Destructor Documentation

◆ CBlobRecord() [1/4]

CBlobRecord::CBlobRecord ( )

Definition at line 45 of file blob_record.cpp.

◆ CBlobRecord() [2/4]

CBlobRecord::CBlobRecord ( TSatKey  key)
explicit

◆ CBlobRecord() [3/4]

CBlobRecord::CBlobRecord ( CBlobRecord const )
default

◆ CBlobRecord() [4/4]

CBlobRecord::CBlobRecord ( CBlobRecord &&  )
default

Member Function Documentation

◆ AppendBlobChunk()

CBlobRecord & CBlobRecord::AppendBlobChunk ( TBlobChunk &&  chunk)

Definition at line 206 of file blob_record.cpp.

References m_BlobChunks.

◆ ClearBlobChunks()

CBlobRecord & CBlobRecord::ClearBlobChunks ( )

Definition at line 225 of file blob_record.cpp.

References m_BlobChunks.

◆ GetChunk()

const CBlobRecord::TBlobChunk & CBlobRecord::GetChunk ( size_t  index) const

Definition at line 382 of file blob_record.cpp.

References m_BlobChunks, m_NChunks, m_SatKey, NStr::NumericToString(), and RAISE_DB_ERROR.

◆ GetClass()

int16_t CBlobRecord::GetClass ( void  ) const

Definition at line 337 of file blob_record.cpp.

References m_Class.

Referenced by ToJsonString().

◆ GetDateAsn1()

CBlobRecord::TTimestamp CBlobRecord::GetDateAsn1 ( ) const

Definition at line 342 of file blob_record.cpp.

References m_DateAsn1.

Referenced by ToJsonString().

◆ GetDiv()

string CBlobRecord::GetDiv ( void  ) const

Definition at line 352 of file blob_record.cpp.

References m_Div.

Referenced by ToJsonString().

◆ GetFlag()

bool CBlobRecord::GetFlag ( EBlobFlags  flag_value) const

◆ GetFlags()

TBlobFlagBase CBlobRecord::GetFlags ( void  ) const

Definition at line 312 of file blob_record.cpp.

References m_Flags.

Referenced by ToJsonString().

◆ GetHupDate()

CBlobRecord::TTimestamp CBlobRecord::GetHupDate ( ) const

Definition at line 347 of file blob_record.cpp.

References m_HupDate.

Referenced by ToJsonString().

◆ GetId2Info()

string CBlobRecord::GetId2Info ( ) const

◆ GetKey()

CBlobRecord::TSatKey CBlobRecord::GetKey ( void  ) const

Definition at line 317 of file blob_record.cpp.

References m_SatKey.

Referenced by CCassBlobTaskLoadBlob::InitBlobChunkDataQuery(), and ToJsonString().

◆ GetModified()

CBlobRecord::TTimestamp CBlobRecord::GetModified ( ) const

◆ GetNChunks()

int32_t CBlobRecord::GetNChunks ( ) const
inline

Definition at line 119 of file blob_record.hpp.

References m_NChunks.

Referenced by ToJsonString().

◆ GetOwner()

int32_t CBlobRecord::GetOwner ( void  ) const

Definition at line 362 of file blob_record.cpp.

References m_Owner.

Referenced by ToJsonString().

◆ GetSize()

CBlobRecord::TSize CBlobRecord::GetSize ( void  ) const

◆ GetSizeUnpacked()

CBlobRecord::TSize CBlobRecord::GetSizeUnpacked ( ) const

Definition at line 332 of file blob_record.cpp.

References m_SizeUnpacked.

Referenced by ToJsonString().

◆ GetUserName()

string CBlobRecord::GetUserName ( void  ) const

Definition at line 367 of file blob_record.cpp.

References m_UserName.

Referenced by ToJsonString().

◆ InsertBlobChunk()

CBlobRecord & CBlobRecord::InsertBlobChunk ( size_t  index,
TBlobChunk &&  chunk 
)

Definition at line 214 of file blob_record.cpp.

References m_BlobChunks.

◆ IsConfidential()

bool CBlobRecord::IsConfidential ( ) const

Definition at line 373 of file blob_record.cpp.

References m_HupDate.

Referenced by CPSGS_CassBlobBase::x_IsAuthorized().

◆ IsDataEqual()

bool CBlobRecord::IsDataEqual ( CBlobRecord const blob) const

Definition at line 258 of file blob_record.cpp.

References data, m_BlobChunks, min(), and ncbi::grid::netcache::search::fields::size.

◆ NoData()

bool CBlobRecord::NoData ( ) const

Definition at line 231 of file blob_record.cpp.

References m_BlobChunks, and m_Size.

◆ operator=() [1/2]

CBlobRecord& CBlobRecord::operator= ( CBlobRecord &&  )
default

◆ operator=() [2/2]

CBlobRecord& CBlobRecord::operator= ( CBlobRecord const )
default

◆ ResetNChunks()

CBlobRecord & CBlobRecord::ResetNChunks ( )

Definition at line 152 of file blob_record.cpp.

References m_BlobChunks, and m_NChunks.

◆ SetBigBlobSchema()

CBlobRecord & CBlobRecord::SetBigBlobSchema ( bool  value)

Definition at line 200 of file blob_record.cpp.

References eBigBlobSchema, SetFlag(), and rapidjson::value.

◆ SetClass()

CBlobRecord & CBlobRecord::SetClass ( int16_t  value)

Definition at line 164 of file blob_record.cpp.

References m_Class, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetDateAsn1()

CBlobRecord & CBlobRecord::SetDateAsn1 ( TTimestamp  value)

Definition at line 94 of file blob_record.cpp.

References m_DateAsn1, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetDead()

CBlobRecord & CBlobRecord::SetDead ( bool  value)

Definition at line 194 of file blob_record.cpp.

References eDead, SetFlag(), and rapidjson::value.

Referenced by s_SetBlobState().

◆ SetDiv()

CBlobRecord & CBlobRecord::SetDiv ( string  value)

Definition at line 107 of file blob_record.cpp.

References m_Div, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetFlag()

CBlobRecord & CBlobRecord::SetFlag ( bool  set_flag,
EBlobFlags  flag_value 
)
private

Definition at line 299 of file blob_record.cpp.

References m_Flags.

Referenced by SetBigBlobSchema(), SetDead(), SetGzip(), SetNot4Gbu(), SetSuppress(), and SetWithdrawn().

◆ SetFlags()

CBlobRecord & CBlobRecord::SetFlags ( TBlobFlagBase  value)

Definition at line 76 of file blob_record.cpp.

References m_Flags, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetGzip()

CBlobRecord & CBlobRecord::SetGzip ( bool  value)

Definition at line 170 of file blob_record.cpp.

References eGzip, SetFlag(), and rapidjson::value.

Referenced by s_SetBlobDataProps().

◆ SetHupDate()

CBlobRecord & CBlobRecord::SetHupDate ( TTimestamp  value)

Definition at line 100 of file blob_record.cpp.

References m_HupDate, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetId2Info() [1/2]

CBlobRecord & CBlobRecord::SetId2Info ( int16_t  sat,
int32_t  info,
int32_t  chunks,
int32_t  version = 0 
)

Definition at line 119 of file blob_record.cpp.

References info, m_Id2Info, and dtl::version.

◆ SetId2Info() [2/2]

CBlobRecord & CBlobRecord::SetId2Info ( string const value)

◆ SetKey()

CBlobRecord & CBlobRecord::SetKey ( TSatKey  value)

Definition at line 64 of file blob_record.cpp.

References m_SatKey, and rapidjson::value.

◆ SetModified()

CBlobRecord & CBlobRecord::SetModified ( TTimestamp  value)

Definition at line 70 of file blob_record.cpp.

References m_Modified, and rapidjson::value.

Referenced by s_SetBlobVersion(), and CPSGS_CDDProcessor::x_SendAnnot().

◆ SetNChunks()

CBlobRecord & CBlobRecord::SetNChunks ( int32_t  value)

◆ SetNot4Gbu()

CBlobRecord & CBlobRecord::SetNot4Gbu ( bool  value)

Definition at line 176 of file blob_record.cpp.

References eNot4Gbu, SetFlag(), and rapidjson::value.

◆ SetOwner()

CBlobRecord & CBlobRecord::SetOwner ( int32_t  value)

Definition at line 158 of file blob_record.cpp.

References m_Owner, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetSize()

CBlobRecord & CBlobRecord::SetSize ( TSize  value)

Definition at line 82 of file blob_record.cpp.

References m_Size, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetSizeUnpacked()

CBlobRecord & CBlobRecord::SetSizeUnpacked ( TSize  value)

Definition at line 88 of file blob_record.cpp.

References m_SizeUnpacked, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetSuppress()

CBlobRecord & CBlobRecord::SetSuppress ( bool  value)

Definition at line 182 of file blob_record.cpp.

References eSuppress, SetFlag(), and rapidjson::value.

Referenced by s_SetBlobState().

◆ SetUserName()

CBlobRecord & CBlobRecord::SetUserName ( string  value)

Definition at line 140 of file blob_record.cpp.

References m_UserName, and rapidjson::value.

Referenced by CPubseqGatewayCacheBlobProp::x_ExtractRecord().

◆ SetWithdrawn()

CBlobRecord & CBlobRecord::SetWithdrawn ( bool  value)

Definition at line 188 of file blob_record.cpp.

References eWithdrawn, SetFlag(), and rapidjson::value.

Referenced by s_SetBlobState().

◆ ToString()

string CBlobRecord::ToString ( void  ) const

◆ VerifyBlobSize()

void CBlobRecord::VerifyBlobSize ( ) const

Member Data Documentation

◆ m_BlobChunks

vector<TBlobChunk> CBlobRecord::m_BlobChunks
private

◆ m_Class

int16_t CBlobRecord::m_Class
private

Definition at line 154 of file blob_record.hpp.

Referenced by GetClass(), SetClass(), and ToString().

◆ m_DateAsn1

TTimestamp CBlobRecord::m_DateAsn1
private

Definition at line 143 of file blob_record.hpp.

Referenced by GetDateAsn1(), SetDateAsn1(), and ToString().

◆ m_Div

string CBlobRecord::m_Div
private

Definition at line 146 of file blob_record.hpp.

Referenced by GetDiv(), SetDiv(), and ToString().

◆ m_Flags

int64_t CBlobRecord::m_Flags
private

Definition at line 140 of file blob_record.hpp.

Referenced by GetFlag(), GetFlags(), SetFlag(), SetFlags(), and ToString().

◆ m_HupDate

TTimestamp CBlobRecord::m_HupDate
private

Definition at line 144 of file blob_record.hpp.

Referenced by GetHupDate(), IsConfidential(), SetHupDate(), and ToString().

◆ m_Id2Info

string CBlobRecord::m_Id2Info
private

Definition at line 147 of file blob_record.hpp.

Referenced by GetId2Info(), SetId2Info(), and ToString().

◆ m_Modified

TTimestamp CBlobRecord::m_Modified
private

Definition at line 139 of file blob_record.hpp.

Referenced by GetModified(), SetModified(), and ToString().

◆ m_NChunks

int32_t CBlobRecord::m_NChunks
private

◆ m_Owner

int32_t CBlobRecord::m_Owner
private

Definition at line 152 of file blob_record.hpp.

Referenced by GetOwner(), SetOwner(), and ToString().

◆ m_SatKey

TSatKey CBlobRecord::m_SatKey
private

Definition at line 150 of file blob_record.hpp.

Referenced by GetChunk(), GetKey(), SetKey(), ToString(), and VerifyBlobSize().

◆ m_Size

TSize CBlobRecord::m_Size
private

Definition at line 141 of file blob_record.hpp.

Referenced by GetSize(), NoData(), SetSize(), ToString(), and VerifyBlobSize().

◆ m_SizeUnpacked

TSize CBlobRecord::m_SizeUnpacked
private

Definition at line 142 of file blob_record.hpp.

Referenced by GetSizeUnpacked(), SetSizeUnpacked(), and ToString().

◆ m_UserName

string CBlobRecord::m_UserName
private

Definition at line 148 of file blob_record.hpp.

Referenced by GetUserName(), SetUserName(), and ToString().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:52 2024 by modify_doxy.py rev. 669887