| Midgard 2.0 Reference Manual | ||||
|---|---|---|---|---|
const gchar* midgard_object_class_get_primary_property (MidgardObjectClass *klass); const gchar* midgard_object_class_get_property_parent (MidgardObjectClass *klass); const gchar* midgard_object_class_get_property_up (MidgardObjectClass *klass); MidgardObjectClass** midgard_object_class_list_children (MidgardObjectClass *klass); gboolean midgard_object_class_is_multilang (MidgardObjectClass *klass); MgdObject* midgard_object_class_get_object_by_guid (MidgardConnection *mgd, const gchar *guid); MgdObject* midgard_object_class_get_object_by_path (MidgardConnection *mgd, const gchar *classname, const gchar *object_path); gboolean midgard_object_class_undelete (MidgardConnection *mgd, const gchar *guid);
const gchar* midgard_object_class_get_primary_property
(MidgardObjectClass *klass);
|
|
Returns : |
const gchar* midgard_object_class_get_property_parent
(MidgardObjectClass *klass);
Returned string is a pointer to object's parent property, and you should not free it. Parent property is a property which holds value of field which points to parent object's identifier. Parent property always points to object's identifier which is not the same type as given MidgardObjectClass klass.
This is static method. NULL is returned if parent property is not found.
|
MidgardObjectClass |
Returns : |
the name of object's parent property or NULL.
|
const gchar* midgard_object_class_get_property_up
(MidgardObjectClass *klass);
/param klass MidgardObjectClass pointer
Returned string is a pointer to object's up property. Up property is a property which holds value of field which points to "upper" object's identifier. Up property always points to object's identifier which is the same type as given MidgardObjectClass klass.
This is static method.
NULL is returned if up property is not registered for given class.
|
MidgardObjectClass |
Returns : |
the name of object's up property or NULL.
|
MidgardObjectClass** midgard_object_class_list_children (MidgardObjectClass *klass);
Returns newly allocated and NULL terminated children ( in midgard tree ) classes' pointers . Returned array should be freed if no longer needed without freeing array's elements. Elements are static pointers owned by GLib.
This is static method.
|
MidgardObjectClass |
Returns : |
array of childreen ( in midgard tree ) classes of the given MidgardObjectClass. |
gboolean midgard_object_class_is_multilang (MidgardObjectClass *klass);
Checks whether given MidgardObjectClass is multilingual.
This is static method.
|
MidgardObjectClass |
Returns : |
TRUE if MidgardObjectClass is mutlilingual, FALSE otherwise.
|
MgdObject* midgard_object_class_get_object_by_guid (MidgardConnection *mgd, const gchar *guid);
MidgardError set by this function: - MGD_ERR_NOT_EXISTS: object is not found - MGD_ERR_OBJECT_DELETED: object is already deleted - MGD_ERR_OBJECT_PURGED: object is purged - MGD_ERR_SITEGROUP_VIOLATION if more than one record exists
This is static method.
|
MidgardConnection handler |
|
guid string which should identify an object |
Returns : |
MgdObject object identified by given guid
|
MgdObject* midgard_object_class_get_object_by_path (MidgardConnection *mgd, const gchar *classname, const gchar *object_path);
This is static method.
Cases to set NULL: - object is not found by path - object's class has neither name nor id member - object's class doesn't have both: parent and up property
MidgardError set by this method: - MGD_ERR_INTERNAL - MGD_ERR_NOT_EXISTS
|
MidgardConnection holder |
|
name of the class for which object should be returned |
|
a path, at which object should be found |
Returns : |
MgdObject instance of classname or NULL if object is not found
|
gboolean midgard_object_class_undelete (MidgardConnection *mgd,
const gchar *guid);
Undelete midgard object identified by given guid
MidgardError set by this method: - MGD_ERR_NOT_EXISTS - MGD_ERR_OBJECT_PURGED - MGD_ERR_INTERNAL
|
MidgardConnection object |
|
string which should identify object |
Returns : |
TRUE on success, FALSE otherwise
|