ERP/3.0/Developers Guide/Database Model/org.openbravo.model.ad.utility/ad table tree
ad_table_tree
- Name:ad_table_tree
- Classname:ADTableTree
This table contains the following columns:
Name | Nullable | Data Type | Description
|
AD_Table_Tree_ID | No | VARCHAR (32) | Tree tables can define several tree structures. If a table tree structure is set in this field, the tab will include a tree view that will allow to browse the data hierarchically. |
Isactive | No | CHAR (1) | There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records:
(1) The system requires the record for auditing purposes. (2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions. |
Applywhereclausetochildnodes | No | CHAR (1) | By default, the HQL where clause of the tab is applied to all nodes. If this checkbox is unset, then this where clause will be applied only to root nodes. |
AD_Client_ID | No | VARCHAR (32) | A Client is a company or a legal entity. You cannot share data between Clients. |
Createdby | No | VARCHAR (32) | The Created By field indicates the user who created this record. |
Created | No | TIMESTAMP (7) | The Created field indicates the date that this record was created. |
Obserds_Datasource_ID | Yes | VARCHAR (32) | Datasource used to feed the table |
Hasmultiparentnodes | No | CHAR (1) | If the data of the table cannot be strictly represented as a tree because each node can have several parents, this checkbox must be flagged. |
Isordered | No | CHAR (1) | The trees that use the ADTreeNode structure can be defined as ordered. In that case, the position of a node among its brothers is defined by a sequence number. |
Isparentselectionallowed | No | CHAR (1) | This property is used to define if non-leaf nodes are allowed to be selected in a tree reference. |
Ismaintree | No | CHAR (1) | A table can define several trees, but only one of them can be the main tree. The main tree is used when a node is added to the tree or removed from it. The add or remove methods of the datasource of the main tree will be executed when the node is created or deleted.
If one of the trees of a table uses the ADTree tree structure, that must be the main tree. |
Linktoparentcolumn | Yes | VARCHAR (32) | This field is only used in Link To Parent tables. This field represents the column that points to the node id of the row that represents the parent of a node |
AD_Module_ID | No | VARCHAR (32) | Indicates the module the element forms part of. |
Name | No | VARCHAR (200) | A more descriptive identifier (that does need to be unique) of a record/document that is used as a default search option along with the search key (that is unique and mostly shorter). It is up to 60 characters in length. |
NodeDeletionPolicy | No | VARCHAR (60) | It defines the behavior when a node item is deleted |
Nodeidcolumn | Yes | VARCHAR (32) | For Link to Parent tables: column that represents the id of the node. Usually the id column should be used. |
AD_Org_ID | No | VARCHAR (32) | An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations. |
AD_Table_ID | Yes | VARCHAR (32) | The Table indicates the table in which a field or fields reside. |
Treestructure | No | VARCHAR (60) | Three different tree structures are available:
- AD Tree Node: The information regarding the hierarchy of the data is stored in the ADTree and ADTreeNode tables. - Link to Parent in Table: This structure can be used when the informartion regarding the hierarchy of the data can be fetched from the own table. In this case, there has to be a column in the table that points to the row that represents the parent node of the record. - Custom: For other tree tables, a manual datasource can be defined |
Updated | No | TIMESTAMP (7) | The Updated field indicates the date that this record was updated. |
Updatedby | No | VARCHAR (32) | The Updated By field indicates the user who updated this record. |
Ishandlenodesmanually | No | CHAR (1) | Tree node creation and deletion can be handled:
- Automatically: With an Openbravo handler that creates the tree node when a record is created, and deletes the tree node when the record is deleted. - Manually: With a custom trigger, event handler, etc. If this flag is checked the creation and deletion of tree nodes will be handled manually. |
Columns
AD_Table_Tree_ID
- Physical column name: AD_Table_Tree_ID
- Property Name: id
- Reference: ID
Active
- Physical column name: Isactive
- Property Name: active
- Reference: YesNo
- Default value: Y
ApplyWhereClauseToChildNodes
- Physical column name: Applywhereclausetochildnodes
- Property Name: applyWhereClauseToChildNodes
- Reference: YesNo
- Default value: Y
Client
- Physical column name: AD_Client_ID
- Property Name: client
- Reference: TableDir
Foreign key column to AD_Client table, (column: AD_Client_ID)
Created By
- Physical column name: Createdby
- Property Name: createdBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Creation Date
- Physical column name: Created
- Property Name: creationDate
- Reference: DateTime
- Default value: SYSDATE
Datasource
- Physical column name: Obserds_Datasource_ID
- Property Name: datasource
- Reference: TableDir
Foreign key column to OBSERDS_Datasource table, (column: Obserds_Datasource_ID)
HasMultiparentNodes
- Physical column name: Hasmultiparentnodes
- Property Name: hasMultiparentNodes
- Reference: YesNo
Is Ordered
- Physical column name: Isordered
- Property Name: isOrdered
- Reference: YesNo
- Default value: N
Is Parent Selection Allowed
- Physical column name: Isparentselectionallowed
- Property Name: isParentSelectionAllowed
- Reference: YesNo
- Default value: Y
IsMainTree
- Physical column name: Ismaintree
- Property Name: isMainTree
- Reference: YesNo
- Default value: Y
Link to Parent Column
- Physical column name: Linktoparentcolumn
- Property Name: linkToParentColumn
- Reference: Table
Foreign key column to AD_Column table, (column: AD_Column_ID)
Module
- Physical column name: AD_Module_ID
- Property Name: module
- Reference: TableDir
Foreign key column to AD_Module table, (column: AD_Module_ID)
It has a validation "Ad_Module_ID IsInDevelopment", with the following code
IsInDevelopment = 'Y' and type != 'T'
Name
- Physical column name: Name
- Property Name: name
- Reference: String
- This column is part of the table's identifier
Node Deletion Policy
- Physical column name: NodeDeletionPolicy
- Property Name: nodeDeletionPolicy
- Reference: List
- Default value: RCN
List values: Node Deletion Policy
The allowed values for this list are:
- RCN (Reparent Child Nodes)
- DNAIHC (Do Not Allow If Has Children)
NodeIdColumn
- Physical column name: Nodeidcolumn
- Property Name: nodeIdColumn
- Reference: Table
Foreign key column to AD_Column table, (column: AD_Column_ID)
Organization
- Physical column name: AD_Org_ID
- Property Name: organization
- Reference: TableDir
Foreign key column to AD_Org table, (column: AD_Org_ID)
Table
- Physical column name: AD_Table_ID
- Property Name: table
- Reference: TableDir
- This column is a child for a business object (is Parent)
Foreign key column to AD_Table table, (column: AD_Table_ID)
Tree Structure
- Physical column name: Treestructure
- Property Name: treeStructure
- Reference: List
List values: Tree Structures
The allowed values for this list are:
- ADTree (AD Tree Node)
- LinkToParent (Link to Parent in Table)
- Custom (Custom)
Updated
- Physical column name: Updated
- Property Name: updated
- Reference: DateTime
- Default value: SYSDATE
Updated By
- Physical column name: Updatedby
- Property Name: updatedBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
handleNodesManually
- Physical column name: Ishandlenodesmanually
- Property Name: handleNodesManually
- Reference: YesNo
- Default value: N
Other Info
Indices
These are the indices for this table (for each index there is a list of all the columns included within it):
- AD_TABLETREE_TABLE_IDX Not Unique. Columns:
- AD_TABLE_ID
Check Constraints
These are the check constraints for this table:
- AD_TABLETREE_APPLYHQL_CHK: APPLYWHERECLAUSETOCHILDNODES IN ('Y', 'N')
- AD_TABLETREE_ISACTIVE_CHK: ISACTIVE IN ('Y', 'N')
- AD_TABLETREE_ISMAINTREE_CHK: ISMAINTREE IN ('Y', 'N')
- AD_TABLETREE_MULTPAR_CHK: HASMULTIPARENTNODES IN ('Y', 'N')
![]() | Back to org.openbravo.model.ad.utility |