Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _DATABASE_FILE_PATH_H_
00038 #define _DATABASE_FILE_PATH_H_
00039
00040 #include <database_interface/db_class.h>
00041
00042
00043 namespace household_objects_database {
00044
00045 class DatabaseFilePath : public database_interface::DBClass
00046 {
00047 private:
00048
00049 public:
00050
00051 database_interface::DBField<int> id_;
00052 database_interface::DBField<int> original_model_id_;
00053 database_interface::DBField<std::string> file_type_;
00054 database_interface::DBField<std::string> file_path_;
00055
00056 DatabaseFilePath() :
00057 id_(database_interface::DBFieldBase::TEXT, this, "file_path_id", "file_path", true),
00058 original_model_id_(database_interface::DBFieldBase::TEXT, this, "original_model_id", "file_path", true),
00059 file_type_(database_interface::DBFieldBase::TEXT, this, "file_type", "file_path", true),
00060 file_path_(database_interface::DBFieldBase::TEXT, this, "file_path_path", "file_path", true)
00061 {
00062 primary_key_field_ = &id_;
00063 fields_.push_back(&original_model_id_);
00064 fields_.push_back(&file_type_);
00065 fields_.push_back(&file_path_);
00066 setAllFieldsWriteToDatabase(true);
00067 setAllFieldsReadFromDatabase(true);
00068 id_.setWriteToDatabase(false);
00069 id_.setSequenceName("file_path_sequence");
00070
00071 }
00072 ~DatabaseFilePath(){}
00073 };
00074
00075 class HandFilePath : public database_interface::DBClass
00076 {
00077 private:
00078
00079 public:
00080
00081 database_interface::DBField<std::string> hand_name_;
00082 database_interface::DBField<std::string> file_path_;
00083
00084 HandFilePath() :
00085 hand_name_(database_interface::DBFieldBase::TEXT, this, "hand_name", "hand", true),
00086 file_path_(database_interface::DBFieldBase::TEXT, this, "hand_relative_path", "hand", true)
00087 {
00088 primary_key_field_ = &hand_name_;
00089 fields_.push_back(&file_path_);
00090 setAllFieldsWriteToDatabase(true);
00091 setAllFieldsReadFromDatabase(true);
00092 hand_name_.setWriteToDatabase(false);
00093 }
00094 ~HandFilePath(){}
00095 };
00096
00097
00098 }
00099 #endif