ent_load_cmd.hpp

См. документацию.
00001 /*
00002 
00003 Copyright (c) 2002-2005, Yauheni Akhotnikau
00004 All rights reserved.
00005 
00006 Redistribution and use in source and binary forms, with or without
00007 modification, are permitted provided that the following conditions are met:
00008 
00009 - Redistributions of source code must retain the above copyright notice, this
00010 list of conditions and the following disclaimer.
00011 
00012 - Redistributions in binary form must reproduce the above copyright notice, this
00013 list of conditions and the following disclaimer in the documentation and/or
00014 other materials provided with the distribution.
00015 
00016 - The name of the author may not be used to endorse or promote products derived
00017 from this software without specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
00020 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00021 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
00022 EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00023 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
00024 OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
00027 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
00028 OF SUCH DAMAGE.
00029 
00030 */
00031 
00037 #if !defined( _OESS_1__DB__SITE__IMPL__ENT_LOAD_CMD_HPP_ )
00038 #define _OESS_1__DB__SITE__IMPL__ENT_LOAD_CMD_HPP_
00039 
00040 #include <oess_1/defs/h/ent_id.hpp>
00041 
00042 #include <oess_1/db/site/impl/h/request.hpp>
00043 #include <oess_1/db/site/impl/h/response.hpp>
00044 
00045 namespace oess_1 {
00046 
00047 namespace db {
00048 
00049 namespace site {
00050 
00051 namespace impl {
00052 
00053 //FIX ME: вполне возможно, что в запросе ent_load нужно
00054 //сообщать имя типа сущности в клиентском приложении. Тогда
00055 //на стороне сервера можно будет проверять возможность
00056 //загрузки сущности.
00057 //Это может быть важно при блокировке сущностей во время
00058 //транзакции.
00059 
00060 //
00061 // ent_load_cmd_t
00062 //
00063 
00067 class ent_load_cmd_t :
00068   public request_t
00069 {
00070   OESS_SERIALIZER( ent_load_cmd_t )
00071   public :
00072     ent_load_cmd_t();
00073     ent_load_cmd_t(
00075       const std::string & client_id,
00077       const std::string & db_logic_name,
00079       const oess_1::ent_id_t & ent_id );
00080     virtual ~ent_load_cmd_t();
00081 
00082     enum {
00084       e_id = 500
00085     };
00086 
00087     virtual oess_1::uint_t
00088     query_req_id() const;
00089 
00091     const std::string &
00092     query_db_logic_name() const;
00093 
00095     const oess_1::ent_id_t &
00096     query_ent_id() const;
00097 
00098   private :
00100     std::string m_db_logic_name;
00102     oess_1::ent_id_t  m_ent_id;
00103 };
00104 
00105 //
00106 // ent_load_cmd_result_t
00107 //
00108 
00121 class ent_load_cmd_result_t :
00122   public response_t
00123 {
00124   OESS_SERIALIZER( ent_load_cmd_result_t )
00125   public :
00126     ent_load_cmd_result_t();
00128     ent_load_cmd_result_t(
00130       const result_t & result );
00131     virtual ~ent_load_cmd_result_t();
00132 
00133     enum {
00135       e_id = 501
00136     };
00137 
00138     virtual oess_1::uint_t
00139     query_resp_id() const;
00140 
00142     std::string &
00143     query_ent_value();
00144 
00146     const std::string &
00147     query_ent_value() const;
00148 
00149   private :
00151     std::string m_ent_value;
00152 };
00153 
00154 } /* namespace impl */
00155 
00156 } /* namespace site */
00157 
00158 } /* namespace db */
00159 
00160 } /* namespace oess_1 */
00161 
00162 #endif

Документация по ObjESSty. Последние изменения: Fri Oct 13 18:35:35 2006. Создано системой  doxygen 1.4.7
Hosted by uCoz