Class PBETable

Object
  |
  +--PBEUnit
        |
        +--PBEObject
              |
              +--PBEContainer
                    |
                    +--PBETable
Direct Known Subclasses:
PBELinkedTable, PBELinkTable

public class PBETable
extends PBEContainer


Description:
PBETable provides functionality to access tables in PrimeBase Enterprise Objects applications.


PBE Attributes/Fields:

pbe_order_list


PBE Methods:

clear, delete, enter, find, init, new, refresh, revert, save


Examples:
 PBE:declareObject(
   "PBETable",
   "product",
   "pbedemo!Common.Products",
   "num",
   "name");
 
This example creates an object of class PBETable with name "product". The object accesses table "Common.Products" in Database "pbedemo". The primary key of this table is "num" and any search results of this object are ordered by the column "name".

This example can be found in the file "initdemo.pbt" of the "PBE Demo" module (approx. line 197).


Field Summary
 varchar keyList
           
 
Fields inherited from class PBEContainer
iCurrentGroup, iFirstGroup, iLastGroup, iPages, iSelected, iSelection
 
Fields inherited from class PBEObject
attributes, iClearInput, methods, name
 
Constructor Summary
PBETable(varchar name)
          This constructor is provided to detect incorrect usage of PBETable only; do not use this constructor.
PBETable(varchar name, varchar table, varchar keycols)
           
PBETable(varchar name, varchar table, varchar keycols, varchar ordercols)
           
 
Method Summary
protected  boolean activateAfter(varchar method)
           
protected  boolean activateBefore(varchar method)
           
 void addLink(PBETable object)
          Add an object to be linked on activation.
 varchar attributeName(varchar tag_name)
           
 void clearEditBuffer()
           
 void clearEditRow()
           
 void clearInput()
           
 void createLink(varchar ref_table)
          Link this object to the given object.
 generic doAfterLinks(varchar method)
          Activate all linked tables after activation.
 generic doBeforeLinks(varchar method)
          Activate all linked tables before activation.
 generic getAttributeStatus(varchar tag_name)
           
 integer getColType(generic col)
           
 varchar getColumnStatus(objname col)
           
 varchar getCurrentLink()
          Return the name of the current linking method.
protected  generic getCurrentRowValue(objname col, boolean is_edit, generic default_value)
           
 generic getInvalidValue(objname col, boolean is_edit, generic default_value)
           
 integer getModifiedRowCount()
           
 integer getModifiedRowNumber(integer index)
           
 varchar getOrderList()
           
 objname getTableName()
           
 boolean init()
          A linked table is initialized when the table to which it is linked is initialized.
 void initEditBuffer(Cursor c)
           
 void inputMethod(varchar tag_name, generic value, boolean is_first)
           
 void inputValue(varchar tag_name, generic value, boolean is_first)
           
 boolean isLinked()
          Return $true of this table is linked by other tables.
 boolean linkAfter(varchar method)
          Activate methods after the linked table activates it's method.
 boolean linkBefore(varchar method)
          Activate methods before the linked table activates it's method.
 boolean linkDelete()
           
 boolean linkFind()
           
 boolean linkInit()
           
 boolean linkNew()
           
 boolean linkRevert()
           
 PBETable links()
          Return the object which this tables links.
 PBETable links()
          Return the object which this tables links.
 boolean linkSave()
           
 boolean modifySelection()
           
 boolean performActivation(varchar name)
           
 void setAllSelected()
           
 void setAttributeStatus(varchar tag_name, varchar result)
           
 void setColumnStatus(objname col, generic err)
           
 void setCurrentValue(objname col, generic v, boolean is_first)
           
 void setEditRow(Cursor c)
           
 void setError(generic status)
           
 generic toDataBaseType(generic col, generic v)
           
 void updateRow(PBEImage image)
           
 
Methods inherited from class PBEContainer
addGroup, currentColor, currentColor, currentRowStatus, currentRowValid, deleteRow, enterGroup, enterPage, exitGroup, exitPage, firstRow, getCurrentRow, getCurrentValue, getRowCount, getSelectedRow, getSelection, getValidRow, insertRow, lastRow, nextCurrentRow, nextCurrentRow, nextRow, outputValue, previousRow, setCurrentRow, setCurrentRowValue, setSelectedRow, setSelection, sum, updateRow
 
Methods inherited from class PBEObject
clear, disable, disableAttributes, display, enable, enableAttributes, getAttributeStatus, getError, globalReference, hide, inputMethod, outputValue, outputValue, prepareAction, redirect, setActive, show
 
