HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey > Class Template Reference

#include <UT_ORMField.h>

+ Inheritance diagram for UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >:

Public Types

using model_t = typename ForeignKey::model_t
 
using field_t = ForeignKey
 
using id_t = typename ForeignKey::foreign_key_t
 

Public Member Functions

 UT_ORMForeignKeyFieldAdapter (ForeignKey Cls::*member_ptr)
 
UT_ORMColumn::Type sqlType () const override
 
void bind (const void *obj, UT_SqlStatement &stmt, int bind_index, UT_ErrorCode &ec) override
 
void load (void *obj, UT_SqlStatement &stmt, int index, UT_ErrorCode &ec) override
 
void onDelete (void *obj, UT_ORMColumn::OnDelete ondelete, UT_ErrorCode &ec) override
 
bool isSame (const void *obj_left, const void *obj_right, UT_ErrorCode &ec) const finaloverride
 
- Public Member Functions inherited from UT_IORMFieldAdapter
virtual ~UT_IORMFieldAdapter ()=default
 
 UT_IORMFieldAdapter (const UT_IORMFieldAdapter &)=default
 
UT_IORMFieldAdapteroperator= (const UT_IORMFieldAdapter &)=default
 
template<typename Cls , typename MemberT >
void setValue (Cls &obj, const MemberT &member_value, UT_ErrorCode &ec)
 
template<typename Cls , typename MemberT >
void getValue (const Cls &obj, MemberT &member_value, UT_ErrorCode &ec)
 

Static Public Member Functions

static UT_ORMFieldColumn createColumn (const UT_ORMModelMeta &meta, const UT_StringHolder &name, ForeignKey Cls::*member_ptr, unsigned props, UT_ORMColumn::OnDelete ondelete, const UT_StringHolder &related_name=UT_StringHolder::theEmptyString)
 
static void memberSetter (UT_IORMFieldAdapter *me, void *obj, const void *value, UT_ErrorCode &ec)
 
static void memberGetter (UT_IORMFieldAdapter *me, const void *obj, void *value, UT_ErrorCode &ec)
 

Protected Member Functions

ForeignKey & field (void *obj)
 
const ForeignKey & field (const void *obj) const
 
- Protected Member Functions inherited from UT_IORMFieldAdapter
 UT_IORMFieldAdapter (setter_func_t setter, getter_func_t getter)
 

Additional Inherited Members

- Protected Types inherited from UT_IORMFieldAdapter
typedef void(* setter_func_t )(UT_IORMFieldAdapter *adapter, void *obj, const void *value, UT_ErrorCode &ec)
 
typedef void(* getter_func_t )(UT_IORMFieldAdapter *adapter, const void *obj, void *value, UT_ErrorCode &ec)
 
- Protected Attributes inherited from UT_IORMFieldAdapter
setter_func_t mySetter
 
getter_func_t myGetter
 

Detailed Description

template<typename Cls, typename ForeignKey>
class UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >

Definition at line 379 of file UT_ORMField.h.

Member Typedef Documentation

template<typename Cls , typename ForeignKey >
using UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::field_t = ForeignKey

Definition at line 383 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
using UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::id_t = typename ForeignKey::foreign_key_t

Definition at line 384 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
using UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::model_t = typename ForeignKey::model_t

Definition at line 382 of file UT_ORMField.h.

Constructor & Destructor Documentation

template<typename Cls , typename ForeignKey >
UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::UT_ORMForeignKeyFieldAdapter ( ForeignKey Cls::*  member_ptr)
inline

Definition at line 386 of file UT_ORMField.h.

Member Function Documentation

template<typename Cls , typename ForeignKey >
void UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::bind ( const void obj,
UT_SqlStatement stmt,
int  bind_index,
UT_ErrorCode ec 
)
inlineoverridevirtual

Implements UT_IORMFieldAdapter.

Definition at line 440 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
static UT_ORMFieldColumn UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::createColumn ( const UT_ORMModelMeta meta,
const UT_StringHolder name,
ForeignKey Cls::*  member_ptr,
unsigned  props,
UT_ORMColumn::OnDelete  ondelete,
const UT_StringHolder related_name = UT_StringHolder::theEmptyString 
)
inlinestatic

Definition at line 392 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
ForeignKey& UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::field ( void obj)
inlineprotected

Definition at line 473 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
const ForeignKey& UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::field ( const void obj) const
inlineprotected

Definition at line 478 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
bool UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::isSame ( const void obj_left,
const void obj_right,
UT_ErrorCode ec 
) const
inlinefinaloverridevirtual

Implements UT_IORMFieldAdapter.

Definition at line 464 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
void UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::load ( void obj,
UT_SqlStatement stmt,
int  index,
UT_ErrorCode ec 
)
inlineoverridevirtual

Implements UT_IORMFieldAdapter.

Definition at line 449 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
static void UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::memberGetter ( UT_IORMFieldAdapter me,
const void obj,
void value,
UT_ErrorCode ec 
)
inlinestatic

Definition at line 422 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
static void UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::memberSetter ( UT_IORMFieldAdapter me,
void obj,
const void value,
UT_ErrorCode ec 
)
inlinestatic

Definition at line 411 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
void UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::onDelete ( void obj,
UT_ORMColumn::OnDelete  ondelete,
UT_ErrorCode ec 
)
inlineoverridevirtual

Reimplemented from UT_IORMFieldAdapter.

Definition at line 455 of file UT_ORMField.h.

template<typename Cls , typename ForeignKey >
UT_ORMColumn::Type UT_ORMForeignKeyFieldAdapter< Cls, ForeignKey >::sqlType ( ) const
inlineoverridevirtual

Implements UT_IORMFieldAdapter.

Definition at line 436 of file UT_ORMField.h.


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