CMS 3D CMS Logo

Public Member Functions | Private Attributes

ora::RelationalMappingFactory Class Reference

#include <RelationalMapping.h>

List of all members.

Public Member Functions

IRelationalMappingnewProcessor (const Reflex::Type &attributeType, bool blobStreaming=false)
 RelationalMappingFactory (TableRegister &tableRegister)
virtual ~RelationalMappingFactory ()

Private Attributes

TableRegisterm_tableRegister

Detailed Description

Definition at line 35 of file RelationalMapping.h.


Constructor & Destructor Documentation

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.

                                                      {
}

Member Function Documentation

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 );
  } 
}

Member Data Documentation

Definition at line 44 of file RelationalMapping.h.