Methods inherited from class PBEUnit
compileActions, compileConditions, prepareEvent
 

Field Detail

keyList

public varchar keyList
Constructor Detail

PBETable

public PBETable(varchar name)
This constructor is provided to detect incorrect usage of PBETable only; do not use this constructor.

Parameters:
name - the name used to access this object.

PBETable

public PBETable(varchar name,
                varchar table,
                varchar keycols)
Parameters:
name - the name used to access this object.
table - the complete database table name (e.g. "pbedemo!common.customers") this object should access.
keycols - a comma separated list of the key columns of the specified database table.

PBETable

public PBETable(varchar name,
                varchar table,
                varchar keycols,
                varchar ordercols)
Parameters:
name - the name used to access this object.
table - the complete database table name (e.g. "pbedemo!common.customers") this object should access.
keycols - a comma separated list of the key columns of the specified database table.
ordercols - a comma separated list of columns by which rows in this object should be ordered after a find. The keywords "asc" (default) and "desc" may be used to order ascending or descending.
Method Detail

init

public boolean init()
A linked table is initialized when the table to which it is linked is initialized. As a result, we do nothing in this routine:
Overrides:
init in class PBEObject

performActivation

public boolean performActivation(varchar name)
Overrides:
performActivation in class PBEObject

getTableName

public objname getTableName()

attributeName

public varchar attributeName(varchar tag_name)
Overrides:
attributeName in class PBEObject

inputValue

public void inputValue(varchar tag_name,
                       generic value,
                       boolean is_first)
Overrides:
inputValue in class PBEObject

inputMethod

public void inputMethod(varchar tag_name,
                        generic value,
                        boolean is_first)
Overrides:
inputMethod in class PBEObject

getAttributeStatus

public generic getAttributeStatus(varchar tag_name)
Overrides:
getAttributeStatus in class PBEObject

setAttributeStatus

public void setAttributeStatus(varchar tag_name,
                               varchar result)
Overrides:
setAttributeStatus in class PBEObject

setError

public void setError(generic status)
Overrides:
setError in class PBEObject

getCurrentRowValue

protected generic getCurrentRowValue(objname col,
                                     boolean is_edit,
                                     generic default_value)
Overrides:
getCurrentRowValue in class PBEContainer

getInvalidValue

public generic getInvalidValue(objname col,
                               boolean is_edit,
                               generic default_value)
Overrides:
getInvalidValue in class PBEContainer

setCurrentValue

public void setCurrentValue(objname col,
                            generic v,
                            boolean is_first)
Overrides:
setCurrentValue in class PBEContainer

toDataBaseType

public generic toDataBaseType(generic col,
                              generic v)

getColumnStatus

public varchar getColumnStatus(objname col)

setColumnStatus

public void setColumnStatus(objname col,
                            generic err)

clearEditBuffer

public void clearEditBuffer()

clearEditRow

public void clearEditRow()

setEditRow

public void setEditRow(Cursor c)

initEditBuffer

public void initEditBuffer(Cursor c)

getModifiedRowCount

public integer getModifiedRowCount()

getModifiedRowNumber

public integer getModifiedRowNumber(integer index)

getColType

public integer getColType(generic col)

setAllSelected

public void setAllSelected()

modifySelection

public boolean modifySelection()

updateRow

public void updateRow(PBEImage image)

getOrderList

public varchar getOrderList()

addLink

public void addLink(PBETable object)
Add an object to be linked on activation.

doBeforeLinks

public generic doBeforeLinks(varchar method)
Activate all linked tables before activation.

doAfterLinks

public generic doAfterLinks(varchar method)
Activate all linked tables after activation.

links

public PBETable links()
Return the object which this tables links.

isLinked

public boolean isLinked()
Return $true of this table is linked by other tables.

clearInput

public void clearInput()
Overrides:
clearInput in class PBEObject

createLink

public void createLink(varchar ref_table)
Link this object to the given object.

getCurrentLink

public varchar getCurrentLink()
Return the name of the current linking method.

links

public PBETable links()
Return the object which this tables links.

activateBefore

protected boolean activateBefore(varchar method)

linkBefore

public boolean linkBefore(varchar method)
Activate methods before the linked table activates it's method.

activateAfter

protected boolean activateAfter(varchar method)

linkAfter

public boolean linkAfter(varchar method)
Activate methods after the linked table activates it's method.

linkInit

public boolean linkInit()

linkFind

public boolean linkFind()

linkRevert

public boolean linkRevert()

linkNew

public boolean linkNew()

linkSave

public boolean linkSave()

linkDelete

public boolean linkDelete()