Oracle ODB Runtime Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
polymorphic-object-result.hxx
Go to the documentation of this file.
1 // file : odb/oracle/polymorphic-object-result.hxx
2 // copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
3 // license : ODB NCUEL; see accompanying LICENSE file
4 
5 #ifndef ODB_ORACLE_POLYMORPHIC_OBJECT_RESULT_HXX
6 #define ODB_ORACLE_POLYMORPHIC_OBJECT_RESULT_HXX
7 
8 #include <odb/pre.hxx>
9 
10 #include <cstddef> // std::size_t
11 
12 #include <odb/schema-version.hxx>
14 
15 #include <odb/details/shared-ptr.hxx>
16 
17 #include <odb/oracle/version.hxx>
18 #include <odb/oracle/forward.hxx> // query_base
19 #include <odb/oracle/statement.hxx>
21 
22 namespace odb
23 {
24  namespace oracle
25  {
26  template <typename T>
29  {
30  public:
32 
33  typedef typename base_type::id_type id_type;
36 
39 
40  typedef typename base_type::root_type root_type;
42 
44 
45  typedef typename object_traits::image_type image_type;
46  typedef typename object_traits::statements_type statements_type;
47 
48  virtual
50 
52  details::shared_ptr<select_statement>,
55 
56  virtual void
57  load (object_type*, bool fetch);
58 
59  virtual id_type
60  load_id ();
61 
62  virtual discriminator_type
64 
65  virtual void
66  next ();
67 
68  virtual void
69  cache ();
70 
71  virtual std::size_t
72  size ();
73 
74  virtual void
75  invalidate ();
76 
77  using base_type::current;
78 
79  private:
81 
82  static void
83  change_callback (void* context, binding*);
84 
85  private:
86  details::shared_ptr<select_statement> statement_;
87  statements_type& statements_;
89  bool use_copy_;
90  image_type* image_copy_;
91  };
92  }
93 }
94 
95 #include <odb/oracle/polymorphic-object-result.txx>
96 
97 #include <odb/post.hxx>
98 
99 #endif // ODB_ORACLE_POLYMORPHIC_OBJECT_RESULT_HXX
virtual void load(object_type *, bool fetch)
polymorphic_object_result_impl(const query_base &, details::shared_ptr< select_statement >, statements_type &, const schema_version_migration *)
base_type::object_type object_type
Definition: polymorphic-object-result.hxx:34
Definition: query.hxx:165
object_traits_impl< object_type, id_oracle > object_traits
Definition: polymorphic-object-result.hxx:37
odb::polymorphic_object_result_impl< T > base_type
Definition: polymorphic-object-result.hxx:31
object_traits::pointer_type pointer_type
base_type::root_type root_type
Definition: polymorphic-object-result.hxx:40
object_traits::root_type root_type
object_traits::statements_type statements_type
Definition: polymorphic-object-result.hxx:46
Definition: binding.hxx:21
base_type::pointer_type pointer_type
Definition: polymorphic-object-result.hxx:35
object_traits::image_type image_type
Definition: polymorphic-object-result.hxx:45
base_type::pointer_traits pointer_traits
Definition: polymorphic-object-result.hxx:38
object_traits_impl< root_type, id_oracle > root_traits
Definition: polymorphic-object-result.hxx:43
root_traits::discriminator_type discriminator_type
base_type::id_type id_type
Definition: polymorphic-object-result.hxx:33
Definition: polymorphic-object-result.hxx:27
Definition: oracle-types.hxx:131
virtual discriminator_type load_discriminator()
base_type::discriminator_type discriminator_type
Definition: polymorphic-object-result.hxx:41