Changeset 16580
- Timestamp:
- 06/11/08 19:04:46 (4 months ago)
- Files:
-
- trunk/midgard/core/midgard/src/midgard_object.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midgard/core/midgard/src/midgard_object.c
r16578 r16580 564 564 * 565 565 * Cases to return %FALSE: 566 * - given guid already exists in database ( MGD_ERR_DUPLICATE ) 567 * - given guid is invalid ( MGD_ERR_INVALID_PROPERTY_VALUE ) 568 * - object has already set guid property ( MGD_ERR_INVALID_PROPERTY_VALUE ) 566 * <itemizedlist> 567 * <listitem><para> 568 * given guid already exists in database ( MGD_ERR_DUPLICATE ) 569 * </para></listitem> 570 * <listitem><para> 571 * given guid is invalid ( MGD_ERR_INVALID_PROPERTY_VALUE ) 572 * </para></listitem> 573 * <listitem><para> 574 * object has already set guid property ( MGD_ERR_INVALID_PROPERTY_VALUE ) 575 * </para></listitem> 576 * </itemizedlist> 569 577 * 570 578 * Returns: %TRUE on success, %FALSE otherwise … … 793 801 * 794 802 * Internally such metadata properties are set (overwritten): 795 * - revisor 796 * - revision ( increased by one ) 797 * - revised 803 * <itemizedlist> 804 * <listitem><para> 805 * revisor 806 * </para></listitem> 807 * <listitem><para> 808 * revision ( increased by one ) 809 * </para></listitem> 810 * <listitem><para> 811 * revised 812 * </para></listitem> 813 * </itemizedlist> 798 814 * 799 815 * Cases to return %FALSE: 800 * - Property registered with #MGD_TYPE_GUID doesn't hold valid guid ( MGD_ERR_INVALID_PROPERTY_VALUE ) 801 * - Object's class is registered with tree facilities and there is already such object in midgard tree ( MGD_ERR_DUPLICATE ) 802 * - Quota is activated and its limit is reached ( MGD_ERR_QUOTA ) 803 * - Unspecified internal error ( MGD_ERR_INTERNAL ) 816 * <itemizedlist> 817 * <listitem><para> 818 * Property registered with #MGD_TYPE_GUID doesn't hold valid guid ( MGD_ERR_INVALID_PROPERTY_VALUE ) 819 * </para></listitem> 820 * <listitem><para> 821 * Object's class is registered with tree facilities and there is already such object in midgard tree ( MGD_ERR_DUPLICATE ) 822 * </para></listitem> 823 * <listitem><para> 824 * Quota is activated and its limit is reached ( MGD_ERR_QUOTA ) 825 * </para></listitem> 826 * <listitem><para> 827 * Unspecified internal error ( MGD_ERR_INTERNAL ) 828 * </para></listitem> 829 * </itemizedlist> 804 830 * 805 831 * Returns: %TRUE if object's record(s) is successfully updated, %FALSE otherwise. … … 1152 1178 * 1153 1179 * Internally such properties are set (overwritten): 1154 * - sitegroup 1155 * - guid (if not set by root) 1156 * - id (if set as primary property) 1157 * 1158 * Metadata properties: 1159 * - creator 1160 * - created 1161 * - revisor 1162 * - revised 1163 * - revision 1164 * - published ( set only, if not defined by user ) 1180 * <itemizedlist> 1181 * <listitem><para> 1182 * sitegroup 1183 * </para></listitem> 1184 * <listitem><para> 1185 * guid (if not set by root) 1186 * </para></listitem> 1187 * <listitem><para> 1188 * id (if set as primary property) 1189 * </para></listitem> 1190 * </itemizedlist> 1191 * 1192 * Metadata overwritten properties: 1193 * <itemizedlist> 1194 * <listitem><para> 1195 * creator 1196 * </para></listitem> 1197 * <listitem><para> 1198 * created 1199 * </para></listitem> 1200 * <listitem><para> 1201 * revisor 1202 * </para></listitem> 1203 * <listitem><para> 1204 * revised 1205 * </para></listitem> 1206 * <listitem><para> 1207 * revision 1208 * </para></listitem> 1209 * <listitem><para> 1210 * published ( set only, if not defined by user ) 1211 * </para></listitem> 1212 * </itemizedlist> 1165 1213 * 1166 1214 * Cases to return %FALSE: 1167 * - Property registered with #MGD_TYPE_GUID doesn't hold valid guid ( MGD_ERR_INVALID_PROPERTY_VALUE ) 1168 * - Object's class is registered with tree facilities and there is already such object in midgard tree ( MGD_ERR_DUPLICATE ) 1169 * - Quota is activated and its limit is reached ( MGD_ERR_QUOTA ) 1170 * - Unspecified internal error ( MGD_ERR_INTERNAL ) 1215 * <itemizedlist> 1216 * <listitem><para> 1217 * Property registered with #MGD_TYPE_GUID doesn't hold valid guid ( MGD_ERR_INVALID_PROPERTY_VALUE ) 1218 * </para></listitem> 1219 * <listitem><para> 1220 * Object's class is registered with tree facilities and there is already such object in midgard tree ( MGD_ERR_DUPLICATE ) 1221 * </para></listitem> 1222 * <listitem><para> 1223 * Quota is activated and its limit is reached ( MGD_ERR_QUOTA ) 1224 * </para></listitem> 1225 * <listitem><para> 1226 * Unspecified internal error ( MGD_ERR_INTERNAL ) 1227 * </para></listitem> 1228 * </itemizedlist> 1171 1229 * 1172 1230 * Returns: %TRUE on success, %FALSE otherwise … … 1259 1317 * 1260 1318 * Cases to return %FALSE: 1261 * - There's no 'id' primary property registered for object's class ( MGD_ERR_INTERNAL ) 1262 * - Object's record can not be fetched from database ( MGD_ERR_NOT_EXISTS ) 1263 * - unspecified internal error ( MGD_ERR_INTERNAL ) 1319 * <itemizedlist> 1320 * <listitem><para> 1321 * There's no 'id' primary property registered for object's class ( MGD_ERR_INTERNAL ) 1322 * </para></listitem> 1323 * <listitem><para> 1324 * Object's record can not be fetched from database ( MGD_ERR_NOT_EXISTS ) 1325 * </para></listitem> 1326 * <listitem><para> 1327 * unspecified internal error ( MGD_ERR_INTERNAL ) 1328 * </para></listitem> 1329 * </itemizedlist> 1264 1330 * 1265 1331 * Returns: %TRUE if object is successfully fetched from database, %FALSE otherwise. … … 1749 1815 * 1750 1816 * Cases to return %NULL: 1751 * - @value holds string but it's not a valid guid 1752 * - @value holds valid id or guid but object doesn't exists in database ( MGD_ERR_NOT_EXISTS ) 1753 * - more than one object identified by particular id or guid returned 1817 * <itemizedlist> 1818 * <listitem><para> 1819 * @value holds string but it's not a valid guid 1820 * </para></listitem> 1821 * <listitem><para> 1822 * @value holds valid id or guid but object doesn't exists in database ( MGD_ERR_NOT_EXISTS ) 1823 * </para></listitem> 1824 * <listitem><para> 1825 * more than one object identified by particular id or guid returned 1754 1826 * ( case possible if logged in user is root ) ( MGD_ERR_SITEGROUP_VIOLATION ) 1755 * - unspecified internal error ( MGD_ERR_INTERNAL ) 1827 * </para></listitem> 1828 * <listitem><para> 1829 * unspecified internal error ( MGD_ERR_INTERNAL ) 1830 * </para></listitem> 1831 * </itemizedlist> 1756 1832 * 1757 1833 * Returns: New #MgdObject object or %NULL on failure … … 2029 2105 * 2030 2106 * Cases to return %FALSE: 2031 * - Object's record can not be fetched from database ( MGD_ERR_NOT_EXISTS ) 2032 * - unspecified internal error ( MGD_ERR_INTERNAL ) 2107 * <itemizedlist> 2108 * <listitem><para> 2109 * Object's record can not be fetched from database ( MGD_ERR_NOT_EXISTS ) 2110 * </para></listitem> 2111 * <listitem><para> 2112 * unspecified internal error ( MGD_ERR_INTERNAL ) 2113 * </para></listitem> 2114 * </itemizedlist> 2033 2115 * 2034 2116 * Retruns: %TRUE if object is successfully fetched from database, %FALSE otherwise. … … 2104 2186 * Use #midgard_object_purge if you need to purge object's data from database. 2105 2187 * 2106 * FALSE is returned in such cases: 2107 * 2108 * - Object's has no storage defined ( MGD_ERR_OBJECT_NO_STORAGE ) 2109 * - Object's property guid is empty ( MGD_ERR_INVALID_PROPERTY_VALUE ) 2110 * - Unspecified internal error ( MGD_ERR_INTERNAL ) 2188 * Cases to return %FALSE: 2189 * <itemizedlist> 2190 * <listitem><para> 2191 * Object's has no storage defined ( MGD_ERR_OBJECT_NO_STORAGE ) 2192 * </para></listitem> 2193 * <listitem><para> 2194 * Object's property guid is empty ( MGD_ERR_INVALID_PROPERTY_VALUE ) 2195 * </para></listitem> 2196 * <listitem><para> 2197 * Unspecified internal error ( MGD_ERR_INTERNAL ) 2198 * </para></listitem> 2199 * </itemizedlist> 2111 2200 * 2112 2201 * Returns: %TRUE if object is successfully deleted from database, %FALSE otherwise. … … 2275 2364 * 2276 2365 * Cases to return %FALSE: 2277 * - Object has no storage defined ( MGD_ERR_OBJECT_NO_STORAGE ) 2278 * - Object's property guid is empty ( MGD_ERR_INVALID_PROPERTY_VALUE ) 2279 * - No record has been deleted from database ( MGD_ERR_NOT_EXISTS ) 2280 * - Unspecified internal error ( MGD_ERR_INTERNAL ) 2366 * <itemizedlist> 2367 * <listitem><para> 2368 * Object has no storage defined ( MGD_ERR_OBJECT_NO_STORAGE ) 2369 * </para></listitem> 2370 * <listitem><para> 2371 * Object's property guid is empty ( MGD_ERR_INVALID_PROPERTY_VALUE ) 2372 * </para></listitem> 2373 * <listitem><para> 2374 * No record has been deleted from database ( MGD_ERR_NOT_EXISTS ) 2375 * </para></listitem> 2376 * <listitem><para> 2377 * Unspecified internal error ( MGD_ERR_INTERNAL ) 2378 * </para></listitem> 2379 * </itemizedlist> 2380 2281 2381 * 2282 2382 * Returns: %TRUE if object has been succesfully purged from database, %FALSE otherwise. … … 2661 2761 * 2662 2762 * Cases to return %NULL: 2663 * - object is not multilang ( MGD_ERR_USER_DATA ) 2664 * - object has invalid guid ( MGD_ERR_INVALID_PROPERTY ) 2763 * <itemizedlist> 2764 * <listitem><para> 2765 * object is not multilang ( MGD_ERR_USER_DATA ) 2766 * </para></listitem> 2767 * <listitem><para> 2768 * object has invalid guid ( MGD_ERR_INVALID_PROPERTY ) 2769 * </para></listitem> 2770 * </itemizedlist> 2665 2771 * 2666 2772 * Returns: newly allocated, %NULL terminated array of #MgdObject objects or %NULL
