Logo
  • Main Page
  • Related Pages
  • Modules
  • Classes
  • Files

mmsconfigqueries.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005-2007 Stefan Schwarzer, Jens Schneider,             *
00003  *                           Matthias Hardt, Guido Madaus                  *
00004  *                                                                         *
00005  *   Copyright (C) 2007-2008 BerLinux Solutions GbR                        *
00006  *                           Stefan Schwarzer & Guido Madaus               *
00007  *                                                                         *
00008  *   Copyright (C) 2009-2013 BerLinux Solutions GmbH                       *
00009  *                                                                         *
00010  *   Authors:                                                              *
00011  *      Stefan Schwarzer   <stefan.schwarzer@diskohq.org>,                 *
00012  *      Matthias Hardt     <matthias.hardt@diskohq.org>,                   *
00013  *      Jens Schneider     <jens.schneider@diskohq.org>,                   *
00014  *      Guido Madaus       <guido.madaus@diskohq.org>,                     *
00015  *      Patrick Helterhoff <patrick.helterhoff@diskohq.org>,               *
00016  *      René Bählkow       <rene.baehlkow@diskohq.org>                     *
00017  *                                                                         *
00018  *   This library is free software; you can redistribute it and/or         *
00019  *   modify it under the terms of the GNU Lesser General Public            *
00020  *   License version 2.1 as published by the Free Software Foundation.     *
00021  *                                                                         *
00022  *   This library is distributed in the hope that it will be useful,       *
00023  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00025  *   Lesser General Public License for more details.                       *
00026  *                                                                         *
00027  *   You should have received a copy of the GNU Lesser General Public      *
00028  *   License along with this library; if not, write to the                 *
00029  *   Free Software Foundation, Inc.,                                       *
00030  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
00031  **************************************************************************/
00032 
00033 #ifndef MMSCONFIGQUERIES_H_
00034 #define MMSCONFIGQUERIES_H_
00035 
00036 /****************************************************************************************/
00037 /*                                                                                      */
00038 /* All queries used in the PluginDAO class                                              */
00039 /*                                                                                      */
00040 /****************************************************************************************/
00041 #define PLUGINDAO_SAVE(ID, Name, Title, Description, Filename, Path, Active, Icon, Icon_s, Icon_small, Icon_small_s, CategoryID, Orderpos, Version) \
00042         "insert into Plugins(PluginTypeID,PluginName,PluginTitle,PluginDescription,Filename,PluginPath,Active,Icon,SelectedIcon,SmallIcon,SmallSelectedIcon,CategoryID,Orderpos,Version) values('" \
00043         + ID + "','"          \
00044         + Name + "','"        \
00045         + Title + "','"       \
00046         + Description + "','" \
00047         + Filename + "','"    \
00048         + Path + "','"        \
00049         + Active + "','"      \
00050         + Icon + "','"        \
00051         + Icon_s + "','"      \
00052         + Icon_small + "','"  \
00053         + Icon_small_s + "','"  \
00054         + CategoryID + "','"  \
00055         + Orderpos + "','" \
00056         + Version + "')"
00057 
00058 #define PLUGINDAO_UPDATE(Filename, Active, Description, CategoryID, Orderpos, ID, Version) \
00059         "update Plugins set Filename='" + Filename + "',"   \
00060         + "Active='" + Active + "',"                        \
00061         + "PluginDescription='" + Description + "', " +      \
00062         + "CategoryID='" + CategoryID + "', " +      \
00063         + "Orderpos='" + Orderpos + "', " +      \
00064         + "Version='" + Version + "' " + \
00065         "where ID = '" + ID + "'"
00066 
00067 #define PLUGINDAO_FIND_ALL_ACTIVE_PLUGINS \
00068         "select Plug.*, Cat.CategoryName, PlugType.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes PlugType ON PlugType.ID = Plug.PluginTypeID where Plug.Active = 'Y' and Plug.ID != -2"
00069 
00070 #define PLUGINDAO_FIND_ALL_PLUGINS   \
00071         "select Plug.*, Cat.CategoryName, PlugType.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes PlugType ON PlugType.ID = Plug.PluginTypeID where Plug.ID != -2"
00072 
00073 #define PLUGINDAO_F_PLUGIN_BY_NAME(Name) \
00074         "select Plug.*, Cat.CategoryName, PlugType.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes PlugType ON PlugType.ID = Plug.PluginTypeID where Plug.PluginName = '" + Name + "';"
00075 
00076 #define PLUGINDAO_F_PLUGIN_BY_ID(ID) \
00077         "select Plug.*, Cat.CategoryName, PlugType.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes PlugType ON PlugType.ID = Plug.PluginTypeID where Plug.ID = " + ID
00078 
00079 #define PLUGINDAO_F_ACTIVE_PLUGINS_BY_CATEGORY(CATEGORY) \
00080         "select Plug.*,Cat.CategoryName,Types.PluginTypename from Plugins Plug left join Category Cat ON Cat.CategoryName ='" + CATEGORY + "' left join PluginTypes Types ON Types.ID = Plug.PluginTypeID WHERE Plug.CategoryID = Cat.ID and Plug.Active = 'Y'"
00081 
00082 #define PLUGINDAO_F_ALL_PLUGINS_BY_CATEGORY(CATEGORY) \
00083         "select Plug.*,Cat.CategoryName,Types.PluginTypename from Plugins Plug left join Category Cat ON Cat.CategoryName ='" + CATEGORY + "' left join PluginTypes Types ON Types.ID = Plug.PluginTypeID WHERE Plug.CategoryID = Cat.ID"
00084 
00085 #define PLUGINDAO_F_ACTIVE_PLUGINS_BY_TYPE(TYPE) \
00086         "select Plug.*,Cat.CategoryName,Types.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID  = Plug.CategoryID left join PluginTypes Types ON Types.ID = Plug.PluginTypeID where Types.PluginTypeName = '" + TYPE + "' and Plug.Active = 'Y'"
00087 
00088 #define PLUGINDAO_F_ALL_PLUGINS_BY_TYPE(TYPE) \
00089         "select Plug.*,Cat.CategoryName,Types.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID  = Plug.CategoryID left join PluginTypes Types ON Types.ID = Plug.PluginTypeID where Types.PluginTypeName = '" + TYPE + "'"
00090 
00091 /****************************************************************************************/
00092 /*                                                                                      */
00093 /* All queries used in the PluginPropertiesDAO class                                    */
00094 /*                                                                                      */
00095 /****************************************************************************************/
00096 #define PLUGINPROPERTYDAO_FIND_ALL_PLUGIN_PROPERTIES_BY_PLUGIN(ID) \
00097         "select * from PluginProperties where PluginID = " + ID
00098 
00099 #endif /*MMSCONFIGQUERIES_H_*/

Generated by doxygen