@qooxdoo/framework
Version:
The JS Framework for Coders
50 lines (41 loc) • 1.56 kB
JavaScript
/* ************************************************************************
qooxdoo - the new era of web development
http://qooxdoo.org
Copyright:
2004-2009 1&1 Internet AG, Germany, http://www.1und1.de
License:
MIT: https://opensource.org/licenses/MIT
See the LICENSE file in the project's top-level directory for details.
Authors:
* Martin Wittemann (martinwittemann)
************************************************************************ */
/**
* Defines the methods needed by every marshaler which should work with the
* qooxdoo data stores.
*/
qx.Interface.define("qx.data.marshal.IMarshaler",
{
members :
{
/**
* Creates for the given data the needed classes. The classes contain for
* every key in the data a property. The classname is always the prefix
* <code>qx.data.model</code>. Two objects containing the same keys will not
* create two different classes.
*
* @param data {Object} The object for which classes should be created.
* @param includeBubbleEvents {Boolean} Whether the model should support
* the bubbling of change events or not.
*/
toClass : function(data, includeBubbleEvents) {},
/**
* Creates for the given data the needed models. Be sure to have the classes
* created with {@link #toClass} before calling this method.
*
* @param data {Object} The object for which models should be created.
*
* @return {qx.core.Object} The created model object.
*/
toModel : function(data) {}
}
});