#include <RelationalMapping.h>
Public Member Functions | |
IRelationalMapping * | newProcessor (const Reflex::Type &attributeType, bool blobStreaming=false) |
RelationalMappingFactory (TableRegister &tableRegister) | |
virtual | ~RelationalMappingFactory () |
Private Attributes | |
TableRegister & | m_tableRegister |
Definition at line 35 of file RelationalMapping.h.
ora::RelationalMappingFactory::RelationalMappingFactory | ( | TableRegister & | tableRegister | ) | [explicit] |
Definition at line 96 of file RelationalMapping.cc.
: m_tableRegister( tableRegister ){ }
ora::RelationalMappingFactory::~RelationalMappingFactory | ( | ) | [virtual] |
Definition at line 100 of file RelationalMapping.cc.
{ }
ora::IRelationalMapping * ora::RelationalMappingFactory::newProcessor | ( | const Reflex::Type & | attributeType, |
bool | blobStreaming = false |
||
) |
Definition at line 103 of file RelationalMapping.cc.
References ora::ClassUtils::isTypeContainer(), ora::ClassUtils::isTypeOraPointer(), ora::ClassUtils::isTypePrimitive(), ora::ClassUtils::isTypeUniqueReference(), and ora::ClassUtils::resolvedType().
Referenced by ora::MappingGenerator::createNewDependentMapping(), ora::MappingGenerator::createNewMapping(), ora::ArrayMapping::process(), ora::OraPtrMapping::process(), ora::ObjectMapping::process(), ora::CArrayMapping::process(), and ora::processBaseClasses().
{ if( blobStreaming ){ return new BlobMapping( attributeType, m_tableRegister ); } Reflex::Type resType = ClassUtils::resolvedType( attributeType ); if ( ora::ClassUtils::isTypePrimitive(resType) ) { return new PrimitiveMapping( attributeType, m_tableRegister ); } else if ( resType.IsArray() ){ return new CArrayMapping( attributeType, m_tableRegister ); } else if ( ora::ClassUtils::isTypeContainer( resType ) ) { return new ArrayMapping( attributeType, m_tableRegister ); } else if ( resType.IsPointer() || resType.IsReference() ){ return new EmptyMapping(); } else if ( ora::ClassUtils::isTypeOraPointer( resType )){ return new OraPtrMapping( attributeType, m_tableRegister ); } else if ( ora::ClassUtils::isTypeUniqueReference( resType )){ return new UniqueReferenceMapping( attributeType, m_tableRegister ); } else if ( resType.TypeInfo() == typeid(ora::Reference) || resType.HasBase( Reflex::Type::ByTypeInfo( typeid(ora::Reference) ) ) ){ return new OraReferenceMapping( attributeType, m_tableRegister ); } else if ( resType.TypeInfo() == typeid(ora::NamedReference) || resType.HasBase( Reflex::Type::ByTypeInfo( typeid(ora::NamedReference) ) ) ){ return new NamedRefMapping( attributeType, m_tableRegister ); } else { // embeddedobject return new ObjectMapping( attributeType, m_tableRegister ); } }
Definition at line 44 of file RelationalMapping.h.