Home > Class Reference > ENSLIB namespace > EnsLib.RecordMap.Batch


abstract class EnsLib.RecordMap.Batch extends %XML.Adaptor, Ens.Request

Base class for batches of homogenous RecordMap objects Note that the RecordMap framework will automatically define a relationship called Records to the Record type contained in the batch. The RECORDMAPGENERATED parameter should be set to 0 if this automatic update should not occur.

Property Inventory (Including Private)

Method Inventory (Including Private)


Parameter to indicate that the class has been generated by the RecordMap framework. If this parameter is set to 0, the RecordMap framework will NOT update this class automatically, and responsibility for any further changes will fall on the user.
parameter XMLIGNORENULL = 0;
Ensure RecordMap classes use the default XMLIGNORENULL behaviour for XML import and export. This parameter is set to 1 in Ens.MessageBody.

Properties (Including Private)

property %Source as %String (MAXLEN = 2000, XMLPROJECTION = "NONE");
Name of source document or connection from which this batch was created.
Property methods: %SourceDisplayToLogical(), %SourceGet(), %SourceIsValid(), %SourceLogicalToDisplay(), %SourceLogicalToOdbc(), %SourceNormalize(), %SourceSet()

Methods (Including Private)

private method %OnAddToSaveSet(depth As %Integer = 3, insert As %Integer = 0, callcount As %Integer = 0) as %Status [ Language = objectscript ]
Ensure that unsaved records get assigned IDs sequentially.
private classmethod %OnDelete(oid As %ObjectIdentity) as %Status [ Language = objectscript ]
Call the generated deleteRecords()() method to delete any records linked to the batch.
classmethod GetBatchHeader(pIOStream As %IO.DeviceStream, pTimeout As %Numeric = -1, Output pBatch As EnsLib.RecordMap.Batch, ByRef pLookAhead As %String) as %Status [ Language = objectscript ]
Get the Batch Header from an incoming stream. This is only invoked once by the RecordMap batch services when a new stream is passed in. Any extra data must be returned in pLookAhead for use in parsing the first record.
classmethod GetBatchTrailer(pIOStream As %IO.DeviceStream, pTimeout As %Numeric = -1, Output pFound As %Boolean, pBatch As EnsLib.RecordMap.Batch, ByRef pLookAhead As %String) as %Status [ Language = objectscript ]
Check for the Batch Trailer. The RecordMap batch services will invoke this method on every record in a file after the Batch Header is found.
method OutputWholeBatch(pIOStream As %IO.DeviceStream, pRecordMap As %String, pUnSwizzleRecords As %Boolean = 1) as %Status [ Language = objectscript ]
Write out the batch header, all the records in the batch, and then the batch trailer
method PutBatchHeader(pIOStream As %IO.DeviceStream) as %Status [ Language = objectscript ]
Write out the Batch Header for the current Batch object
method PutBatchTrailer(pIOStream As %IO.DeviceStream) as %Status [ Language = objectscript ]
Write out the Batch Trailer for the current Batch object

Inherited Members

Inherited Methods (Including Private)


FeedbackOpens in a new window