Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs / symbols / Roo.data.Record.json
diff --git a/docs/symbols/Roo.data.Record.json b/docs/symbols/Roo.data.Record.json
new file mode 100644 (file)
index 0000000..de1d6de
--- /dev/null
@@ -0,0 +1,172 @@
+{
+  "name" : "Roo.data.Record",
+  "augments" : [
+  ],
+  "desc" : "Instances of this class encapsulate both record <em>definition</em> information, and record\n<em>value</em> information for use in {@link Roo.data.Store} objects, or any code which needs\nto access Records cached in an {@link Roo.data.Store} object.<br>\n<p>\nConstructors for this class are generated by passing an Array of field definition objects to {@link #create}.\nInstances are usually only created by {@link Roo.data.Reader} implementations when processing unformatted data\nobjects.<br>\n<p>\nRecord objects generated by this constructor inherit all the methods of Roo.data.Record listed below.",
+  "isSingleton" : false,
+  "isStatic" : false,
+  "isBuiltin" : false,
+  "memberOf" : "Record",
+  "example" : "",
+  "deprecated" : "",
+  "since" : "",
+  "see" : "",
+  "params" : [
+    {
+      "name" : "data",
+      "type" : "Array",
+      "desc" : "An associative Array of data values keyed by the field name.",
+      "isOptional" : false
+    },
+    {
+      "name" : "id",
+      "type" : "Object",
+      "desc" : "(Optional) The id of the record. This id should be unique, and is used by the\n{@link Roo.data.Store} object which owns the Record to index its collection of Records. If\nnot specified an integer id is generated.",
+      "isOptional" : false
+    }
+  ],
+  "returns" : [
+  ],
+  "config" : [
+  ],
+  "methods" : [
+    {
+      "name" : "copy",
+      "desc" : "Creates a copy of this record.",
+      "isStatic" : false,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "Roo.data.Record",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+        {
+          "name" : "id",
+          "type" : "String",
+          "desc" : "(optional) A new record id if you don't want to use this record's id",
+          "isOptional" : false
+        }
+      ],
+      "returns" : [
+        {
+          "name" : "",
+          "type" : "Record",
+          "desc" : ""
+        }
+      ]
+    },
+    {
+      "name" : "commit",
+      "desc" : "Usually called by the {@link Roo.data.Store} which owns the Record.\nCommits all changes made to the Record since either creation, or the last commit operation.\n<p>\nDevelopers should subscribe to the {@link Roo.data.Store#update} event to have their code notified\nof commit operations.",
+      "isStatic" : false,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "Roo.data.Record",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+      ],
+      "returns" : [
+      ]
+    },
+    {
+      "name" : "get",
+      "desc" : "Get the value of the named field.",
+      "isStatic" : false,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "Roo.data.Record",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+        {
+          "name" : "name",
+          "type" : "String",
+          "desc" : "The name of the field to get the value of.",
+          "isOptional" : false
+        }
+      ],
+      "returns" : [
+        {
+          "name" : "",
+          "type" : "Object",
+          "desc" : "The value of the field."
+        }
+      ]
+    },
+    {
+      "name" : "set",
+      "desc" : "Set the named field to the specified value.",
+      "isStatic" : false,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "Roo.data.Record",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+        {
+          "name" : "name",
+          "type" : "String",
+          "desc" : "The name of the field to set.",
+          "isOptional" : false
+        },
+        {
+          "name" : "value",
+          "type" : "Object",
+          "desc" : "The value to set the field to.",
+          "isOptional" : false
+        }
+      ],
+      "returns" : [
+      ]
+    },
+    {
+      "name" : "reject",
+      "desc" : "Usually called by the {@link Roo.data.Store} which owns the Record.\nRejects all changes made to the Record since either creation, or the last commit operation.\nModified fields are reverted to their original values.\n<p>\nDevelopers should subscribe to the {@link Roo.data.Store#update} event to have their code notified\nof reject operations.",
+      "isStatic" : false,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "Roo.data.Record",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+      ],
+      "returns" : [
+      ]
+    },
+    {
+      "name" : "create",
+      "desc" : "Generate a constructor for a specific record layout.",
+      "isStatic" : true,
+      "isConstructor" : false,
+      "isPrivate" : false,
+      "memberOf" : "Roo.data.Record",
+      "example" : "",
+      "deprecated" : "",
+      "since" : "",
+      "see" : "",
+      "params" : [
+        {
+          "name" : "o",
+          "type" : "Array",
+          "desc" : "An Array of field definition objects which specify field names, and optionally,\ndata types, and a mapping for an {@link Roo.data.Reader} to extract the field's value from a data object.\nEach field definition object may contain the following properties: <ul>\n<li><b>name</b> : String<p style=\"margin-left:1em\">The name by which the field is referenced within the Record. This is referenced by,\nfor example the <em>dataIndex</em> property in column definition objects passed to {@link Roo.grid.ColumnModel}</p></li>\n<li><b>mapping</b> : String<p style=\"margin-left:1em\">(Optional) A path specification for use by the {@link Roo.data.Reader} implementation\nthat is creating the Record to access the data value from the data object. If an {@link Roo.data.JsonReader}\nis being used, then this is a string containing the javascript expression to reference the data relative to \nthe record item's root. If an {@link Roo.data.XmlReader} is being used, this is an {@link Roo.DomQuery} path\nto the data item relative to the record element. If the mapping expression is the same as the field name,\nthis may be omitted.</p></li>\n<li><b>type</b> : String<p style=\"margin-left:1em\">(Optional) The data type for conversion to displayable value. Possible values are\n<ul><li>auto (Default, implies no conversion)</li>\n<li>string</li>\n<li>int</li>\n<li>float</li>\n<li>boolean</li>\n<li>date</li></ul></p></li>\n<li><b>sortType</b> : Mixed<p style=\"margin-left:1em\">(Optional) A member of {@link Roo.data.SortTypes}.</p></li>\n<li><b>sortDir</b> : String<p style=\"margin-left:1em\">(Optional) Initial direction to sort. \"ASC\" or \"DESC\"</p></li>\n<li><b>convert</b> : Function<p style=\"margin-left:1em\">(Optional) A function which converts the value provided\nby the Reader into an object that will be stored in the Record. It is passed the\nfollowing parameters:<ul>\n<li><b>v</b> : Mixed<p style=\"margin-left:1em\">The data value as read by the Reader.</p></li>\n</ul></p></li>\n<li><b>dateFormat</b> : String<p style=\"margin-left:1em\">(Optional) A format String for the Date.parseDate function.</p></li>\n</ul>\n<br>usage:<br><pre><code>\nvar TopicRecord = Roo.data.Record.create(\n    {name: 'title', mapping: 'topic_title'},\n    {name: 'author', mapping: 'username'},\n    {name: 'totalPosts', mapping: 'topic_replies', type: 'int'},\n    {name: 'lastPost', mapping: 'post_time', type: 'date'},\n    {name: 'lastPoster', mapping: 'user2'},\n    {name: 'excerpt', mapping: 'post_text'}\n);\n\nvar myNewRecord = new TopicRecord({\n    title: 'Do my job please',\n    author: 'noobie',\n    totalPosts: 1,\n    lastPost: new Date(),\n    lastPoster: 'Animal',\n    excerpt: 'No way dude!'\n});\nmyStore.add(myNewRecord);\n</code></pre>",
+          "isOptional" : false
+        }
+      ],
+      "returns" : [
+      ]
+    }
+  ],
+  "events" : [
+  ]
+}
\ No newline at end of file