def _build_query_url(self):
     query = QueryOptions()
     for n in self._properties_to_include:
         prop_val = self._binding_type.get_property(n)
         if isinstance(prop_val, ClientObject):
             query.expand.append(n)
         query.select.append(n)
     return query.to_url()
示例#2
0
 def __init__(self, entity_to_read, properties_to_include=None):
     super(ReadEntityQuery, self).__init__(entity_to_read, None, None,
                                           entity_to_read)
     if properties_to_include:
         self._query_options = QueryOptions()
         self._query_options.expand = properties_to_include
     else:
         self._query_options = entity_to_read.queryOptions
示例#3
0
 def __init__(self,
              context,
              resource_path=None,
              properties=None,
              parent_collection=None):
     self._properties = {}
     self._changes = []
     self._entity_type_name = None
     self._query_options = QueryOptions()
     self._parent_collection = parent_collection
     self._context = context
     self._resource_path = resource_path
     if properties is not None:
         for k, v in properties.items():
             self.set_property(k, v, True)
    def __init__(self, context, resource_path=None, parent_collection=None, namespace=None):
        """
        Base client object which define named properties and relationships of an entity

        :type parent_collection: office365.runtime.client_object_collection.ClientObjectCollection or None
        :type resource_path: office365.runtime.resource_path.ResourcePath or None
        :type context: office365.runtime.client_runtime_context.ClientRuntimeContext
        :type namespace: str
        """
        self._properties = {}
        self._changed_properties = []
        self._entity_type_name = None
        self._query_options = QueryOptions()
        self._parent_collection = parent_collection
        self._context = context
        self._resource_path = resource_path
        self._namespace = namespace
    def __init__(self, context, resource_path=None, properties=None, parent_collection=None):
        """
        Base client object which define named properties and relationships of an entity

        :type parent_collection: office365.runtime.client_object_collection.ClientObjectCollection or None
        :type properties: dict or None
        :type resource_path: office365.runtime.resource_path.ResourcePath or None
        :type context: office365.runtime.client_runtime_context.ClientRuntimeContext
        """
        self._properties = {}
        self._changed_properties = []
        self._entity_type_name = None
        self._query_options = QueryOptions()
        self._parent_collection = parent_collection
        self._context = context
        self._resource_path = resource_path
        if properties is not None:
            for k, v in properties.items():
                self.set_property(k, v, True)