MapperKernel Class |
A Mapper is the primary means of mapping object-oriented programming objects to data sources managed by relational databases or other sources of data. A Mapper provides 2-way (Read and Write) access to the underlying Data Source.
MapperKernel is the base class used by all types of mappers.
Namespace: NetQuarry.Data
The MapperKernel type exposes the following members.
Name | Description | |
---|---|---|
MapperKernel | Constructor |
Name | Description | |
---|---|---|
_cacheDataAttrs | Attributes for data caching behavior CacheDataAttrs. | |
_cacheID | The ID for operational data cached in the DataCache. | |
_cacheLife | The lifetime for operational data cached in the DataCache, in minutes. | |
AppendPKSort |
Determine whether or not to append a PK sort to the sort clause.
| |
Application |
The platform IAppContext context object. The Application is set in the Init(String, IAppContext) method.
| |
ApplicationAppearance |
Get the application's AppAppearance property.
| |
Attributes | MapperAttrs flags specifying various behaviour of the mapper.
This is normally loaded from meta-data during Load.
| |
BaseCacheID |
Generate the base CacheID which may be affected by CacheDataAttrs.
| |
BulkUpdateContext |
The bulk context of the current bulk operation, null if no bulk operation is in progress.
| |
CacheManagerToUse |
Gets the CacheManager to use if operational data caching is enabled.
Returns null if caching is not enabled or no CacheManager is available.
| |
Caption |
The localized caption for the mapper. Call Exec(MapperExecCmds, Int32, Object) with the Caption command to get a caption
that includes additional information including current paging and filtering for a live
mapper.
| |
ColOrderPrefName |
Gets the preference name for user column ordering.
| |
Commands |
Mapper commands are used to add custom MapperCommand commands to a mapper's page.
Typically commands are added to the toolbar or the More (Actions) button on the toolbar. When invoked, a
MapperCommand(IMapper, EAPCommandEventArgs) event is fired on the mapper.
You can add commands to the mapper programmatically, typically during the MapperBeforeLayout(IMapper, EAPEventArgs) event.
Commands are also added automatically from meta-data NavTarget elements with TargetType of Command
on Navigator elements configured in meta-data for use on the page, page element, or mapper.
| |
CssClass |
The Cascading Style Sheet class to use for the mapper.
| |
CurrentPage |
The 1-based current page index for the mapper. In mappers other than datasheets, the RecordsPerPage
is generally one so the CurrentPage is the same as the CurrentRecord.
| |
CurrentRecord |
The 1-based index of the current record in the mapper.
| |
Database |
The data IDatabase used by the mapper. The data database holds the mapper's operational data.
| |
DataSourceType |
Get the DBMSType for this mapper's data source.
Normally this is the DBMSType of
the mapper's DataDB, but if the mapper is using a live DataTable as its data
source then DBMSType.DotNet will be returned.
| |
DeleteLocked |
Specifies whether or not the row should be allowed to be deleted for the current row only. This property is
cleared by the mapper immediately prior to the RowCurrent event. An extension can then set the
property to true to prevent this row from being deleted.
The mapper also supports a DeleteLockExpression property allowing the delete lock condition to be specified in meta-data. The DeleteLockExpression is a javascript expression, typically including field references, that is evaluated with each row to initialize its DeleteLocked value. For row-level record locking, see RowLocked. | |
Dirty |
The dirty property can be read to determine if any of the mapper's fields values have been
changed since being populated from the database or original datatable. The property can be
cleared to clear the dirty flags on all the mapper's fields. If set true, the mapper's
internal dirty flag is set, but the mapper's fields are not set dirty.
| |
Extensions |
Gets the collection of IExtension mapper extension objects for the mapper. Extensions provide
both additional standard and custom functionality. Mapper extensions are the primary means by
which custom functionality is added to the application.
Generally extensions used across multiple mappers derive from the MapperExtensionKernel class whereas those that are intended for use on a single mapper derive from an application-specific generated class derived from the TypedMapperExtension template class. Extensions derived from TypedMapperExtension can only be used on the intended mapper, but provide a type-safe, easier to use implementation. These are the most common type of extension in most applications. The more primitive, but flexible MapperExtensionKernel-derived extension are typically used for non-mapper specific functionality such as in the ReadableAudit extension. Virtually all platform-provided extensions are of this type. | |
Fields | ||
Filters |
The collection of MapperFilter objects used to filter the mapper queries. Filters can be specified
in meta-data and manipulated programmatically. Standard datasheet filtering is handled by the
MapperDatasheet object.
| |
Flavor |
Flavor is used to include or exclude certain fields based on their IncludeFlavor and ExcludeFlavor
bits. Fields that are excluded are not hidden; they are never loaded into the mapper's Fields collection.
A flavor of zero indicates that all fields with any IncludeFlavor bits set will not be loaded.
If a field is marked as both included and excluded for a particular Flavor then the exclude bit is favored.
| |
FTSVal |
Gets/sets the Full-Text Search value, if any.
| |
GroupingField |
Returns the IField currently being used to group rows in the datasheet.
| |
GroupPrefName |
Gets the preference name for the persisted user-specific grouping.
| |
HasMorePages |
Returns true if there are additional pages beyond the current page. This should be used
(possibly in conjunction with HasRecords) instead of calling RecordCount in order to manage
UI paging.
| |
HasRecords |
HasRecords returns true if there are one or more records in the current mapper filter, else false.
Note that using HasRecords never requires an additional database query and should therefore be
used in place of RecordCount when possible.
| |
HasRowKey | ||
IgnorePostback |
Indicates whether postback data is being used or ignored.
| |
IsCaching |
Gets whether or not operational data caching is enabled.
| |
IsDesignMode |
Returns true if the control is in Design mode.
| |
IsDetail |
Gets whether or not this mapper is a detail mapper. Currently this is true only for
MapperDetail implementations of the mapper.
| |
IsFiltering |
Determines if the mapper is currently being used to filter (currently based on flavor).
| |
IsListView |
Determines if the mapper is rendering for a list view in the UI.
| |
IsMobile |
Gets whether or not mapper is rendering for a mobile device.
| |
IsNew |
Indicates whether or not the mapper is positioned on a new row.
| |
IsPageMultiElement |
Gets whether or the host template a multi-element template (e.g. ConsoleTemplate) vs. a single-element template (e.g. TabbedSubformTemplate).
| |
Key |
Gets the key (ID) of the mapper. This is the meta-data's unique identifier for the
mapper definition.
| |
Mode |
Mapper mode specifies how the mapper is being used and controls the overall look and behaviour of the mapper.
| |
ModuleKey |
The key to the module using this mapper -- typically obtained from Module.
Note that this may be misleading on Console and Wizard pages. To obtain the module for the mapper itself
use MapperModuleKey.
| |
MOP |
The MOP using this mapper. A MOP is a Module-Page of the form <module>!<page>.
| |
OptFieldPrefName |
Gets the preference name to use for optional fields.
| |
OrderBy |
A SQL ORDER BY clause used as the default sort for the mapper. User sorting in a datasheet
supercedes this clause.
| |
Page |
The .Net Page holding this mapper.
| |
PageDisplayAttrs |
Get the page's PageDisplayAttrs. They should have been set in the mapper's property
collection by the page.
| |
PageInfo |
The PageInfo object related to this mapper. This is a reference to the session's PageInfo object.
Note that since this is a copy of the session's PageInfo object, you should not modify this instance of the PageInfo object. If you want to modify the PageInfo object for this mapper instance only then you should clone the PageInfo object using Clone(IAppContext) and set it back on the mapper as in the example below: Examples PageInfo info = mapper.PageInfo.Clone(cxt); info.TextItems.Add("Caption", "My Caption"); mapper.PageInfo = info; | |
PageNm |
The name of the Page using this mapper -- typically obtained from Name.
| |
ParentContext |
Gets/sets the parent context for this mapper.
An example of such a relationship is a mapper in the bottom pane of a subform
template with its ParentContext being that of the mapper in the top pane.
Normally you do not need to create the ParentContext, you just get it and it
is created on-demand from the current context. Normally you would only set the
context manually if the parent mapper hasn't been saved yet, but exists in memory.
| |
PrefNameBase |
Gets the base name for user preferences that originally were stored by MOP, but now need to be stored
by MOP:PageElementName when inter-pane navigation is in use (any maybe at other times, so we do it now
based on whether or not hosted in a ConsoleTemplate). [3/27/13 CW]
| |
Properties |
The mapper's Properties collection. Properties can be specified in meta-data using the mapper's
property sheet, or programmatically. Properties are used to specify many aspects of mapper
appearance and behaviour.
| |
Purpose |
Purpose is used to identify the purpose to which the live mapper object is currently
being put. Note that Purpose can be set to custom values by an application depending
on how the mapper is being used, but constants for a standard set of purposes can be
found in MapperPurposes.
| |
QuerySQL |
The explicitly set SQL or Stored Procedure call used to retrieve data for the mapper.
When QuerySQL is provided, the mapper will use it instead of generating a SELECT statement
based on its fields. In such a case the functionality of the mapper is extremely limited
and features such as sorting and filtering are typically disabled.
| |
RecordCount |
Returns the number of records in the current filter. Note that this number is not limited
by paging. For example, if on a datasheet displaying the first 10 records out of 53 records
matching the filter, RecordCount will return 53.
Note that calling RecordCount may require an additional database query and should be avoided
when possible. If the intent is to determine if there are zero vs. one or more records
use HasRecords instead which never requires an additional query.
Note that you can use RecordCountSafe to obtain the record count
without the possibility of an error being thrown.
| |
RecordsPerPage |
The number of records per page in the mapper. In mappers other than datasheets this is generally 1.
| |
Repository |
The repository IDatabase used by the mapper. The repository holds the mapper's meta-data.
| |
RollupGrouperField |
Gets the roll-up grouping field when roll-up grouping is in effect. Returns null when not in effect.
| |
RowCountKnowable |
Determines if the mapper can determine the total number of rows in the current filter.
| |
RowKey |
A key uniquely identifying the current row. In the case of multiple keys, this will
be a combined key. This key can be passed to RowKeyFilter(String) to generate a
filter for the record from which the key was obtained.
| |
RowLocked |
Specifies whether or not the row should be locked for the current row only. This property is
cleared by the mapper immediately prior to the RowCurrent event. An extension can then set the
property to true to lock this row only. To perform row locking on some, but not all, the fields
in a row, set the RowLocked property for the appropriate fields instead of the mapper-level
row lock, or set the mapper-level RowLocked and set the field's IgnoreRowLock
property in the fields' meta-data.
Note that a field will be locked for all the static reasons (e.g. if the Locked attribute is set), or if the field is row-locked, or if the mapper is row-locked and the field's IgnoreRowLock property is not set. Note that the IgnoreRowLock property applies only to mapper-level row locking and has no impact on field-level row locking. The mapper also supports a RowLockExpression property allowing the row lock condition to be specified in meta-data. The RowLockExpression is a javascript expression, typically including field references, that is evaluated with each row to initialize its RowLocked value. For row-level delete locking, see DeleteLocked. | |
TextItems |
The mapper's localized TextItem collection. For a particular instance of a mapper only the locale
(language) for the current user is loaded.
| |
UseBootstrap |
Gets whether or not to render for a Boostrap-base application.
| |
View |
The name of the mapper's underlying view or table.
This is normally loaded from meta-data during IMapper.Load().
Note that the View is used in the mapper's operational query and count
SELECT statements, but is not used for INSERT, UPDATE, or DELETE operations.
All INSERT, UPDATE, and DELETE operations are performed against the fields'
underlying tables based on each field's Table property.
Although the View is required, you can configure the mapper to used a Stored Procedure instead of the view by specifying the QuerySQL property. If the QuerySQL property is specified, the View will be ignored (but the Studio will still require it. Note that View can be overridden on a page-by-page basis using a page's PageView property. | |
ViewState |
The ViewState for the current page. Used to maintain filter and sort state across postbacks.
|
Name | Description | |
---|---|---|
AddField |
Adds a field to the Fields collection
| |
AddMapperCommand |
Used by mapper itself to add mapper commands so that we can tell if a newly added command
was added by the mapper or externally.
| |
ApplyViewState |
Called when the MapperExecCmd.ApplyViewState command is invoked.
| |
BindElements |
Bind the mapper's fields to the controls in the specified control collection. Controls
are bound by IField.ControlName which by default is the same as IField.Key.
| |
BindPage(Page, Boolean) |
Binds the mapper to the current .Net Page.
| |
BindPage(Page, Control, Boolean) |
Binds the mapper to the current .Net Page.
| |
BindPage(Page, Control, Boolean, MapperBindFlags) |
Binds the mapper to the current .Net Page.
| |
BuildClientExpression |
Build a javasript expression for the row calculation for the specified field.
| |
BuildQueryFilter |
Build the filter for the operational data query.
| |
BuildQueryFrom |
Build the FROM clause for the operational data query.
| |
BuildTableInfo |
Builds a representation of the physical table(s) underlying a mapper including the SQL
for each table required to execute the specified operation.
| |
BulkDeleteBegin |
Initiate a bulk delete using the mapper and fire its corresponding extension event.
The object controlling the bulk operation typically makes this call before performing the
delete operations in a loop using the same mapper instance.
The bulkContext will be provided in the BulkContext parameter for all mapper events performed
during the bulk operation. If a null bulkContext object is provided, the method will instantiate
one for you. If you want a custom bulkContext, you should derive from the base EventBulkContext
object and provide an instance of your derived class.
If BulkDeleteBegin is called, you should call BulkDeleteEnd when the operation completes.
Note that the MapperBulkBeforeDelete event is fired from within this method.
| |
BulkDeleteEnd |
Complete a bulk delete operation that was initiated with a call to BulkDeleteBegin(EventBulkContext).
This method will delete the mapper's internal bulk context object set by that call.
This method should be called if, and only if, BulkDeleteBegin was called.
Note that the MapperBulkAfterDelete event is fired from within this method.
| |
BulkInsertBegin |
Initiate a bulk insert using the mapper and fire its corresponding extension event.
The object controlling the bulk operation typically makes this call before performing the
insert operations in a loop using the same mapper instance.
The bulkContext will be provided in the BulkContext parameter for all mapper events performed
during the bulk operation. If a null bulkContext object is provided, the method will instantiate
one for you. If you want a custom bulkContext, you should derive from the base EventBulkContext
object and provide an instance of your derived class.
If BulkInsertBegin is called, you should call BulkInsertEnd when the operation completes.
| |
BulkInsertEnd |
Complete a bulk insert operation that was initiated with a call to BulkInsertBegin(EventBulkContext).
This method will delete the mapper's internal bulk context object set by that call.
This method should be called if, and only if, BulkInsertBegin was called.
| |
BulkUpdateBegin |
Initiate a bulk update using the mapper and fire its corresponding extension event.
The object controlling the bulk operation typically makes this call before performing the
update operations in a loop using the same mapper instance.
The bulkContext will be provided in the BulkContext parameter for all mapper events performed
during the bulk operation. If a null bulkContext object is provided, the method will instantiate
one for you. If you want a custom bulkContext, you should derive from the base EventBulkContext
object and provide an instance of your derived class.
If BulkUpdateBegin is called, you should call BulkUpdateEnd when the operation completes.
| |
BulkUpdateEnd |
Complete a bulk update operation that was initiated with a call to BulkUpdateBegin(EventBulkContext).
This method will delete the mapper's internal bulk context object set by that call.
This method should be called if, and only if, BulkUpdateBegin was called.
| |
ClearAllUserFilters |
A base class method to clear all user filters on a mapper (typically going to be some kind of datsaheet)
| |
Clone(IMapper, MapperCloneFlags) |
Create a clone of the mapper. Unless otherwise specified by modifier flags,
the clone will be requeried using the same filters and sort as the original mapper.
| |
Clone(IMapper, MapperCloneFlags, Flavors) |
Create a clone of the mapper. Unless otherwise specified by modifier flags,
the clone will be requeried using the same filters and sort as the original mapper.
| |
Close |
Closes all internal resources
| |
CreateBndLkup |
Creates a new control implementing the IBndLkup interface.
Currently the determination of which control to use is based on whether or not the application is Bootstrap based.
| |
CreateField |
Creates a new field object.
| |
CurrentGrouping |
Gets the current grouping sort clause. Typically this is a field key name optionally followed by
" DESC" when descending sort is in use.
| |
DataChanged |
A change to the underlying data has occurred and the mapper should requery accordingly.
Currently this provides a mechanism to tell the datasheet not to use its posted-back operational
data and to requery instead. Note that MapperAfterLayout is the
earliest event for which this has effect in the current datasheet life-cycle.
| |
DefaultGrouping |
Gets the default grouping.
| |
DefaultSortClause |
Get any DefaultSort and preprocess appropriately (e.g. apply picklists).
| |
Delete |
Delete the current record.
Note that, following the delete and all associated mapper events, the mapper will perform a MoveNext to position
to the next record in the filter. Because of this, when deleting multiple records you should not perform a MoveNext
except on those rows you do not intend to delete.
See also DeleteAll to delete all records in the filter.
| |
DeleteAll |
Delete all records in the current filter.
DeleteAll is a bulk operation and as such will fire the MapperBulkBeforeDelete and
MapperBulkAfterDelete events.
Typically at the start of DeleteAll processing an EventBulkContext is established, however, you may
establish a custom bulk context by calling BulkDeleteBegin(EventBulkContext) immediately prior to calling DeleteAll.
| |
DeleteRelatedFiles |
Delete the file, if any, associated with each field in this row in the mapper
where the field so indicates.
| |
DependencyOrderFields |
Generate a list of dependency-ordered fields. The dependencies are based on property references to
other fields.
| |
DetermineGrouping |
Determine the grouping group and group caption for this item.
| |
Dispose |
Close the database connection(s)
| |
DoCommand |
Execute the specified command.
Typically commandName is the ID of one of the MapperCommand
items added to the mapper's Commands collection.
To invoke a command by its Command, pass a 1 in the flags parameter.
| |
DupeCheck |
Throws an error if saving this record would create a duplicate record
as defined by those fields marked with the DupeCheck attribute.
| |
Equals | (Inherited from Object.) | |
EscapeExpression |
Excape expressions to prevent possible field reference evaluation.
Currently the only escaping performed is to replace all square brackets
("[") with double square brackets. Resolving an escaped expression will
yield the original expression.
| |
Exec(MapperExecCmds, Enum, Object) |
The Exec method provide extended functionality for mappers.
See MapperExecCmds for the enumerated list of commands.
| |
Exec(MapperExecCmds, Int32, Object) |
The Exec method provide extended functionality for mappers.
See MapperExecCmds for the enumerated list of commands.
| |
ExtractSchemaInfo |
Extracts the data types from the query and set on the fields.
| |
FieldBehaviorOpts |
Get the behaviour options for the specified field.
| |
FieldFilterOpts |
Get the filter options for the specified field.
| |
FieldLabel |
Obtain the appropriate label text for the specified field.
| |
FieldLog |
Devlog a field-specific entry using caller as source with mapper and field identified.
| |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
FireEvent(ExtensionEvents) |
Fire a mapper extension event with empty parameters.
| |
FireEvent(ExtensionEvents, EAPEventArgs) |
Fire a mapper extension event with the specified event arguments.
| |
FireEvent(Enum, ExtensionEvents, Object, EAPEventArgs, Int32, Object) |
See IMapper.FireEvent.
| |
FireFieldEvent(ExtensionEvents, IField) |
Fire a field extension event for the specified field.
| |
FireFieldEvent(ExtensionEvents, IField, EAPEventArgs) |
Fire a field extension event for the specified field.
| |
FireRowCurrentEvent |
Fire the ExtensionEvents.RowCurrent event. Immediately prior to the event being
fired the mapper's DeleteLocked property is cleared and RowLocked property is cleared as are those of all the mapper's
fields.
| |
GenDataRow |
Generate javascript for DataRow object used to access mapper values, by field key, on the client.
| |
GetCaption |
Gets the mapper's "caption" property per flags.
The result is exposed via IMapper.Exec(MapperExecCmds.Caption).
Note that GetCaption() is normally overridden by derived classes to render a caption
appropriate for the type of mapper.
| |
GetCascadedText(String, String) |
Get the specified localized text for this page. Obtaining the text is a cascading
process from most specific to least specific always using the IDS as the id:
1) Look for the text item in the PageInfo's TextItems collection,
2) If not found, look for the text item in the mapper's TextItems collection,
3) If not found, look for the item in the locale resource file,
4) If not found, use the provided defaultText.
Note that the text is resolved for field expressions. To avoid this or for additional options,
use, GetCascadedText(String, String, CascadedTextOptions).
| |
GetCascadedText(String, String, CascadedTextOptions) |
Get the specified localized text for this page. Obtaining the text is a cascading
process from most specific to least specific always using the IDS as the id:
1) Look for the text item in the PageInfo's TextItems collection,
2) If not found, look for the text item in the mapper's TextItems collection,
3) If not found, look for the item in the locale resource file,
4) If not found, use the provided defaultText.
| |
GetCascadedText(String, String, CascadedTextOptions, IField) |
Get the specified localized text for this page. Obtaining the text is a cascading
process from most specific to least specific always using the IDS as the id:
1) Look for the text item in the field's TextItems collection (if provided),
2) If not found, look for the text item in the PageInfo's TextItems collection,
3) If not found, look for the text item in the mapper's TextItems collection,
4) If not found, look for the item in the application's TextItems collection,
5) If not found, look for the item in the locale resource file,
6) If not found, use the provided defaultText.
| |
GetDescription |
Gets the mapper's "description" property and resolves it for field expressions. The result
is exposed via IMapper.Exec(MapperExecCmds.Description).
| |
GetFieldList |
Gets a semi-colon separated list of fields to render for this mapper based on various PageElementInfo properties including
FieldList, FieldListMobile, and GroupList, or on a value set programmatically via SetFieldList(String, SetFieldListOpts).
Also handles the HiddenFields property when
HiddenFields is specified. Note that the possibililty of HiddenFields complicates construction
of a field list and typically requires calling this method first to get a possible list of explicitly shown fields (where no
such list means to show all fields normally visible in the mapper) then calling the method again to get a possible list of explicitly
hidden fields and combining the results (including handling the case where fields are explicitly hidden, but not explicitly
shown).
| |
GetFieldText |
Get the specified localized text for the specified field. Obtaining the text is
a three step process:
1) Look for the text item specified by name in the field's TextItems collection,
2) if not found, look for the item specified by ids in the locale resource file,
3) if not found, use the provided defaultText.
| |
GetFilter |
Returns the complete filter.
| |
GetFireAndForgetCountHelper |
Returns the FireAndForgetCountHelper object for a given fire and forget sql request
| |
GetFrom |
Get the mapper's FROM clause (without the word FROM).
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetKeyset |
Get an array of keys using the current filter.
| |
GetLink |
Build a URL to the current mapper per the specified flags.
| |
GetMapperText |
Get the specified localized text for this mapper. Obtaining the text is
a three step process:
1) Look for the text item specified by name in the mapper's TextItems collection,
2) if not found, look for the item specified by ids in the locale resource file,
3) if not found, use the provided defaultText.
| |
GetMissingRequiredFields |
Get a list of the required fields whose values are null or blank.
| |
GetRecordCount |
Determine the number of data records with the current filter and without any
TopN qualifier.
| |
GetRecordCountSafe |
Returns the RecordCount (an int) for the mapper, but catches any error that is thrown. Use this
exec command instead of RecordCount if you want to guarantee that no error is thrown.
| |
GetRowKeyFields |
Get the collection of fields in the mapper that comprise the row keys.
| |
GetSelectedKeys |
Gets an ArrayList of the currently selected keys. The base implementation is appropriate
for detail use where there is just a single current row. For other uses this method
should be overridden.
| |
GetSort |
Returns the Mappers sort. If there is no sort specified, a sort expression based on the primary key
is returned to ensure a reliable row order.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GrouperField |
Get the grouper field associated with the specified field. Note that this
is overridden in MapperDatasheet because grouping there is more limited.
| |
HasPermission |
Determines if the mapper has the specified ObjectPermissions for the current user.
If the object has no assigned permisions, the return value is true.
| |
Init(String, IAppContext) |
This method initializes the mapper.
| |
Init(String, IAppContext, Page) |
This method initializes the mapper.
| |
Init(String, IAppContext, Page, PageInfo) |
This method initializes the mapper.
| |
Insert | Insert a new record. Called by IMapper.Save when mapper is positioned on a new row. | |
InternalSetRecordCount |
The internal _recordCount property should always be set using this method to ensure that associated
information, specifically _recordCountError, is also set properly.
| |
IsAttrSet |
Determines if a particular attribute (or any of a set of attributes) is set.
Note that this is a shorthand for the expression (0 != (mapper.Attributes & attributes)) (C#)
or (0 <> (mapper.Attributes Or attributes)) (VB).
| |
IsCellAttrSet |
Determines if the specified CellTypeAttribute is set. Since a CellTypeAttribute is valid
only for a particular CellType (since the bits are reused for other CellTypes), we must
check both the CellType and CellTypeAttributes.
| |
IsConfiguredFor |
Determines if the mapper is currently configured for the specified MapperCapabilities.
| |
IsGroupedInDatasheet |
Determines whether or not the specified field is grouped inside another field when presented in a datasheet.
| |
IsGroupingColumns |
Determine if column grouping is specified for this list. Note that even if grouping
is specified, it is possible that we will end up NOT adding a grouper header due to
various factors (e.g. user having hidden all grouped cells).
| |
IsOptional(IField) |
Determine if this field is optionally visible (can be shown/hidden by user).
Depending on the field's FieldFilterOptions the field can be either shown or hidden by default.
| |
IsOptional(IField, Boolean) |
Determine if this field is optionally visible (can be shown/hidden by user).
Depending on the field's FieldFilterOptions the field can be either shown or hidden by default.
| |
IsRequestAction |
Determines whether or not the mapper is currently performing the specified HttpRequest action, else false.
This is generally based on the event target (__EVENTTARGET) from the request.
Note that most of these actions really apply only to the MapperDatasheet.
| |
IsUserHidden |
Determine if the specified field that should be hidden due to user preferences.
| |
Layout |
Lay out the mapper controls on the page.
| |
LayoutOnPost |
Determines whether or not a layout is required on a post-back.
| |
Load |
Loads the mapper's meta-data from the RepositoryIDatabase.
Use Load(MapperLoadFlags) to load the mapper with specific load options.
| |
Load(MapperLoadFlags) |
Loads the mapper's meta-data from the RepositoryIDatabase.
| |
Load(DataTable, MapperLoadFlags) |
Sets up the mapper's meta-data per the table's schema.
If so specified the mapper will use the table's data.
| |
LogFieldCounts |
Register debug info about field counts including total, omitted, hidden.
| |
MapperLog(String, String, Exception) |
Devlog an exception using caller as source with mapper identified.
| |
MapperLog(String, String, String, LogMessageLevel, LogCategory) |
Devlog an entry using caller as source with mapper identified.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
MergeSort |
Merge two sort clauses. SQL-Server will error if the same column is used more than once in an ORDER BY clause.
If that happens on a saved sort there's no way to recover without clearing user preferences. This method
will throw out any repeated columns.
| |
MoveBOF |
Move to the Beginning Of File (BOF). That is, position the cursor just prior to the first record in the mapper.
Note that this will throw an InvalidMapperMovement error if the mapper is
positioned on or beyond the first record and is not BiDirectional.
Use MoveFirst to position directly to the first data row.
| |
MoveFirst |
Move to the first record in the mapper.
Note that this will throw an InvalidMapperMovement error if the mapper is
positioned beyond the first record and is not BiDirectional.
Use MoveBOF to position just prior to the first data row.
You should not call MoveFirst prior to calling MoveNext to loop through records in a mapper as this will result in the first record being skipped (unless of course you want to skip the first record). Immediately following a Requery(RequeryHints) the mapper will already be positioned BOF and you can simply loop by calling MoveNext. If you are using a BiDirectional mapper and need to perform subsequent MoveNext loops, call MoveBOF to position just prior to the first data row before starting each subsequent MoveNext. | |
MoveLast |
Move to the last record in the mapper.
| |
MoveNew |
Move to a new record.
| |
MoveNew(Boolean) |
Move to a new record.
| |
MoveNext |
Move to the next record in the mapper.
You should not call MoveFirst prior to calling MoveNext to loop through records in a mapper as this will result in the first record being skipped (unless of course you want to skip the first record). Immediately following a Requery(RequeryHints) the mapper will already be positioned BOF and you can simply loop by calling MoveNext. If you are using a BiDirectional mapper and need to perform subsequent MoveNext loops, call MoveBOF to position just prior to the first data row before starting each subsequent MoveNext. | |
MovePrev |
Move to the previous record in the mapper.
Note that this will throw an InvalidMapperMovement error if the mapper is not BiDirectional.
| |
MoveRelative(Int32, Boolean) |
Move to a record relative to the current record.
Note that this will throw an InvalidMapperMovement error if movement is negative and the mapper is not BiDirectional.
| |
MoveRelative(Int32, Boolean, MoveReason) |
Move to a record relative to the current record.
Note that this will throw an InvalidMapperMovement error if movement is negative and the mapper is not BiDirectional.
| |
MoveTo(Int32) |
Move to the specified row number (1-based).
Note that RowCurrent events are NOT fired and data is NOT
moved through the mapper's Fields during the move. In general you should use
this method to position the mapper to the record immeditately PRIOR to the first record of
interest and then use MoveNext to iterate through one or more records of interest.
Remarks
Note that this will throw an InvalidMapperMovement exception if the mapper is
positioned beyond the specified record and is not BiDirectional.
Examples
For example, to implement a page size of 10 records and read data for the 2nd page, you would
first call mapper.MoveTo(10); to position to the 10th row (the last row of page 1) then
iteratively call mapper.MoveNext(); until you have read 10 records (11 through 20) or
until mapper.MoveNext();MoveNext() returns false indicating that there are no more records.
| |
MoveTo(String) |
Move to the row corresponding to the specified RowKey.
| |
OpenOperationalData |
Open's the operational data by executing the SELECT statment against the underlying data source.
| |
PerformExpressionModification |
Modify a resolved expression per the specified expression attributes.
| |
Permissions |
Gets the ObjectPermissions for the mapper.
| |
PicklistRefresh |
Refresh appropriate picklists used by fields in this mapper. Currently that means picklists
marked "volatile". And, for each picklist flushed, remove it from session cache (if cached)
and have CloneParent flush as well.
| |
PopulateDefaultsFromParent |
Populate the mapper's fields' default values with values from a parent mapper, if any.
| |
PopulateFields |
Populate field values from the mapper's internal EOFReader.
| |
PopulateFromDefaults |
Populate the mapper's field values from their defaults.
| |
PopulateFromPage |
Populate the mapper's field values by extracting values from the page's controls per their field bindings.
| |
PopulateFromSource |
Populate the mapper's field values from the mapper's data source.
| |
PostRequery |
Called immediately following OpenOperationalData() to allow a derived type to perform
post-requery handling. The MapperKernel::PostRequery() has an empty implementation.
Note that if PreRequery() is called, PostRequery() is called even if PreRequery() returns
false such that OpenOperationalData() was not called.
| |
PreRequery |
Called immediately before OpenOperationalData() to allow a derived type to perform
pre-requery handling. The MapperKernel::PreRequery() has an empty implementation.
| |
QueryAggregateData |
Query for mapper aggregate data.
| |
QueryOperationalData |
Query the operational data for the mapper.
| |
RegisterMapperLog |
Register DevLog information for logging if and only if the mapper's operational query fails.
| |
Requery |
Opens the operational data reader, or fills the internal DataTable, for the mapper.
| |
ResolveExpression |
Resolve an expression containing field references.
| |
ResolveSortSpec |
Resolve a !Sort() expression into its constituent parts.
| |
ReuseGridData |
This implementation of the method should never be called. The virtual method is provided here for
implementation in MapperDatasheet.
| |
RowDigest |
Generate a digest of the field values in the mapper for the current row.
| |
RowKeyFilter |
RowKeyFilter is used to build a filter unique for a RowKey obtained from the
RowKey property.
| |
RowRequery |
Requeries the current row following a save in order to pick up any trigger or calculated
column changes.
| |
Save |
Save the current changes. If no fields are Dirty, no save is performed.
You can use the Save(MapperSaveOptions) to override certain standard Save behaviour, the standard behaviour is typically recommended.
See Save(MapperSaveOptions) for some additional information about mapper saves.
| |
Save(MapperSaveOptions) |
Save the current changes allowing for specific MapperSaveOptions options. If no fields are Dirty, no save is performed.
Saves are typically performed using the Save method with default mapper Save behaviour.
| |
SavedFilterApply(String, FilterFlags, SavedFilterApplyOptions) |
Apply the specified SavedFilter to the mapper including any full-text search value.
| |
SavedFilterApply(SavedFilter, FilterFlags, SavedFilterApplyOptions) |
Apply a SavedFilter to the mapper including any full-text search value.
| |
SaveFilter(String, FilterAttributes, SaveFilterOptions) |
Save off a NetQuarry.SavedFilter for this mapper capturing its current filter and sort state.
| |
SaveFilter(String, String, FilterAttributes, SaveFilterOptions) |
Save off a NetQuarry.SavedFilter for this mapper capturing its current filter and sort state.
| |
SelectedKeys |
SelectedKeys is used to obtain a list of the RowKeys for the rows
currently selected in the mapper. In a detail this is the current row.
In a datasheet this is the set of selected rows.
| |
SelectedKeys(EAPEventArgs) |
SelectedKeys is used to obtain a list of the RowKeys for the rows
currently selected in the mapper. In a detail this is the current row.
In a datasheet this is the set of selected rows.
If an EAPEventArgs object is provided from a particular mapper event that
can specify one or more RowKeys, e.g. EAPCommandEventArgs.RowKey
and one or more RowKeys are specified in that object, then the RowKey(s) from the event will be returned.
| |
Send(String, String) |
Simple way to send a message using this mapper and a template. The mapper sets up the message, the relationships,
and creates the template data appropriate from the current row before sending.
| |
Send(String, String, NameValueCollection) |
Simple way to send a message using this mapper and a template. The mapper sets up the message, the relationships,
and creates the template data appropriate from the current row before sending.
| |
Send(String, String, NameValueCollection, MessageRelationships) |
Simple way to send a message using this mapper and a template. The mapper sets up the message, the relationships,
and creates the template data appropriate from the current row before sending.
| |
SetDataSource |
Set the mapper's data source.
| |
SetFieldList |
Sets the semi-colon separated list of fields to render for this mapper. Setting this value programmatically overrides any
meta-data specified list. See GetFieldList(GetFieldListOpts).
| |
SetupClientExpressions |
Generates the RowCalc() javascript for the mapper.
| |
SetUpFromPageInfo |
Set up this mapper from a PageInfo object.
| |
SetValuesFromForm |
Set the mapper's field values from the current post.
| |
Signature |
Generates a signature string for the mapper as currently filtered and sorted.
| |
SortSpec |
Extract the parts of a SortSpec from a SortSpec.
| |
SortSpecFieldKey |
Get the field key from a SortSpec.
| |
ToString | (Inherited from Object.) | |
TryGetRowKeys |
Try to get one or more RowKeys specifically identified in mapper event args.
| |
Update |
Update the current record. Called by IMapper.Save when mapper is positioned on an existing row.
| |
UserCanFilter |
Determine whether or not this mapper supports user filtering. Currently the only support
for this is the Filter-by-Form (FBF) on the datasheet.
| |
UserOrderedFieldList |
Retrieves the list of mapper field keys in the order they should be presented to the user in a
datasheet taking any user-customized column order into account.
Unless a explicit ColOrder property is specified on the mapper, first are fields marked
with FreezeColumn the are fields explicitly ordered by the user and then all other fields.
Note that field visibility is NOT taken into account and, in fact, the list may include keys for which no field is defined.
The list is guaranteed to not include duplicates.
| |
UseSmartTemplatePopulation |
Gets whether or not to use smart template population per the SmartTemplatePopulation Compatibility feature.
|
Name | Description | |
---|---|---|
_appAppearance | The application appearance flags from the application context. | |
_appContext | The current application context. | |
_attributes | Attributes describing mapper behaviour. | |
_cacheManagerParams | Parameters to manage data caching behavior CacheManagerParams. | |
_cssClass | The CSS class name to use for mapper fields. | |
_csSortSpec | The prefix for a mapper SortSpec expression. | |
_ctrlParent | The parent control to the mapper's bound fields. | |
_currentPage | The (1-based) page to which the mapper is current positioned. | |
_data |
The operational data when such is provided programmatically instead of
obtained through the normal mapper querying facilities.
| |
_databaseExplicitlySet | Identifies whether or not the database was explicitly set. | |
_dataSourceKey | The key to the DataSource to use. | |
_dbData | The operational data data source for the mapper. | |
_dbRepos | The repository (meta-data) data source for the mapper. | |
_defaultTargetFrame | The default frame for navigation links. | |
_exts | The mapper's collection of extension components. | |
_fields | The mapper's collection of IField objects. | |
_filters | The mapper's collection of mapper filters. | |
_flavor | The Flavor for which this mapper should render. | |
_hostPane | The IWizContainerPane or IConsolePane hosting this mapper, if so hosted. | |
_initialSelectedKeys | The optional set of initially selected RowKeys currently used for the initial state of the Datasheet row selector checkboxes. | |
_isHtml5 | True if the AppAppearance.Html5DocType attribute is set on the application | |
_isPostBack | Specifies whether or not this page should be considered a postback. | |
_key | The unique identifier for the mapper (IMapper.Key). | |
_lastCountFilter | The last SQL query used to determine the mapper record count. | |
_lastPseudoSQL |
The last main query SQL statement executed.
This is used internally to determine if the query SQL has changed since the last query.
| |
_lastQueryFilter | The last SQL query used to filter the mapper. | |
_mapperModuleKey | The module for the mapper (from xmt_datamappers.module_key) vs. _moduleKey which is obtained from the MOP. | |
_mode | Mapper mode specifies how the mapper is being used and controls the overall look and behaviour of the mapper. | |
_moduleKey | The module key, generally used in conjunction with the page name to form a MOP (module!page). | |
_moveReason | The reason for the current/last Move call. | |
_navTarget | The NavTarget context under which the mapper is rendering. | |
_new | Identifies whether the mapper is positioned on a new row. | |
_page | The .Net Page object on which this mapper is rendering. May be null. | |
_pageInfo | The NetQuarry PageInfo object describing the page on which this mapper is rendering. May be null. | |
_pageName | The platform page name, generally used in conjunction with the module to form a MOP (module!page). | |
_pageNumber | Used by the datasheet to control paging | |
_pei | The page element associated with this mapper. May be null. | |
_processing | The current processing being performed by the mapper. | |
_propFldReferencedBy |
The DependencyOrderFields method sets a property by this name on fields referenced by other fields.
The value of the property will be the semi-colon-separated list of field keys of the fields so referencing.
See also _propFldReferences.
| |
_propFldReferences |
The DependencyOrderFields method sets a property by this name on fields referencing other fields.
The value of the property will be the semi-colon-separated list of field keys of the fields referenced.
See also _propFldReferencedBy.
| |
_props | The mapper's collection of properties. | |
_purpose | The current purpose for this mapper instance. | |
_recordCount | The number of records in the mapper per the current filter. | |
_recsPerPage | The number of records per page. | |
_requeryHints | Hints provided to Requery. | |
_revealText | Specifies whether or not to render in RevealText mode to show developer the source of customizeable text. | |
_sort | The mapper's current SQL sort clause. | |
_sqlRowNumPaging | Used by the datasheet to control paging | |
_state | The internal state of the mapper. | |
_textItems | The mapper's collection of localized text. | |
_topN |
The number of records to retrieve in the database query (for efficiency). This
is typically one more than the last record of interest given the current paging.
We get one extra record in order to determine if more pages are available.
| |
_viewName | The name of the mapper's underlying table or view. | |
_viewState | The page's ViewState. | |
ERROR_FIELD_VALUE |
Field value error prefix for internal use only.
|
Name | Description | |
---|---|---|
EqualValue |
Determines if the object value is equal to another object. If the two objects are null, then this returns true.
There is special handling for guid comparisons (since a guid could be a string formatted in up to 3 different ways).
If the special guid handling is not performed, then the object.Equals method is used.
(Defined by EAPUtil.) | |
GetPageElement |
Gets the PageElementInfo for the IMapper, if available.
Note that this is simply a wrapper around the GetPageElement command.
(Defined by MapperUtils.) | |
IsPageElement |
Determines if the IMapper is being rendered for the specified MOP and
Name of the PageElementInfo.
This method is safe to use even if the mapper is null, has no MOP, and/or has no
PageElementInfo associated.
(Defined by MapperUtils.) | |
ResolveExpression |
Resolve the specified field expression using ExpressionResolve mapper command.
See ExpressionParser for more information about field expressions.
Use ExpressionEscape to escape apparent field references in a string.
Note that although, for historical reasons, the ExpressionResolve
command will throw an error if the expression contains an unresolvable field or other syntax error,
this method DOES NOT throw by default because it adds the DoNotThrow flag
UNLESS the ThrowOnAnomaly flag is set.
(Defined by MapperUtils.) |