Contents
Component IDEPersistence
comment:Base Persistence Interface for Version Control System
This is two level interface.
In this component are mixinsaddapter for class and component.
The wrapers are called Descriptions and they hold such information as
comments and versionsinfo.
The xotcl method becomes also an wrapper IDE::MethodDescription
IDE::Component -> IDE::ComponentPersisence
Class -> IDE::ClassDescription
method -> IDE::MethodDesciption
The Class description are places as subobject description in Class Object
Class A
description is in
A::description
The methods description are also subobject of class description.
The mixins overwrite the class methods proc, insproc, parameter, class
to delegate the stucture change to version control system.
The sql interface is based on xdobry::sql (currently mysql, postgres, odbc)
Classes
Classes Hierarchy
Objects
Class IDE::AbstractMethodGroup
superclasses:
IDE::DBPersistence
IDE::DBInfo
subclasses:
IDE::ProcsGroupPer
IDE::ObjectDescription
comment:This is the abstract root class for all tcl/xotcl structure elements which
group methods.
For example: Xotcl Class, Xotcl Objects, Tcl Procs Group
Instprocs:
- changeVersionTo {objectId}
- createFromDB {methodId}
- getComponent {}
- getComponentId {}
- getDescriptor {}
- loadAllMethods {}
- loadMethod {methodId}
- loadPrevious {}
- makeTransistent {}
- questForChangeParent {}
- rereadForAnotherVersion {objectid}
- setRelationshipToComponent {}
- synchronizeMethods {}
- synchronizeWithId {id}
- trackingOn {}
- updateVersion {}
Class IDE::CachedObject
subclasses:
IDE::SimplePersistenceClass
IDE::ComponentConfWrapper
IDE::ConfigurationMap
comment:See IDE::ObjectCach
Used dynamic as mixin for persistent objects (derived form IDE::DBPersistence).
Instprocs:
- destroy {}
- Used as mixin for persistence objects (derived from IDE::DBPersistence).
This mixin give functionality for caching objects and also recognizing
their destroying. The caching is needed to garant object identity
among xotcl object and object stored in database
- makePersistent {}
Class IDE::ClassDescription
superclasses:
IDE::ObjectDescription
Instprocs:
- deleteInstanceMethod {method}
- getForAnotherVersionInstanceMethod {name id}
- getInstanceMethod {name}
- getInstanceMethodBody {method}
- getInstanceMethodIfExist {name}
- getMethodId {name}
- getType {}
- importAllMethods {}
- instproc {procname arguments body args}
- moveToCategory {method category}
- parameter {args}
- registerInstanceMethod {name}
- setDefBody {body}
- setParameterReread {parameter}
- setSuperclassReread {superclass}
- superclass {args}
- trackingOn {}
Procs:
- typeName {}
- unknown {args}
Class IDE::ClassMethodDescription
superclasses:
IDE::MethodDescription
Instprocs:
- getBody {}
- getCategory {}
- getType {}
- setCategory {category}
- undefine {}
Procs:
- unknown {args}
Class IDE::ComponentPersistence
superclasses:
IDE::DBPersistence
IDE::DBInfo
Instprocs:
- addClass {obj}
- addObject {obj}
- addProcsGroup {obj}
- checkRequirementsForClass {class}
- computeRequirements {}
- createTclProcsGroupByLoading {name withNamespace}
- getDescriptor {}
- getName {}
- getObject {name}
- getVersionNumber {}
- importAllObjects {}
- initForPersistence {}
- installObject {obj}
- loadAllObjects {}
- loadObject {objectid}
- printString {}
- questForChange {}
- questForChangeParent {}
- readRequiredFromDB {}
- registerObject {obj}
- removeClass {obj}
- removeObject {obj}
- removeProcsGroup {pgroup}
- rename {newname}
- reorderObjectDefinition {}
- rereadForAnotherVersion {componentId}
- setObjectsArray {arr_ref}
- setRequirements {reqlist}
- synchronizeWithDB {}
- updateInsert {}
- updateRequired {}
- updateVersion {}
- versionEdition {}
Procs:
- create {args}
- getAdditionalInfo {componentId}
- getAvailable {}
- getLoadedVersionForName {name}
- getVersionsForName {name}
- importComponent {comp}
- initDescriptor {}
- initFromDB {columns values componentid}
- loadNameVersionId {name componentId compObj}
- loadVersionId {componentId}
- Use loadNameVersionId to reload another version of component.
Use it if you have only componentid
- questIdForComponentName {name}
- readRequiredForId {componentId}
- rekRequirementsList {componentId componentList}
- removeForEver {componentName}
- synchronizeComponent {comp}
- synchronizeCoreSystem {}
- typeName {}
Class IDE::DBInfo
subclasses:
IDE::ConfigurationMap
IDE::ComponentPersistence
IDE::TclProcsDescriptionPer
IDE::AbstractMethodGroup
IDE::MethodDescription
comment:Handle comments on Version Control items
Instprocs:
- getComment {}
- hasComment {}
- makeCommentPersistent {}
- readCommentFromDB {}
- setComment {text}
- setInfoId {infoid}
Procs:
- addInfoToDescriptor {des}
Class IDE::DBMapping
parameter: table idColumn type {cached 0}
comment:This Object describe how the object inst variable are mapped to
sql database
you can specify
1. table name
2. mapped instances
3. standard getter and setter methods
To construct some persistence class you must
1. derivate it from IDE::Persistence
2. build a descriptor methode. The methode is build a descriptor object
of class IDE::DBMapping that is uselly placed as class::descriptor
3. Build a persisten creation methode nammed initFromDB $columns $values $id
this method shoul build a instance by reading the object from DB
Create a Persistence Instance.
1. Create a Instance and invoke method makePersistent
set inst [MyPersistent new]
$inst makePersistent
To Read a Persistent Instance from DB
class::desciptor createInstanceFromDB $class $id
MyPersistent::descriptor createInstanceFromDB MyPersistent 12
Or if you want to load a set of instances
class::descriotor createInstaceFromWhere $class $where_expression
Instprocs:
- addColumn {column}
- Column specifikation is a list
{variable name} {database type} {get_Method} {set_Method}
if get or set_Method are empty {} the hander fill directly the varible
if get or set_Method are _ : the value are ignored be reading or writting
data. It make sense be timestamp values which are produced from db
or be set_Method be values that can be ignored
- addRelationship {instance}
- checkSchema {}
- createInstanceFromDB {class id}
- createInstancesFromWhere {class where}
- createRelationshipProxies {instance}
- fillValues {object values}
- It is important that when the object are loaded first time
the primary key variable is not defeined
- getColumns {}
- getValueForObject {object column}
- initInstance {class cols values id}
- removeSchema {}
- setValueForObject {object column value}
Class IDE::DBPersistence
subclasses:
IDE::SimplePersistenceClass
IDE::ComponentConfWrapper
IDE::ConfigurationMap
IDE::User
IDE::ComponentPersistence
IDE::TclProcsDescriptionPer
IDE::AbstractMethodGroup
IDE::MethodDescription
comment:base functionality for XOTcl Version Control Persistence
1. time stamp
2. base version function
3. sql access
4. database persistece for xotcl objects
Instprocs:
- addRelationship {table values}
- copyRelationships {table index1 index2 value_old value_new}
- createNewEdition {}
- deleteRelationship {table where}
- getConnection {}
- getDescriptor {}
- getIdValue {}
- getInsertValues {columns_ref}
- Return values for specified columns using DB Mapping
- getName {}
- getRelationshipIndexes {table getindex whereindex value}
- getTimeStampString {}
- getUserId {}
- getValueForColumns {cols}
- getVersionString {}
- increaseVersionInfo {}
- isInDB {}
- This method sould be used to check if
the object is saved (persistent) in database.
- isPersistent {}
- This method is more to ask if the object
is persistentable (also has Persistent interface)
- isclosed {}
- istOwnEdition {}
- makePersistent {}
- This method write object to database
It do not check if the object is already in database.
It genarate also always new primary key and one table row.
- makeTransient {}
- The method remove the corresponding representation of object
from database.
It do not remove another relationship rows.
The command is opposite to makePersistent
- maskstring {value}
- questForChange {}
- questForChangeParent {}
- questForOwn {}
- rereadAttributes {attrs}
- returnAffectedRows {}
- setMaxIdForMyName {}
- setTimeStamp {value}
- setVersionInfo {newver}
- sqlexecute {statement}
- updateAttributes {attrs}
- updateVersion {}
- versionEdition {}
Procs:
- dateFormat {date}
- getConnection {}
- getRelationshipIndexes {table getindex whereindex value}
- initSchema {}
- persistenceClasses {}
- queryAsList {statement}
- queryAsReport {statement}
- setConnection {conn_object}
Class IDE::DBRelMappingNM
parameter: name targetClass relationTable sourceName targetName orderIndexName
comment:This class is used as description for n:m realtionship mapping
It appera as subelemts in IDE::DBMapping stucts
Instprocs:
- addIndexForSourceId {pkValue index orderValue}
- changeOrderIndexForSourceId {pkValue index orderValue}
- checkSchema {}
- getIndexListForSourceId {pkValue}
- removeIndexForSourceId {pkValue index}
- removeSchema {}
Class IDE::InstanceMethodDescription
superclasses:
IDE::MethodDescription
Instprocs:
- getBody {}
- getCategory {}
- getObjectDescription {}
- getObjectName {}
- getType {}
- setCategory {category}
- undefine {}
Procs:
- unknown {args}
Class IDE::MethodDescription
superclasses:
IDE::DBPersistence
IDE::DBInfo
subclasses:
IDE::InstanceMethodDescription
IDE::ClassMethodDescription
comment:Wrapper for persistent tcl/xotcl method.
Instprocs:
- getCategory {}
- getDescriptor {}
- getName {}
- getObjectDescription {}
- getObjectId {}
- getObjectName {}
- insertVersion {}
- istFreshInserted {}
- loadPrevious {}
- makeTransistent {}
- printString {}
- printStringShort {}
- questForChangeParent {}
- rereadForAnotherVersion {methodId}
- synchronizeWithId {id}
- updateVersion {}
Procs:
- getFreshInserted {}
- initDescriptor {}
- unknown {args}
Class IDE::ObjectDescription
superclasses:
IDE::AbstractMethodGroup
subclasses:
IDE::ClassDescription
Instprocs:
- changeVersionTo {objectId}
- deleteClassMethod {method}
- getAdditionalInfo {methodId}
- getAvailable {}
- getClassMethod {name}
- getClassMethodBody {method}
- getClassMethodIfExist {name}
- getComponent {}
- getDefBody {}
- getForAnotherVersionClassMethod {name id}
- getLoadedVersionForName {name}
- getMetadataText {}
- getMethodComment {type method}
- getMethodDescriptions {}
- getMethodId {name}
- getName {}
- getObject {}
- getObjectName {}
- getType {}
- getVersionsForName {name}
- handleMethodChange {mobj class methodid}
- hasMethodComment {type method}
- importAllMethods {}
- initFromDB {columns values methodid}
- initObject {}
- insertVersion {}
- isTrackingOn {}
- loadNameVersionId {name methodId compObj}
- loadVersionId {methodId}
- moveToCategoryB {method category args}
- printString {}
- proc {procname arguments body args}
- registerClassMethod {name}
- rereadForAnotherVersion {objectId}
- setClassMethodsArray {arr_ref}
- setDefBody {body}
- setDeforder {order}
- setInstanceMethodsArray {arr_ref}
- setMetadataText {value}
- setMethodComment {type method text}
- synchronizeMethods {}
- trackingOff {}
- trackingOn {}
- typeName {}
Procs:
- createForObject {object}
- getAdditionalInfo {objectId}
- getAvailable {}
- getClassForType {type}
- getLoadedVersionForName {name}
- getVersionsForName {name}
- importObject {object}
- initDescriptor {}
- initFromDB {columns values objectid}
- loadNameVersionId {name objectId compObj}
- loadObject {objectId component}
- removeForEver {objectName}
- typeName {}
- unknown {args}
Class IDE::ProcsGroupPer
superclasses:
IDE::AbstractMethodGroup
Instprocs:
- createProcForName {name}
- getAdditionalInfo {methodId}
- getAvailable {}
- getForAnotherVersionMethod {}
- getLoadedVersionForName {name}
- getMetadataText {}
- getMethodDescriptions {}
- getType {}
- getVersionsForName {name}
- importAllMethods {}
- initFromDB {columns values methodid}
- initObject {}
- isTrackingOn {}
- moveToComponent {component}
- printString {}
- removeMethodObj {obj}
- rename {name}
- rereadDefinition {args}
- rereadForAnotherVersion {objectId}
- setDefBody {skript}
- setMetadataText {val}
- synchronizeMethods {}
- trackingOff {}
- trackingOn {}
Procs:
- installObject {obj}
- makePersistentAble {obj}
- synchronize {obj id}
- typeName {}
Class IDE::RelationshipProxy
parameter: relMapping
comment:This class must be used to set and read relationship.
In this implementation the client must use the proxy object
It is build as aggregated sub object in source object
the name is equal to relationship name
# n:m relationship named "sister" s1 to s2
#setting
s1::sister setList s2
#updating in db
s1::sister updateList
#reading
s1::sister getList
In this implementain the related object are first build by query. (also getList) in case of loading source object from DB.
intern:
The objects are hold in the variable "objectsList"
Instprocs:
- buildGroupList {newList oldList}
- checkIndexList {}
- This procedure check if the objectList is consistent with DB.
(if indexList varibale exist)
If no the datebase is queried and all relationship objects are build.
- forgetDBMapping {}
- getList {}
- getSourceInstance {}
- insertObjectAt {obj index}
- removeObject {obj}
- setList {olist}
- updateList {}
Class IDE::TclProcsDescriptionPer
superclasses:
IDE::DBPersistence
IDE::DBInfo
Instprocs:
- getCategory {}
- getDescription {}
- getDescriptor {}
- getObjectName {}
- getType {}
- handleScript {script}
- makeTransistent {}
- printString {}
- rereadForAnotherVersion {methodId}
- setCategory {dummy}
- synchronizeWithId {id}
- trackingOn {}
- undefine {}
- updateRelationship {}
Procs:
- addPersistence {obj}
- synchronize {obj id}
- unknown {args}
Class IDE::User
superclasses:
IDE::DBPersistence
comment:Handle owner of persistent elements as component, classes and methods.
The class check also standard user be reading unix (platform) envirorment
variable
Instprocs:
- getName {args}
Procs:
- createDefault {}
- getDefault {}
- getDefaultUserId {}
- getSystemUser {}
- initDefault {}
- initDescriptor {}
- initFromDB {columns values objectid}
- unknown {args}
Object IDE::ObjectCache
comment:This Object is used to cache all persistence object that are derived from
IDE::CachedObject.
By loading an Instance from DB the DB-Instance-Mapper look first in the cache to get the
instance if it has been already loaded.
The objects are referenced per value of DB-primarykey (id).
Procs:
- destroyInstancesOfClass {class}
- getInstance {class pkValue}
- removeInstance {instance}
- setInstance {instance}