ODataTreeBindingAdapter = function() {

		// ensure only TreeBindings are enhanced which have not been enhanced yet
		if (!(this instanceof TreeBinding) || this._bIsAdapted) {
			return;
		}

		TreeBindingAdapter.apply(this);

		// apply the methods of the adapters prototype to the TreeBinding instance
		for (var fn in ODataTreeBindingAdapter.prototype) {
			if (ODataTreeBindingAdapter.prototype.hasOwnProperty(fn)) {
				this[fn] = ODataTreeBindingAdapter.prototype[fn];
			}
		}

		// make sure we have a parameter object
		this.mParameters = this.mParameters || {};

		// initialize the contexts
		this._aRowIndexMap = [];

		//Store length and threshold for all requests
		this._iThreshold = 0;
		this._iPageSize = 0;

		//set the default auto expand mode
		this.setAutoExpandMode(this.mParameters.autoExpandMode || TreeAutoExpandMode.Sequential);

		//default value for collapse recursive
		if (this.mParameters.collapseRecursive === undefined) {
			this.bCollapseRecursive = true;
		} else {
			this.bCollapseRecursive = !!this.mParameters.collapseRecursive;
		}

		//create general tree structure
		this._createTreeState();

		// restore old tree state if given AND if the binding is running in OperationMode.Client
		// OperationMode.Auto is not supported, as the binding would behave fundamentally different in case the threshold is rejected.
		if (this.mParameters.treeState && this.sOperationMode == OperationMode.Client) {
			this.setTreeState(this.mParameters.treeState);
		}
	}
Adapter for TreeBindings to add the ListBinding functionality and use the
tree structure in list based controls.
Only usable with the sap.ui.table.TreeTable control.
The functions defined here are only available when you are using a TreeTable and an ODataModel.

@alias sap.ui.model.odata.ODataTreeBindingAdapter
@function
@experimental This module is only for experimental and internal use!

@public