/ LJCPHPCodeDoc / LJCDataManagerLib / LJCDataManager


Syntax

PHP
class LJCDataManager

Provides Standard DB Table methods.

Remarks

The DataManager class provides a higher level of abstraction on top of the DataAccess class.

It does not require the developer to create SQL statements. Instead the developer can use strongly typed DataObjects, KeyColumn definitions, Join definitions and Included PropertyNames arrays to interact with the database.

The DataManager retrieves the Table SchemaColumn Definitions from the database. It uses these definitions to create the SQL statements and modifies them based on KeyColumn definitions, Join definitions and PropertyNames arrays.

The retrieved data can be mapped into strongly typed DataObjects using the methods CreateDataCollection() and CreateDataObject().

Public Functions
Constructor Methods
construct Initializes a class instance with the provided values.
Data Methods
Add Adds the record for the provided values.
Delete Deletes the records for the provided values.
DeleteSQL Creates the Delete SQL.
Load Loads the records for the provided values.
LoadSQL Creates the Load SQL.
Retrieve Retrieves the record for the provided values.
RetrieveSQL Creates the Retrieve SQL.
Update Updates the records for the provided values.
UpdateSQL Creates the Update SQL.
SQLExecute Executes an Add, Delete or Update SQL statement.
SQLLoad Executes a Select SQL statement.
SQLRetrieve Executes a Select SQL statement.
Schema Methods
Columns Get the schema columns that match the property names.
MapNames Sets PropertyName, RenameAs and Caption values for a schema column.
PropertyNames Creates a PropertyNames list from the data definition.
ORM Methods
CreateDataCollection Creates an array of typed Data Objects from a DB rows array.
CreateDataObject Populates a typed Data Object with values from a DB row.
Other Methods
CreateResultKeys _FunctionSummary_
19 Functions

Public Properties
$ClassName The class name for debugging.
$DataAccess The DbAccess object.
$DebugText The debug text.
$Joins The Join definitions.
$OrderByNames The OrderBy names.
$SchemaColumns The column definitions.
$SQL The last SQL statement.
$TableName The table name.

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.