Class CODBIDLIST

Name

CODBIDLIST  --  CODB class are destined to select objects by assertion and represenation its in table-navigationy mode.

Synopsis

 CODB_IdList(<oDbm>,<sMetaName>,<nIndex>,<sName>,<sWhereExpr>,<nCount>) --> CODBIDLIST object

Description

CODB class are destined to select objects by assertion and represenation its in table-navigationy mode.

Attributes

<ClassName> CODBIDLIST
<Error> String, the error description what araised within running last operation.

Methods

APPEND Append new object.
BOF Check BOF.
CLOSE Cancel job.
CODBIDLIST Constructor CODBIDLIST class.
DELETE Delete current object.
DEPOSITORY Returns object CDOBDEPOSITORY, what <::sMetaName> belong.
DICTIONARY Returns object CDOBDICTIONARY, what <::sMetaName> belong.
EOF Check EOF.
GETBLANK Returns object of class <sMetaName>
GETEXPR Compute expression for current object.
GETVALUE Get values of attribute.
GOBOTTOM Goes to last position.
GOTO Goes to the new position.
GOTOP Goes to first position.
IDEXIST Check object a existence storehouse.
LOCATE Locate first object, what equal some condition.
LOCATEREST Restore locate with old condition.
RECNO Returns current position.
REFRESH Refresh object list.
SETINDEX Set index.
SETWHERE Set new condition to object selection.
SKIP Move relative to the current position.
UPDATE Update object.

Method CODBIDLIST:APPEND()

 Append(<oData>) 	--> <sDataID>

Append() appends new object <oData> to storehouse as object of class <sMetaName> and returns objects identifier <sDataID>.

Class <sMetaName> - that class what was passed to constructor of CODBIDLIST.

<::Error> contain error descriptions if araised.

Method CODBIDLIST:BOF()

 Bof() 	--> TRUE || FALSE

Bof() returns TRUE if arrive at top of file.

Method CODBIDLIST:CLOSE()

 Close() 	--> TRUE

Close() closes dictionary or depository and canceles job.

Method CODBIDLIST:CODBIDLIST()

 CODB_IdList(<oDbm>,<sMetaName>,<nIndex>,<sName>,<sWhereExpr>,<nCount>) --> CODBIDLIST object

CODB_IdList() inits new CODBIDLIST object and returns it.

Method CODBIDLIST:DELETE()

 Delete() 	--> TRUE || FALSE

Delete() returns TRUE if current object deleted from a dictionary or from a depository. In other returns FALSE.

Method CODBIDLIST:DEPOSITORY()

 Depository() 	--> <oDep>

Depository() returns <oDep> object CDOBDEPOSITORY, what <::sMetaName> belong.

Method CODBIDLIST:DICTIONARY()

 Dictionary() 	--> <oDict>

Dictionary() returns <oDict> object CDOBDICTIONARY, what <::sMetaName> belong.

Method CODBIDLIST:EOF()

 Eof() 	--> TRUE || FALSE

Eof() returns TRUE if arrive at bottom of file.

Method CODBIDLIST:GETBLANK()

 GetBlank() 	--> <oData>

GetBlank() returns <oData> - the object of class <sMetaName>. All atributes <oData> filled values by default.

Class <sMetaName> - that class what was passed to constructor of CODBIDLIST.

Method CODBIDLIST:GETEXPR()

 GetExpr(<sExpr>) 	--> <vData>

GetExpr() compute expression for current object and returns result <vData>.

Method CODBIDLIST:GETVALUE()

 GetValue([<sAttrName>]) 	--> <vData>

GetValue() returns attribute value <vData> or if <sAttrName> not specified returns whole object.

Method CODBIDLIST:GOBOTTOM()

 GoBottom() 	--> FALSE
 GotoBottom() 	--> FALSE

GoBottom() and GotoBottom() goes to last position.

Method CODBIDLIST:GOTO()

 Goto(<nPos>]) 	--> TRUE || FALSE

Goto() goes to the new position <nPos>.

Method CODBIDLIST:GOTOP()

 GoTop() 	--> FALSE
 GotoTop() 	--> FALSE

GoTop() and GotoTop() goes to first position.

Method CODBIDLIST:IDEXIST()

 IdExist(<sDataID>) 	--> TRUE || FALSE

IdExist() returns TRUE if object with identifier <sDataID> exist into dictionary or depository.

Method CODBIDLIST:LOCATE()

 Locate(Expr) 	--> TRUE || FALSE

Locate() returns TRUE if object, what equal condition <Expr> is locate.

Method CODBIDLIST:LOCATEREST()

 LocateRest() 	--> TRUE || FALSE

LocateRest() returns TRUE if object, what equal previouse condition is locate.

Method CODBIDLIST:RECNO()

 Recno() 	--> <nPos>

Recno() returns <nPos> the current position.

Method CODBIDLIST:REFRESH()

 Refresh() 	--> NIL

Refresh() updates object list. Every object in this list is content strart conditions <sName> and <sWhereExpr>.

<sName> and <sWhereExpr> - that parameters what was passed to constructor of CODBIDLIST.

<::Error> contain error descriptions if araised.

Method CODBIDLIST:SETINDEX()

 SetIndex(<vIndex>) 	--> TRUE || FALSE

SetIndex() returns TRUE if index with number <vIndex> or with name <vIndex> setted. In other returns FALSE.

Method CODBIDLIST:SETWHERE()

 SetWhere(<sWhereExpr>) 	--> NIL

SetWhere() sets new condition <sWhereExpr> to object selection.

Method CODBIDLIST:SKIP()

 Skip([<nSkip>]) 	--> NIL

Skip() moves either forward or backward relative to the current position.

If <nSkip> not specified, it is 1.

Method CODBIDLIST:UPDATE()

 Update(<oData>) 	--> TRUE || FALSE

Update() updates object <oData> into storehouse. If dictionary or depository have not object with identifier <oData:ID>, Update() returns FALSE.

<::Error> contain error descriptions if araised.

Example:

 oDep := coDepository():new("MY00101")
 oDict := oDep:dictionary()
 currency := oDict:classBodyByName("currency")
 
 * select all objects of currency class whose attribute <CODE> begin with "U"
 idList:= codb_idList(currency:id,,,'code="U"')
 while !idList:eof()
 obj := idList:getValue()
 ? obj:code, obj:name
 idList:skip()
 end
 

See also

CODBDICTIONARY CODBDEPOSITORY

Platforms

No dependies of platform.