The following tables list the members exposed by BaseBusinessObject.
| Name | Description | |
|---|---|---|
![]() | BaseBusinessObject Constructor | Overloaded. BaseBusinessObject Default constructor offers no functionality. Calls the base constructor with same signature. |
| Name | Description | |
|---|---|---|
![]() | AddResultsToDataSet | AddResultsToDataSet Holds the boolean value indicating weather the find method will try to add/refresh the result set into the dataset. |
![]() | AffectedRecords | AffectedRecords Holds an Int32 value which can be used to hold the number of records that are either returned or affected by a query. This can be very useful in cases where a count of returned rows is needed. |
![]() | AutoEncloseObjectNames | AutoEncloseObjectNames Indicates weather the business object will enclose the Field names and Table names with [ ] while running the SQL statement. By default this is set to false. |
![]() | AutoRecursion | AutoRecursion Indicates weather at the time of creating a join with another business object, the Recursive property will be passed on to the joined object or not. The ability to override the Recursive property after a join has been created is still irrespective of this property's value. If you create a join with a Parent object and current Recursive property is set to RecursionTypes.None, it will be automatically switched to RecursionTypes.Parent. However, if more than one type of join is created i.e. Parent and Child relationship, the property will be set to RecursionTypes.All. NOTE: This property's Recursive property will be passed to the joined object at the time of creating the join. If you change the Recursive property later, the value will not be copied automatically. |
![]() | AutoSyncOnConnect | If AutoSyncOnConnect is set to true and the ObjectState property is changed from Disconnected to Connected, the Save method of the business object will be automatically called. If AutoSyncOnConnect is set to false, to synchronize all the changes made to the data locally will need to by synchronized by calling the Save method. |
![]() | CaseConversion | CaseConversion Used to determine if the business object will transform all its String field's case to Upper or Lower. By default the business object does not transform the String values held in the StringField's Value property. It will reset the CaseConversion property of all the StringField objects held in the Fields collection with the passed in value. NOTE: The conversion is only performed for Insert, Update statements and for any values being used in Search criteria. The Find method does not transform the field values returned from the database as this can severely affect the performance in case of a large result set being returned. Although Load method does not perform this conversion either but once the values are loaded into the StringField any values returned follow the CaseConversion property of that field. |
![]() | ConcurrencyMode | ConcurrencyMode Used to determine if the business object check to see if the underlying data in a row was changed while the data was being modified in the business object. By default the business object does not perform this check, and it merely overwrites the underlying row with the provided row to be updated. The same rule applies for Delete as well. |
![]() | ConnectionString | ConnectionString Holds the value for connection String used to make a connection to the target database. This property is automatically initialized with the value from the application configuration settings. The value of ConnectionStringConfigName is used to look for the connection String from the application settings (AppSettings/Keys in Framework 1.1 and ConnectionSettings/Connections in Framework 2.0).. This property can also be manually set to point the library to a database other than the default. This will be useful if you need the library to connect to multiple database. |
![]() | ConnectionStringConfigName | ConnectionStringConfigName Set this property to change the name of the connection String. By default the library looks for a "database" connection String (AppSettings/Keys in Framework 1.1 and ConnectionStrings in Framework 2.0). This property should be modified before the database connection is initiated. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObject) |
![]() | DatabaseTypeConfigName | DatabaseTypeConfigName Set this property to change the name of the AppSettings key that contains the database type information. By default the library looks for a "database_type" AppSettings key. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObject) |
![]() | DBConnection | DBConnection Holds any IDbConnection object. This is autmatically created based on the DBType selection. If the DBType is set to SQL Server 2000 or SQL 2005, this property will be assigned a SqlConnection object, but if the DBType is set to Oracle 8i, 9i or 10g this property will be assigned an OracleConnection. If you like to manually set the connection you can do so as well as Int64 as the underlying database type remains the same as the value of DBType. Or NOTE: This property is not NonSerializable and it is also ignored during Xml Serialization. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | DBTransaction | DBTransaction Holds any IDbTransaction compatible object. This is autmatically created based on the value set in UseInTransaction property. If the UseInTransaction property is set to true, then at the time of creating a connection a new Transaction object will be created. If you like to manually set the transaction object you can do so, although it is better to let the library handle the transaction object creation along with the connection object creation. NOTE: This property is not NonSerializable and it is also ignored during Xml Serialization. |
![]() | DBType | DBType Specifies the uderlying database server that will be used by this library. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObject) |
![]() | Edition | ProductEditions - Returns the product edition being used currently. |
![]() | ErrorString | Overridden. ErrorString Holds a String value. This value is used to store the errors that were encountered while working with any of the database objects. Note: Starting with version 3.x this property also returns any validation errors on the fields as well. Each error message is seperated by a line break. Also, if you try to set a blank/null value then all the Validators's error messages are set to null as well. |
![]() | Fields | Fields Holds a collection of IField type fields. |
![]() | FillSchema | FillSchema Value of FillSchema determines weather after running a SELECT statement if the FillSchema method will be called to fill the underlying schema into the dataset. NOTE: This is set to false by default. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | HasChanges | Returns true if any of the rows stored in the ResultSet have been added/modified or deleted. |
![]() | IncludeTableName | IncludeTableName Holds a boolean value. This value indicates weather the query to run the search will prefix the table name to the field names. This should be set to true if you are using multiple tables and more than one table might be using same column names, as this will avoid the conflict. |
![]() | IsDirty | IsDirty Holds a boolean value. This value indicates weather the record values loaded into the object's properties have been modified since then or not. Setting the value to false also resets the IsDirty flag on all the fields contained by this business object. As in the above example, IsDirty property can be used to determine weather the record values loaded have been modified or not and IsDirty can be combined with IsLoaded to check if the record has been loaded or not. |
![]() | IsLoaded | IsLoaded Holds a boolean value. This value indicates weather the record values have been loaded into the object's properties. As in the above example, IsLoaded property can be used to determine weather the record values have been loaded or not. Also it can be combined with the IsDirty property to see if the values have been changed since they were last loaded. |
![]() | IsValid | Validates each field and returns true if all fields are valid and false if any field's validation fails. NOTE: Calling IsValid method will put all the errors from all the failing validators into the ErrorString property and each error message will be seperated by a line break. |
![]() | Joins | Joins Holds a JoinCollection value. This value is used to indicate the joins with other business objects weather the relationship is parent or child to this object. |
![]() | LocalTimeZone | LocalTimeZone This allows the business object to perform calculations on Dates and convert the UTC dates to the local dates and times of the User. It will reset the LocalTimeZone property of each DateTimeField with the passed in value. |
![]() | LoggedInUser | LoggedInUser Useful for ASP.NET based applications as this property is this value is initialized from the Session variable UserID. If your application does contain a field in the Session called UserID then that value is easily available from LoggedInUser property. NOTE: It is not initialized if the library is being used in any other type of environment other than ASP.NET. |
![]() | MaxRecords | MaxRecords Holds an Int32 value. This value indicates the number of maximum rows the search will return. If this value is set to -1 (by default) all rows will be returned. It is implemented for all database types. |
![]() | MaxRecursionLevels | MaxRecursionLevels Stores the maximum levels for the business object to traverse while running various commands. This however will have no effect if the Recursive property is set to None. Also, this property is used from the first business object that is used to run any operation. |
![]() | MoreResults | MoreResults Holds a boolean value. This value is used when searching for records to determine weather to use " AND " clause or " OR " clase between the criteria. As in the above example, when searching for records more results will be return. |
![]() | ObjectMode | ObjectMode If ObjectMode is set and a value is assigned to any type of Field the field's UseInSave or UseInSearch flags are set based on the ObjectMode. If ObjectMode is set to Search then UseInSearch is set to true. However if the ObjectMode is set to Save then UseInSave is set to true. This will set the myIDField.UseInSearch and myNameField.UseInSearch to true automatically. |
![]() | ObjectState | ObjectState property is used by the business object to know if the business object should send all the commands to the database or should retain all changes locally to be synchronized at a later time. |
![]() | OnlyDistinct | OnlyDistinct Holds a boolean value. This value indicates weather the search results will return only distinct rows. This is acheived by adding DISTINCT keyword to the select statement. |
![]() | PageSize | PageSize Holds an Int32 value. This combined with the StartRowIndex property can be used to create a paged view of the result set. NOTE: This feature is not implemented for SQL Server 2000. If you are using SQL Server 2000 as your data store you will need to write your own paged result set sql statements and use the DatabaseObjectSQL methods to run those. |
![]() | ParameterPrefix | ParameterPrefix - Returns the prefix that can be used to prefix the parameter names (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | PartialTextMatch | PartialTextMatch Holds a boolean value. This value is used when searching for records to determine weather match the text columns with partial values or exact values. Setting this value reset's all the StringField's PartialTextMatch property as well. As in the above example, when searching for records any records that contain the text will be returned. |
![]() | PrimaryKeyFields | PrimaryKeyFields Holds a collection of IField type fields that make up the Primary key for this business objects tables. |
![]() | Recursive | Recursive Stores the direction in which the business object will traverse while running various commands. This however will have no effect if the MaxRecursionLevels property is set to 0. Also, this property is used each business object that is joined to the original business object running the operation. |
![]() | ResultSet | ResultSet Holds the DataSet for the result sets. The Load method will add the returned row to a table in this data set, and if it loads any parent or child records, those will be added in seperate tables. The Find method will add the returned row(s) to a table (named as TableName or ResultSetName property - Use the GetResultSetName method). Note: Only if the AddResultsToDataSet is true the results will be added to this DataSet. |
![]() | ResultSetName | ResultSetName Holds the NameField value that will be used by the find method to Add/Refresh the table in the dataSet. |
![]() | SessionEndCommand | SessionEndCommand Holds a SQL command String or the name of the stored procedure that is executed at the time database connection is closed/destroyed. Hence if the connection is shared by multiple objects, the command is only run once. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | SessionEndCommandType | SessionEndCommandType Holds a CommandType that indicates weather the SessionEndCommand is of type Text or Stored Procedure. TableDirect command type is not supported. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | SessionEndParameters | SessionEndParameters Holds either a Hashtable or an ArrayList of IDataParameters. If a Hashtable is assigned it should contain Key and Value pairs for parameters that the SessionStartCommand expects. Using a hashtable the stored procedure can not return any values and only inbound parameters can be used. If a ArrayList of parameter objects is used the ArrayList should contain an instance of parameter object for each parameter that SessionStartCommand expects. The parameter objects can be both inbound or outbound and may be of any data type that the underlying database supports. NOTE: To create an instance of the parameter of type that is suitable for your currently selected database type, call the GetNewParameterInstance method of this object. For example: IDataParameter param = databaseObjectSQL.GetNewParameterInstance(); By using the GetNewParameterInstance you are not hard coding the database specific parameter type, hence if you ever decide to move the underlying data store to a different data store (e.g. move from SQL Server to Oracle or vice versa), you will NOT need to recompile and the application will continue to work. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | SessionStartCommand | SessionStartCommand Holds a SQL command String or the name of a stored procedure that is executed at the time database connection is created. Hence if the connection is shared by multiple objects, the command is only run once. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | SessionStartCommandType | SessionStartCommandType Holds a CommandType that indicates weather the SessionStartCommand is of type Text or Stored Procedure. TableDirect command type is not supported. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | SessionStartParameters | SessionStartParameters Holds either a Hashtable or an ArrayList of IDataParameters. If a Hashtable is assigned it should contain Key and Value pairs for parameters that the SessionStartCommand expects. Using a hashtable the stored procedure can not return any values and only inbound parameters can be used. If a ArrayList of parameter objects is used the ArrayList should contain an instance of parameter object for each parameter that SessionStartCommand expects. The parameter objects can be both inbound or outbound and may be of any data type that the underlying database supports. NOTE: To create an instance of the parameter of type that is suitable for your currently selected database type, call the GetNewParameterInstance method of this object. For example: IDataParameter param = databaseObjectSQL.GetNewParameterInstance(); By using the GetNewParameterInstance you are not hard coding the database specific parameter type, hence if you ever decide to move the underlying data store to a different data store (e.g. move from SQL Server to Oracle or vice versa), you will NOT need to recompile and the application will continue to work. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) |
![]() | StartRowIndex | StartRowIndex Holds an Int32 value. This combined with the PageSize property can be used to create a paged view of the result set. |
![]() | TableName | TableName Holds a NameField value. This value is used to indicate the table the object is will be performing its operations on. |
![]() | TranslateTimeZones | TranslateTimeZones Used to determine if the business object will translate the datetime field's value to UTC before saving to DB. The process will use the LocalTimeZone value to determine the time difference when reading and writing to the database. It will reset all the DateTime field's TranslateTimeZones with the value of TranslateTimeZones |
![]() | UseNoLock | UseNoLock Holds a boolean value. This value indicates weather the select query will use the nolock clause or not. NOTE: This is only used when the database server is SQL Server 2005 or SQL Server 2000. |
![]() | UseTransaction | UseTransaction Value of UseTransaction determines weather this object will create a Transaction at the time of creating database connection. If UseTransaction is set to true, and AssignConnection method is used to create joined objects, the connection, transaction are automatically shared by each business object. This allows multiple business objects to run various commands under the same transaction scope. NOTE: This property is set to false by default, and hence for the business object to run various commands in a transaction, this property must be explicitely set to true. |
![]() | Visible | Visible Holds a boolean value. This value indicates weather the search results will show the columns of this table. This value overrides all the Visible properties of columns of this table. NOTE: Setting this property does not reset any of the field's Visible property. If this is set to false, the field's Visible property has no effect. |
| Name | Description | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | AssignConnection | AssignConnection If the current instance does not have an instance of database connection object, then this method calls CreateConnection method. After that the reference to the existing database connection object stored in DBConnection is passed to the passed in Object's DBConnection member variable. If the current instance's UseTransaction is set to true then this method also passes the reference to the existing transaction object stored in DBTransaction to the passed in Object's DBTransaction member variable. This method also assigns the SessionStartCommand and SessionEndCommands allowing any of the connected business objects to be able to run the SessionStartCommand and SessionEndCommand at the time of database connection opening and closing. Parameters:
| ||||||||||||||||||
![]() | Average | Average Gets the average value of the passed in field from the database that match the criteria (if any provided). The value is returned in the same field object. This method will in addition set the AffectedRecords property with the number of records returned by this method. If the ObjectState is Disconnected this method will return false. Returns:
| ||||||||||||||||||
![]() | CommitTransaction |
CommitTransaction
Commits the active SQL Transaction held in DBTransaction member variable, and then Disposes the transaction object, closes the connection object and sets it to null. NOTE: This however does not affect your ability to run more commands to the underlying database using the same instance of the database object instance as the database object creates a new connection when trying to run a new command after the earlier connection has been closed. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) | ||||||||||||||||||
![]() | Count | Count Gets the count of records in the database that match the criteria (if any provided). This method will in addition set the AffectedRecords property with the number of records returned by this method. If the ObjectState is Disconnected this method will return the count of rows in the ResultSet for this objects corrosponding table. Returns:
| ||||||||||||||||||
![]() | CreateConnection | CreateConnection Creates a database connection and sets the DBConnection property. Depending on the DBType value either a SqlConnection object is created and stored in DBConnection property or an OracleConnection object is created and stored. If the DBConnection already has a connection object then this method does not create a new instance, instead it simply ensures that the connection is open. Also, if the UseTransaction property is set to true, then a new transaction object is created at the time of creating a connection. If there are any exceptions during connection or transaction object creation, the ErrorString property is populated with the exception message. | ||||||||||||||||||
![]() | CreateJoin | Overloaded. CreateJoin Used to create a join with another business object, and also to specify the JoinType along with the RelationshipType. After creating a join with the passed in business object, the Join reference is added to the Joins collection. ObjectMode, ObjectState, AutoSyncOnConnect, ConcurrencyMode, ResultSet, MoreResults and PartialTextMatch properties values are automatically assigned to the newly joined object. This ensures that the joined business objects function just like the main business object. Parameters:
Returns:
| ||||||||||||||||||
![]() | Delete | Overloaded. Delete Runs a Delete command to delete the record whose primary key values match the PrimaryKeyFields values. This method expects that all the primary key values have been specified. No recursive action is taken on the joined objects. Each object's Delete method must be called to delete the related records as well. This method will reset the AffectedRecords property to the number of rows deleted. Business object must have at least one primary key field defined for this operation to work. NOTE: As of version 3.x this method preserves each field's UseInSearch values, and does not reset any of the property values unlike the version 2.x and older did. Also starting version 3.x this method will retain any information related to any records deleted that can be a later applied to the database. If the ObjectState property is set to Connected then the Delete command is sent to the database immediatly. Returns:
| ||||||||||||||||||
![]() | Dispose |
Dispose
Effective version 3.x this method overrides the DatabaseObjectSQL class's Dispose method, and it is used to fire the ObjectDisposing event. | ||||||||||||||||||
![]() | Find | Overloaded. Find Performs a search on all the fields of this object or any joined object that are marked with UseInSearch as true and AllowSearch is also set to true. The returned result set will only contain the fields and business objects whose Visible property is set to true. If the OnlyDistinct property is set then the result set will only contain distinct rows. Any Fields that have their Sort property set will be included in the sorting of the result set as per their SortPosition property. AddResultsToDataSet will determine if the data returned from the execution of this command will be added into the DataSet held at ResultSet property. If the ObjectState property is set to Disconnected then this method will not connect to the database and will not return any data. Passed in values of startRow and rowCount parameters will be used to set the StartRowIndex and PageSize properties in order to return a paged result set. NOTE: Paged result set is not supported on SQL Server 2000. Parameters:
Returns:
| ||||||||||||||||||
![]() | FindAndLoad | FindAndLoad Essentially the same as calling the Find method, except that FindAndLoad will load the first row from the returned result set. This can also be very useful for finding unique or non-unique records that without the knowledge of their primary key value but finding them on the basis of other field values. This method will set the AffectedRecords property with the number of records returned by Find method. NOTE: As of version 3.x this method will not return any data if the ObjectState property is set to Disconnected. Returns:
| ||||||||||||||||||
![]() | GetDeleteSQL | GetDeleteSQL Creates an DELETE SQL Statement suitable for the selected DatabaseType. This method expects that all the primary key values have been specified. NOTE: As of version 3.x this method preserves each field's UseInSearch values, and does not reset any of the property values unlike the version 2.x and older did. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetDelimetedValue | Overloaded. GetDelimetedValue Goes through all records in an array of DataRows and adds all the values for the field into a delimited String where each value is separated by passed in value of delimit parameter. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetFieldsList | Overloaded. GetFieldsList Provides a String of field names separated by a comma for this object and any joined objects. The Recursive property on this objects and on the joined objects determine if the joined objects will also try to create a field list from their joined objects to be included in this field list. This process will follow until the depth reaches maxLevel parameter value. NOTE: If the IncludeTableName property of this or any joined object is set to true, that business object's field names will be prefixed with their table name. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetFromExpression | GetFromExpression Provides a String that can be used as a From portion of the SQL statement. This includes the table name and an alias (ResultSetName if it is set as well and different from Name property) Returns:
| ||||||||||||||||||
![]() | GetGroupByExpression | Overloaded. GetGroupByExpression Provides a String of field names to be included in the Group By clause separated by comma for this object and any joined objects. The Recursive property on this objects and on the joined objects determine if the joined objects will also try to add fields into the group by clause. This process will follow until the depth reaches maxLevel parameter value. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetInsertExpression | GetInsertExpression Provides a String that contains a list of all the fields that can be used in an INSERT statement. A field must have its AllowSave and UseInSave as true to be included. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetInsertSQL | GetInsertSQL Creates an INSERT SQL Statement suitable for the selected DatabaseType. The SQL Statement will contain all the fields that are marked UseInSave as true. This method expects that all the primary key values have been specified if they are not marked as AutoGenerated. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetJoinExpression | Overloaded. GetJoinExpression Provides a Join expression of all joined objects in a String. It uses the Recursive property on this objects and on the joined objects determine if the joined objects will also try to create joins with their joined objects. This process will follow until the depth reaches maxLevel parameter value. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetNewParameterInstance | GetNewParameterInstance Returns a new instance of parameter object that is suitable to be used with the currently selected DatabaseType. | ||||||||||||||||||
![]() | GetOriginalWhereExpression | GetOriginalWhereExpression Provides a String comprised of all the field's search expressions based on their original values. Each field's search expression is obtained if it is marked as Visible or UseInSave. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetResultSetName | GetResultSetName Compares the Name property with ResultSetName property and returns ResultSetName if it is different from Name property. Returns:
| ||||||||||||||||||
![]() | GetSelectSQL | GetSelectSQL Creates a SQL Statement suitable for the selected DatabaseType. The SQL Statement will contain all the fields in its fields list that are marked Visible including any joined object's fields where both the joined object and the fields are marked Visible. The where clause will be created any fields that are marked with UseInSearch as true and AllowSearch is also set to true. This includes fields from any joined objects. If the OnlyDistinct property is set then the return SQL statement will include DISTINCT clause. Any Fields that have their Sort property set will be included in the sort expression of the SQL statement in the order of their SortPosition property. If the values of StartRowIndex and PageSize properties have been set then the returned SQL statement will contain appropriate code to created a paged result set. NOTE: Paged result set is not supported on SQL Server 2000. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetSortExpression | Overloaded. GetSortExpression Provides a String of field names with their sort order separated by comma for this object and any joined objects. The Recursive property on this objects and on the joined objects determine if the joined objects will also try to create sort expressions from their joined objects. This process will follow until the depth reaches maxLevel parameter value. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetSQLExceptionAsString | GetSQLExceptionAsString Gets detailed error message and the source of the passed in Exception. Parameters:
| ||||||||||||||||||
![]() | GetStringsFromColumn | GetStringsFromColumn Goes through all records in a DataRowCollection and adds all the values for the field name into an array of strings. Returns:
| ||||||||||||||||||
![]() | GetUpdateExpression | GetUpdateExpression Provides a String that contains a list of all the fields including their parameter names. A field must have its AllowSave and UseInSave as true to be included. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetUpdateSQL | GetUpdateSQL Creates an UPDATE SQL Statement suitable for the selected DatabaseType. The SQL Statement will contain all the fields that are marked UseInSave as true. This method expects that all the primary key values have been specified. NOTE: As of version 3.x this method preserves each field's UseInSearch values, and does not reset any of the property values unlike the version 2.x and older did. Parameters:
Returns:
| ||||||||||||||||||
![]() | GetValueList | Overloaded. GetValueList Provides a String that contains a list of all the field's values separated by a comma. A field must have its Visible property as true to be included. Returns:
| ||||||||||||||||||
![]() | GetWhereExpression | Overloaded. GetWhereExpression Provides a String comprised of all the field's search expressions. Each field's search expression is obtained based on its AllowSearch, UseInSearch and SearchMode properties. See GetWhereExpression method of the BaseField class for more information on how each field's search expression is created. Each field's search expression is separated by either AND or an OR clause depending the MoreResults property on this business object. If MoreResults is set to true then OR is used otherwise AND is used, this however can be overridden at each field level as well by setting the Field's SearchCondition property. The Recursive property on this objects and on the joined objects determine if the joined objects will also try to create their own search expressions from their joined objects to be include in this expression. This process will follow until the depth reaches maxLevel parameter value. Parameters:
Returns:
| ||||||||||||||||||
![]() | InitializeObject | InitializeObject Loads all the default values from the configuration file. This method only needs to be called once during the lifetime of the business object. This method can be overridden from any of the inheriting classes. This can be useful if you have a need to store the default values in a different configuration store. For example, you can store the default values for the configurable properties in database, external xml or text file or any other storage of your choice and you can override this method and perform reading of values and supplying the read values into the configurable properties of this object. | ||||||||||||||||||
![]() | Insert | Overloaded. Insert Runs an Insert command with the fields marked with UseInSave as true. This method expects that all the primary key values have been specified if they are not marked AutoGenerated. If the underlying database is Oracle then this method will also load back values of the AutoGenerated PrimaryKeyFields for the inserted record. However, if the underlying database is SQL Server the value of the identity field is loaded automatically after insertion. NOTE: Only one AutoGenerated primary key field is supported per business object when the underlying database is SQL Server 2000 or SQL Server 2005. If you have more than one AutoGenerated primary key fields, the insert will still work but the IDENTITY and/or other primary key field values will not be loaded back automatically. Business object must have at least one primary key field defined for this operation to work. NOTE: Starting version 3.x this method will retain any inserted values for a later sync/save process if the ObjectState property is set to Disconnected. If the ObjectState property is set to Connected then the Insert command is sent to the database immediatly. Returns:
| ||||||||||||||||||
![]() | Load | Load Loads all the field's values with values from the database for the specified primary key column values. You must specify value for each primary key column in the PrimaryKeyFields collection. If the ObjectState value is set to Disconnected then this method will try to load the values from the data stored in the ResultSet property. This method will try to find a row that matches the primary key values from the data set and will not initiate a call to the database. This can be useful if the data set is being populated from a different source than a database, i.e. a web service or an xml file etc. This is only application starting version 3.x which introduced the object's disconnected model. NOTE: This will automatically switch the UseInSearch property on all Fields to false except the PrimaryKeyFields, as they will be set to true. Also, the IsLoaded property will be set to true if the function was able to load the values. Returns:
| ||||||||||||||||||
![]() | LoadChild | LoadChild Calls the Load method on the passed in child business object contained in the join.JoinedObject. Parameters:
Returns:
| ||||||||||||||||||
![]() | LoadFromDataRow | LoadFromDataRow Loads all the field's values with values from the data row with matching column names. Parameters:
Returns:
| ||||||||||||||||||
![]() | LoadOriginalFromDataRow | LoadOriginalFromDataRow Loads all the field's values with values from the data row with matching column names into the OriginalFields collection. Parameters:
Returns:
| ||||||||||||||||||
![]() | LoadOriginalFromHashtable | LoadOriginalFromHashtable Loads all the field's original values with values from the Hashtable with matching column names into the OriginalFields collection. Parameters:
Returns:
| ||||||||||||||||||
![]() | LoadParent | LoadParent Calls the Load method on the passed in parent business object contained in the join.JoinedObject. Parameters:
Returns:
| ||||||||||||||||||
![]() | Maximum | Maximum Gets the maximum value of the passed in field from the database that match the criteria (if any provided). The value is returned in the same field object. This method will in addition set the AffectedRecords property with the number of records returned by this method. If the ObjectState is Disconnected this method returns false. Returns:
| ||||||||||||||||||
![]() | Minimum | Minimum Gets the minimum value of the passed in field from the database that match the criteria (if any provided). The value is returned in the same field object. This method will in addition set the AffectedRecords property with the number of records returned by this method. If the ObjectState is Disconnected this method returns false. Returns:
| ||||||||||||||||||
![]() | Return_bool |
Return_bool
If the passed in parameter is null, this method returns a false value. If the passed in object is not null, this method casts the object to a Boolean value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_byte |
Return_byte
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to a Int16 value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_DateTime |
Return_DateTime
If the passed in parameter is null, this method returns the minimum value supported by the DateTime object as the value. If the passed in object is not null, this method casts the object to a DateTime value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_decimal |
Return_decimal
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to an Decimal value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_double |
Return_double
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to an Double value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_int |
Return_int
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to an Int32 value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_long |
Return_long
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to a Int64 value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_short |
Return_short
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to a Int16 value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_string |
Return_string
If the passed in parameter is null, this method returns a "" (blank String). If the passed in object is not null, this method casts the object to a String value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_uint |
Return_uint
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to a UInt32 value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_ulong |
Return_ulong
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to a UInt64 value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_ushort |
Return_ushort
If the passed in parameter is null, this method returns a 0 (zero). If the passed in object is not null, this method casts the object to a UInt16 value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | Return_XmlDocument |
Return_XmlDocument
If the passed in parameter is null, this method returns the minimum value supported by the XmlDocument object as the value. If the passed in object is not null, this method casts the object to a XmlDocument value and returns the result. NOTE: This method is marked for deletion, please do not use. This method will be removed after two major releases. Please modify any references you may have to these methods and use the corresponding method in Utilities class. | ||||||||||||||||||
![]() | RollBackTransaction | RollBackTransaction
Performs a RollBack on the active SQL Transaction held in DBTransaction member variable, and then Disposes the transaction object, closes the connection object and sets it to null. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) | ||||||||||||||||||
![]() | RunSessionEndCommand | RunSessionEndCommand Runs the command specified in the SessionEndCommand property. It is not necessary to call this method as the SessionEndCommand is automatically run when the database connection object is being disposed. This method is however provided for convenience in case you need to run this command several times in a session. All parameters assigned to the SessionEndParameters are also used to provide parameters to the command as well. | ||||||||||||||||||
![]() | RunSessionStartCommand | RunSessionStartCommand Runs the command specified in the SessionStartCommand property. It is not necessary to call this method as the SessionStartCommand is automatically run when the database connection is opened. This method is however provided for convenience in case you need to run this command several times in a session. All parameters assigned to the SessionStartParameters are also used to provide parameters to the command as well. | ||||||||||||||||||
![]() | RunSPReturnDataReader | RunSPReturnDataReader This method runs a Stored procedure and returns a data reader object Parameters:
Returns:
| ||||||||||||||||||
![]() | RunSPReturnDataset | Overloaded. RunSPReturnDataset This method runs a Stored procedure and returns a dataset. Parameters:
Returns:
| ||||||||||||||||||
![]() | RunSPWithNoReturn | Overloaded. RunSPWithNoReturn This method runs a Stored procedure and does not return any result set Parameters:
Returns:
| ||||||||||||||||||
![]() | RunSQLReturnDataset | Overloaded. RunSQLReturnDataset This method runs a SQL Command and returns a dataset. Parameters:
Returns:
| ||||||||||||||||||
![]() | RunSQLWithNoReturn | Overloaded. RunSQLWithNoReturn This method runs a SQL Command and returns the number of records affected. Parameters:
Returns:
| ||||||||||||||||||
![]() | Save | Save method can be used to synchronize any changes made to this object or its
related objects. If the current ObjectState is set to Disconnected, calling Save
method will change the object state to "Connected" and the Save method will attempt
to send all inserts/updates/deletes locally held to the database. Save method also tries to save any of the related/joined object's locally held changes. If the UseTransaction property is set to true, any records failure will cause the transaction to be rolled back. If all records/changes have been saved correctly without any errors/exceptions then the transaction will be automatically committed. If however the UseTransaction property is set to false then the ErrorString property will be populated with errors for each row that failed. | ||||||||||||||||||
![]() | SetDatabaseType | SetDatabaseType Takes a String as the parameter and sets the DBType property with the type of database to which this object will be connecting. Parameters:
| ||||||||||||||||||
![]() | SetSqlParamType | SetSqlParamType - This method can be used to set the appropriate DBType property of the parameter. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObjectSQL) | ||||||||||||||||||
![]() | Sum | Sum Gets the sum value of the passed in field from the database that match the criteria (if any provided). The value is returned in the same field object. This method will in addition set the AffectedRecords property with the number of records returned by this method. If the ObjectState is Disconnected this method will return false. Returns:
| ||||||||||||||||||
![]() | Update | Overloaded. Update Runs an Update command with the fields marked with UseInSave as true. This method expects that all the primary key values have been specified. If the Recursive property is set to anything other than None this Update will further call Update methods of the joined objects as well. This method will reset the AffectedRecords property to the number of rows updated. Business object must have at least one primary key field defined for this operation to work. NOTE: As of version 3.x this method preserves each field's UseInSearch values, and does not reset any of the property values unlike the version 2.x and older did. Also starting version 3.x this method will retain any updated values for a later sync/save process if the ObjectState property is set to Disconnected. If the ObjectState property is set to Connected then the Update command is sent to the database immediatly. Returns:
| ||||||||||||||||||
![]() | UseAllFieldsForDisplay | Overloaded. UseAllFieldsForDisplay Resets all the field's Visible properties with the passed in value of use parameter. No joined objects are affected. Parameters:
| ||||||||||||||||||
![]() | UseAllFieldsForSave | UseAllFieldsForSave Resets all the field's UseInSave properties with the passed in value of use parameter. No joined objects are affected. Parameters:
| ||||||||||||||||||
![]() | UseAllFieldsForSearch | Overloaded. UseAllFieldsForSearch Resets all the field's UseInSearch properties with the passed in value of use parameter. No joined objects are affected. Parameters:
|
| Name | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
![]() | EnsureConnectionString | EnsureConnectionString Checks the ConnectionString property and if it is nont set, it will try to get the Configuration / AppSettings / key (1.1 Framework) or Configuration / ConnectionStrings / key (2.0 Framework) that defines the database connection String. Calling this method is not needed in normal scenarios. This will be needed only if you are changing the ConnectionStringConfigName property through the code and would want to ensure that the new value is loaded from the configuration file and the ConnectionString property is updated accordingly. If you are calling EnsureDatabaseType method as well then you don't need to do that as EnsureDatabaseType is called by the EnsureConnectionString. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObject) | ||||||||
![]() | EnsureDatabaseType | EnsureDatabaseType Checks the DBType property and if it is set to None, it will try to get the Configuration / AppSettings / key that defines the DBType. Calling this method is not needed in normal scenarios. This will be needed only if you are changing the DatabaseTypeConfigName property through the code and would want to ensure that the new value is loaded from the configuration file and the DBType property is updated accordingly. If you are calling EnsureConnectionString method as well then you don't need to call EnsureDatabaseType as it is called by the EnsureConnectionString. (Inherited from Akal.QuickObjects.DBLibrary.DatabaseObject) | ||||||||
![]() | GetNewAdapterInstance | GetNewAdapterInstance GetNewAdapterInstance creates a new instance of IDbDataAdapter compatible data adapter depending on the type of connection object stored in DBConnection property. If the DBConnection property holds an OracleConnection then a OracleDataAdapter is created, however if the DBConnection property holds an SqlConnection then a SqlDataAdapter is created. The passed in command object is passed to the data adapter. The command object must match the connection type i.e. If the DBConnection is set to SqlConnection then an instance of SqlCommand must be passed. In normal scenarios there will not be a need to call this method, but it is provided for situations where a complex query has to be run which is not supported directly by this library. Parameters:
Returns:
| ||||||||
![]() | OnAfterDelete | Invoked after the object has executed the Delete command. | ||||||||
![]() | OnAfterFind | Invoked after the object has executed the Find command. | ||||||||
![]() | OnAfterInsert | Invoked after the object has executed the Insert command. | ||||||||
![]() | OnAfterLoad | Invoked after the object has executed the Load command. | ||||||||
![]() | OnAfterUpdate | Invoked after the object has executed the Update command. | ||||||||
![]() | OnBeforeDelete | Invoked when the object is about to execute the Delete command. | ||||||||
![]() | OnBeforeFind | Invoked when the object is about to execute the Find command. | ||||||||
![]() | OnBeforeInsert | Invoked when the object is about to execute the Insert command. | ||||||||
![]() | OnBeforeLoad | Invoked when the object is about to execute the Load command. | ||||||||
![]() | OnBeforeUpdate | Invoked when the object is about to execute the Update command. | ||||||||
![]() | OnObjectDisposing | Invoked when the object is being disposed. | ||||||||
![]() | OnObjectInitialized | Invoked when the object is initialized. |
| Name | Description | |
|---|---|---|
![]() | AfterDelete | Occurs after an object executes Delete command. The Success member of the event arguments can be used to determine if the command executed successfully. |
![]() | AfterFind | Occurs after an object executes Find command. The Success member of the event arguments can be used to determine if the command executed successfully. |
![]() | AfterInsert | Occurs after an object executes Insert command. The Success member of the event arguments can be used to determine if the command executed successfully. |
![]() | AfterLoad | Occurs after an object executes Load command. The Success member of the event arguments can be used to determine if the command executed successfully. |
![]() | AfterUpdate | Occurs after an object executes Update command. The Success member of the event arguments can be used to determine if the command executed successfully. |
![]() | BeforeDelete | Occurs when an object is about to execute Delete command. This event can be used to cancel the command, by setting the Cancelled member of the event arguments. |
![]() | BeforeFind | Occurs when an object is about to execute Find command. This event can be used to cancel the command, by setting the Cancelled member of the event arguments. |
![]() | BeforeInsert | Occurs when an object is about to execute Insert command. This event can be used to cancel the command, by setting the Cancelled member of the event arguments. |
![]() | BeforeLoad | Occurs when an object is about to execute Load command. This event can be used to cancel the command, by setting the Cancelled member of the event arguments. |
![]() | BeforeUpdate | Occurs when an object is about to execute Update command. This event can be used to cancel the command, by setting the Cancelled member of the event arguments. |
![]() | ObjectDisposing | Occurs when an object instance is being disposed. |
![]() | ObjectInitialized | Occurs when an object instance is initialized. |




