dotr\Maia\Builder
CLASS BuildCrud

CLASS dotr.Maia.Builder.BuildCrud INHERITS Basic

Maia crud builder

extends the basic builder to add methods to build crud files from the crud.i template provided
Author:
Julian Lyndon-Smith (julian+maia@dotr.com)

Method Summary
CONSTRUCTOR (ObjectConfig p_ObjectConfig)
           
VOID CreateAssign (Directive p_Directive)
           void method to insert assign code after the create statement
VOID crud_WriteRecord_CatchError (Directive p_Directive)
           catch any errors while saving the record
VOID crud_WriteRecord_NotFound (Directive p_Directive)
           what should we do if the supplied record is not found ?
VOID CrudDelete (Directive p_Directive)
           delete phrase of crud
VOID crudGetFound (Directive p_Directive)
           create statement to assign database fields to properties
VOID crudGetNotFound (Directive p_Directive)
           void method to insert "not found" code
VOID CrudUpdateAssign (Directive p_Directive)
           create statement to assign properties to database fields
VOID DefineCrudEvent (Directive p_Directive)
           define an event in the crud class
VOID GenerateGUID (Directive p_Directive)
           generate guid statements
VOID GetUnknown (Directive p_Directive)
           what should we do if there is an unknown value passed to the get method ?
VOID NextValue (Directive p_Directive)
           generate next-value statements
 

Method Detail

CONSTRUCTOR

CONSTRUCTOR(ObjectConfig p_ObjectConfig)

CreateAssign

PUBLIC VOID CreateAssign(Directive p_Directive)
void method to insert assign code after the create statement

placeholder to show how to implement a build method. See _Maia-Template/crud.i
Parameters:
p_Directive - : holds the directive name and all parameters

crud_WriteRecord_CatchError

PUBLIC VOID crud_WriteRecord_CatchError(Directive p_Directive)
catch any errors while saving the record

Parameters:
p_Directive - : holds the directive name and all parameters

crud_WriteRecord_NotFound

PUBLIC VOID crud_WriteRecord_NotFound(Directive p_Directive)
what should we do if the supplied record is not found ?

Parameters:
p_Directive - : holds the directive name and all parameters

CrudDelete

PUBLIC VOID CrudDelete(Directive p_Directive)
delete phrase of crud

Parameters:
p_Directive - : holds the directive name and all parameters

crudGetFound

PUBLIC VOID crudGetFound(Directive p_Directive)
create statement to assign database fields to properties

Parameters:
p_Directive - : holds the directive name and all parameters

crudGetNotFound

PUBLIC VOID crudGetNotFound(Directive p_Directive)
void method to insert "not found" code

placeholder to show how to implement a build method. See _Maia-Template/crud.i
Parameters:
p_Directive - : holds the directive name and all parameters

CrudUpdateAssign

PUBLIC VOID CrudUpdateAssign(Directive p_Directive)
create statement to assign properties to database fields

Parameters:
p_Directive - : holds the directive name and all parameters

DefineCrudEvent

PUBLIC VOID DefineCrudEvent(Directive p_Directive)
define an event in the crud class

Parameters:
p_Directive - : holds the directive name and all parameters

GenerateGUID

PUBLIC VOID GenerateGUID(Directive p_Directive)
generate guid statements

loop through all properties configured with a generateGUID flag and generate a next-value statement only set the property if it is currently unknown or ""
Parameters:
p_Directive - : holds the directive name and all parameters

GetUnknown

PUBLIC VOID GetUnknown(Directive p_Directive)
what should we do if there is an unknown value passed to the get method ?

Parameters:
p_Directive - : holds the directive name and all parameters

NextValue

PUBLIC VOID NextValue(Directive p_Directive)
generate next-value statements

loop through all properties configured with a sequence and generate a next-value statement only set the property if it is currently unknown or 0
Parameters:
p_Directive - : holds the directive name and all parameters