ERP/3.0/Developers Guide/Database Model/org.openbravo.model.ad.datamodel/AD Table
AD_Table
- Name:AD_Table
- Classname:ADTable
This table contains the following columns:
Name | Nullable | Data Type | Description
|
Acctclassname | Yes | VARCHAR (1000) | Java class name where the posting of table is developed |
Acctdate_Column_ID | Yes | VARCHAR (32) | Date reference column where is stored the accounting date |
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. |
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. |
TableName | Yes | VARCHAR (40) | The DB Table Name indicates the name of the table in database. |
AccessLevel | No | VARCHAR (60) | Indicates what type of data (in terms of AD_CLIENT and AD_ORG data columns) can be entered or viewed. We can classify data in 4 major categories:
- System (AD_CLIENT_ID=0, AD_ORG_ID=0) - system data (such as metadata for window, tab and field definition) - Organization (AD_CLIENT<>0, AD_ORG_ID<>0) - data particular to an organization (such as sales orders) - Client/Organization (AD_CLIENT<>0, AD_ORG_ID=anything) - data particular to an organization or shared among all organizations within one client - Client (AD_CLIENT<>0, AD_ORG_ID=0) - data that is specific to a client but can be used by all organizations within that client or All (AD_CLIENT=anything, AD_ORG_ID=anything) |
AD_Package_ID | No | VARCHAR (32) | An AD_Table record has a mandatory relation to a package (the AD_Package). Choose a sensible package fitting to the functional area to which the table applies (so not the Core package). If no such package exist then create a new one. The relation to the module is maintained through the AD_Package, so an AD_Table has an AD_Package which belongs to a module. When developing for a module then first a package needs to be defined in AD_Package, linked to the module. Then the records in AD_Table (for that module) can be linked to that package. |
DataOriginType | No | VARCHAR (60) | Field to specify the type of data origin: physical table/view or datasource |
IsDefaultAcct | Yes | CHAR (1) | Is default account |
IsDeleteable | No | CHAR (1) | The Deleteable Records checkbox indicates if a record can be deleted from the database. If records cannot be deleted, you can only deselect the Active flag |
Description | Yes | NVARCHAR (255) | A description is limited to 255 characters. |
Developmentstatus | Yes | VARCHAR (60) | Development Status defines the status of a table or a column. Ready means that this object is in use, Not Implemented Yet indicates that currently it is not in use but it is planned to be implemented and Deprecated are the objects that are going to be removed from the application in future versions. |
Entity_Alias | Yes | VARCHAR (60) | In case that the the selector's table has an alias in the HQL it is mandatory to set it on this field. This alias is used to add some mandatory filters on the Where clause replacing the @additional_filters@ string. Some examples of added filters are: client, organization and active flag. |
Help | Yes | NVARCHAR (2000) | The Help field contains a hint, comment or help about the use of this item. |
IsHighVolume | No | CHAR (1) | If a table is defined as High Volume, it means that it has or may have a large number of rows. |
HqlQuery | Yes | CLOB | HQL query used to populate the table |
ImportTable | Yes | CHAR (1) | Import Table Columns from Database, this process will create in the application dictionary those columns defined in the table (in DB) but non-existing in the column table (of the application dictionary). |
IsAuditInserts | No | CHAR (1) | If this flag is checked, if when a record is inserted in an audited table the initial value of all its columns will be saved in the audit table. Usually there is no need to save all columns, because the original column values of the record can be recreated based on their current value and on their modification history. |
IsFullyAudited | No | CHAR (1) | If audit trail is maintained for a table, each modification performed to any record in this table will be tracked.
Do not forget to generate Audit infrastructure after selecting or deselecting a table to be audited. |
Istree | No | CHAR (1) | If a table is defined as a tree, then the Table Tree Category tab is shown in this window. In that tab, tree categories can be assigned to this table. Once a tree table has defined a table tree category, it can be used in tree referenced and the tree view will be available when the table is displayed in a tab. |
Classname | Yes | VARCHAR (60) | The classname is used when generating a representation of the table in java (the entity or business object). The classname is the simplename of the class (so without the package name). Often the AD_Table.name can be used here. The combination of classname and package needs to be unique. |
IsChangeLog | Yes | CHAR (1) | If selected, a log of all changes is maintained. |
Name | No | NVARCHAR (60) | 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. |
Obserds_Datasource_ID | Yes | VARCHAR (32) | Datasource used to feed the table |
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. |
PO_Window_ID | Yes | VARCHAR (32) | Window for Purchase Order (AP) Zooms |
SQL_Record_Identifier | Yes | VARCHAR (4000) | SQL_Record_Identifier |
IsSecurityEnabled | Yes | CHAR (1) | The Security Enabled checkbox indicates that user access to the data in this table can be restricted using Roles. |
AD_Table_ID | No | VARCHAR (32) | The Table indicates the table in which a field or fields reside. |
Treetype | Yes | VARCHAR (60) | The Tree Type / Area field determines the type of tree this is. For example, you may define one tree for your Products and another tree for your Business Partners. |
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. |
IsView | No | CHAR (1) | This is a view rather than a table. A view is always treated as read only in the system. |
AD_Window_ID | Yes | VARCHAR (32) | The Window field identifies a unique Window in the system. |
Columns
Acctclassname
- Physical column name: Acctclassname
- Property Name: acctclassname
- Reference: String
Acctdate_Column_ID
- Physical column name: Acctdate_Column_ID
- Property Name: acctdateColumn
- Reference: Table
Foreign key column to AD_Column table, (column: AD_Column_ID)
Active
- Physical column name: IsActive
- Property Name: active
- 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)
It has a validation "AD_Client Security validation", with the following code
AD_Client.AD_Client_ID in (@#User_Client@)
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
DB Table Name
- Physical column name: TableName
- Property Name: dBTableName
- Reference: String
- This column is part of the table's identifier
Data Access Level
- Physical column name: AccessLevel
- Property Name: dataAccessLevel
- Reference: List
List values: AD_Table Access Levels
The allowed values for this list are:
- 6 (System/Client)
- 1 (Organization)
- 3 (Client/Organization)
- 4 (System only)
- 7 (All)
Data Package
- Physical column name: AD_Package_ID
- Property Name: dataPackage
- Reference: TableDir
- Default value: 0
Foreign key column to AD_Package table, (column: AD_Package_ID)
It has a validation "AD_Package_ID IsInDevelopment", with the following code
ad_module_id in (select ad_module_id from ad_module where IsInDevelopment = 'Y')
DataOriginType
- Physical column name: DataOriginType
- Property Name: dataOriginType
- Reference: List
- Default value: Table
List values: Data Origin Type
The allowed values for this list are:
- Table (Table)
- Datasource (Datasource)
- HQL (HQL Query)
Default Account
- Physical column name: IsDefaultAcct
- Property Name: defaultAccount
- Reference: YesNo
- Default value: N
Deletable Records
- Physical column name: IsDeleteable
- Property Name: deletableRecords
- Reference: YesNo
- Default value: Y
Description
- Physical column name: Description
- Property Name: description
- Reference: String
Development Status
- Physical column name: Developmentstatus
- Property Name: developmentStatus
- Reference: List
- Default value: RE
List values: Development Status
The allowed values for this list are:
- RE (Ready)
- NI (Not Implemented Yet)
- DP (Deprecated)
- CC (Custom Code)
EntityAlias
- Physical column name: Entity_Alias
- Property Name: entityAlias
- Reference: String
Help/Comment
- Physical column name: Help
- Property Name: helpComment
- Reference: Text
High Volume
- Physical column name: IsHighVolume
- Property Name: highVolume
- Reference: YesNo
- Default value: N
HqlQuery
- Physical column name: HqlQuery
- Property Name: hqlQuery
- Reference: Text
Import Table
- Physical column name: ImportTable
- Property Name: importTable
- Reference: Button
IsAuditInserts
- Physical column name: IsAuditInserts
- Property Name: isAuditInserts
- Reference: YesNo
- Default value: Y
IsFullyAudited
- Physical column name: IsFullyAudited
- Property Name: isFullyAudited
- Reference: YesNo
- Default value: N
Callout: SL_TableAudit
This column has a callout associated.
It is implemented by [1] Java Class.
Istree
- Physical column name: Istree
- Property Name: istree
- Reference: YesNo
- Default value: N
Java Class Name
- Physical column name: Classname
- Property Name: javaClassName
- Reference: String
Maintain Change Log
- Physical column name: IsChangeLog
- Property Name: maintainChangeLog
- Reference: YesNo
- Default value: N
Name
- Physical column name: Name
- Property Name: name
- Reference: String
Obserds_Datasource_ID
- Physical column name: Obserds_Datasource_ID
- Property Name: obserdsDatasource
- Reference: OBUISEL_Selector Reference
Foreign key column to OBSERDS_Datasource table, (column: Obserds_Datasource_ID)
Organization
- Physical column name: AD_Org_ID
- Property Name: organization
- Reference: TableDir
Foreign key column to AD_Org table, (column: AD_Org_ID)
PO Window
- Physical column name: PO_Window_ID
- Property Name: pOWindow
- Reference: Table
Foreign key column to AD_Window table, (column: AD_Window_ID)
SQL_Record_Identifier
- Physical column name: SQL_Record_Identifier
- Property Name: sQLRecordIdentifier
- Reference: Memo
Security enabled
- Physical column name: IsSecurityEnabled
- Property Name: securityEnabled
- Reference: YesNo
- Default value: N
Table
- Physical column name: AD_Table_ID
- Property Name: id
- Reference: ID
TreeType
- Physical column name: Treetype
- Property Name: treeType
- Reference: List
List values: AD_TreeType Type
The allowed values for this list are:
- OO (Organization)
- BB (BoM): Bill of Materials
- PJ (Project)
- SR (Sales Region)
- PC (Product Category)
- MC (Campaign)
- AY (Activity)
- AR (Accounting report)
- II (Instructions)
- TR (Tax report)
- AS (Asset)
- U1 (User Dimension 1): User Dimension 1
- U2 (User Dimension 2): User Dimension 2
- CH (Product Characteristic)
- CC (Cost Center): Cost Center
- OBRE_RC (Resource Category)
- NEW (New Tree Structure)
- MM (Menu)
- EV (Element Value (Account, etc.))
- PR (Product)
- BP (Bus Partner)
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)
View
- Physical column name: IsView
- Property Name: view
- Reference: YesNo
- Default value: N
Window
- Physical column name: AD_Window_ID
- Property Name: window
- Reference: TableDir
Foreign key column to AD_Window table, (column: AD_Window_ID)
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_TABLE_PACKAGE_IDX Not Unique. Columns:
- AD_PACKAGE_ID
Check Constraints
These are the check constraints for this table:
- AD_TABLE_CLASSNAME_CHK: UPPER(DATAORIGINTYPE) = 'DATASOURCE' OR UPPER(DATAORIGINTYPE) = 'HQL' OR CLASSNAME IS NOT NULL
- AD_TABLE_DATASOURCE_CHK: UPPER(DATAORIGINTYPE) <> 'DATASOURCE' OR OBSERDS_DATASOURCE_ID IS NOT NULL
- AD_TABLE_HQL_CHK: UPPER(DATAORIGINTYPE) <> 'HQL' OR HQLQUERY IS NOT NULL
- AD_TABLE_ISACTIVE_CHK: ISACTIVE IN ('Y', 'N')
- AD_TABLE_ISAUDITINS_CHK: ISAUDITINSERTS IN ('Y', 'N')
- AD_TABLE_ISDELETEABLE_CHK: ISDELETEABLE IN ('Y', 'N')
- AD_TABLE_ISFULLYAUDITED_CHK: ISFULLYAUDITED IN ('Y', 'N')
- AD_TABLE_ISFULLYAUDITED_CHK2: ISFULLYAUDITED = 'N' OR UPPER(TABLENAME) <> 'AD_AUDIT_TRAIL'
- AD_TABLE_ISHIGHVOLUME_CHK: ISHIGHVOLUME IN ('Y', 'N')
- AD_TABLE_ISSECUR_YENABLED_CHK: ISSECURITYENABLED IN ('Y', 'N')
- AD_TABLE_ISTREE_CHK: ISTREE IN ('Y', 'N')
- AD_TABLE_ISVIEW_CHK: ISVIEW IN ('Y', 'N')
![]() | Back to org.openbravo.model.ad.datamodel |