Share via


RecordSortedList Class

The RecordSortedList class inserts multiple records in a single database trip.

Syntax

class RecordSortedList extends Object

Run On

Called

Methods

  Method Description
Gg923766.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif del Removes a record that has a key that matches the key fields in the recordBuffer from the recordSortedList.
Gg923766.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif find Sets the record buffer to the contents of the record that has a key that matches the key fields in the record buffer, and positions the list to the record returned.
Gg923766.pubmethod(en-us,AX.60).gif first Positions the list to the first record in the list, and copies its contents to the record buffer.
Gg923766.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif ins Inserts a new record in a RecordSortedList, unless it is a duplicate.
Gg923766.pubmethod(en-us,AX.60).gif insertDatabase Inserts multiple records on a single trip to the database.
Gg923766.pubmethod(en-us,AX.60).gif len Returns the current number of records in a RecordSortedList object.
Gg923766.pubmethod(en-us,AX.60).gif new Initializes a new instance of the Object class. (Overrides the new Method.)
Gg923766.pubmethod(en-us,AX.60).gif next Sets the record buffer to the contents of the next record in the recordSortedList and positions the list to the record returned.
Gg923766.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif sortOrder Defines the fields on which the records are sorted.
Gg923766.pubmethod(en-us,AX.60).gif sortOrderFromContainer Defines the fields on which the records are sorted.
Gg923766.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg923766.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)

Top

Remarks

Use RecordSortedList when you want a subset of data from a particular table, and you want it sorted in an order that does not currently exist as an index.

A RecordSortedList object holds records from a single table. The list has a unique key that is defined by the fields listed by using the sortOrder method.

Records are automatically sorted as they are inserted, they do not have to be inserted in sort sequence.

RecordSortedList objects are particularly useful for passing a result-set as a parameter

There is no limit to the size of a RecordSortedList object, but they are completely memory-based, so there are potential memory consumption problems.

RecordSortedList objects must be server-located before the insertDatabase method can be called. Otherwise, an exception is thrown.

Record level security (RLS) cannot be applied by the RecordSortedList class. RLS is applied by the RecordInsertList class).

Use a RecordSortedList in preference to a temporary table in the following situations:

  • Only one sort order is needed.

  • The number of records is not too high (to avoid memory problems).

Compared to temporary tables, RecordSortedList objects:

  • Are faster.

  • Are not disk-based.

  • Only have one index.

  • Cannot be used in forms.

  • Require a call between the client and server per (grouped) read.

Inheritance Hierarchy

Object Class
  RecordSortedList Class
    SysRecordSortedList Class

See Also

RecordLinkList Class

xRecord.setTmp Method