RecordSortedList Class

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

class RecordSortedList extends Object

Run On

Called

Methods

Method

Description

cancelTimeOut

Cancels a previous method call to the Object.setTimeOut Method. (Inherited from Object.)

del

Removes a record that has a key that matches the key fields in the recordBuffer from the recordSortedList.

equal

Determines whether the specified object is equal to the current one. (Inherited from Object.)

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.

first

Positions the list to the first record in the list, and copies its contents to the record buffer.

getTimeOutTimerHandle

Returns the timer handle for the object. (Inherited from Object.)

handle

Retrieves the handle of the class of the object. (Inherited from Object.)

ins

Inserts a new record in a RecordSortedList, unless it is a duplicate.

insertDatabase

Inserts multiple records on a single trip to the database.

len

Returns the current number of records in a RecordSortedList object.

new

Overridden. Creates a new RecordSortedList object.

next

Sets the record buffer to the contents of the next record in the recordSortedList and positions the list to the record returned.

notify

Releases the hold on an object that has called a wait method on this object. (Inherited from Object.)

notifyAll

Releases a lock on the object that was issued by a wait method on this object. (Inherited from Object.)

objectOnServer

Determines whether the object is on a server. (Inherited from Object.)

owner

Returns the instance that owns the object. (Inherited from Object.)

setTimeOut

Sets up the scheduled execution of a specified method. (Inherited from Object.)

sortOrder

Defines the fields on which the records are sorted.

sortOrderFromContainer

Defines the field(s) on which the records are sorted.

toString

Returns a string that represents the current object. (Inherited from Object.)

usageCount

Returns the current number of references (the value of the reference counter) that the object has. (Inherited from Object.)

wait

Pauses a process. (Inherited from Object.)

xml

Returns an XML string that represents the current object. (Inherited from Object.)

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 when:

  • 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

See Also

RecordLinkList Class

xRecord.setTmp Method