ERP/2.50/Developers Guide/Database Model/org.openbravo.model.ad.datamodel/AD Table
AD_Table
In Table table are stored all the tables used in the application. This data should be the same as the defined physically in the DB.
- Name:ADTable
- Classname:Table
This table contains the following columns:
Name | Nullable | Data Type | Description |
AD_Table_ID | N | VARCHAR2(32) | A dictionary table used for this tab that points to the database table. |
AD_Client_ID | N | VARCHAR2(32) | Client for this installation. |
AD_Org_ID | N | VARCHAR2(32) | Organizational entity within client |
IsActive | N | CHAR(1) | A flag indicating whether this record is available for use or de-activated. |
Created | N | DATE | The date that this record is completed. |
CreatedBy | N | VARCHAR2(32) | User who created this records |
Updated | N | DATE | x not implemented |
UpdatedBy | N | VARCHAR2(32) | User who updated this records |
Name | N | NVARCHAR2(60) | A non-unique identifier for a record/document often used as a search tool. |
Description | Y | NVARCHAR2(255) | A space to write additional related information. |
Help | Y | NVARCHAR2(2000) | A comment that adds additional information to help users work with fields. |
TableName | N | VARCHAR2(40) | Name of the table in the database |
Classname | N | VARCHAR2(60) | x not implemented |
IsView | N | CHAR(1) | This is a view |
AccessLevel | N | VARCHAR2(60) | Indicates what type of data (in terms of AD_CLIENT and AD_ORG data columns) can be entered or viewed. |
AD_Window_ID | Y | VARCHAR2(32) | A work area which can be used to create, view, edit, and process a record. |
IsSecurityEnabled | Y | CHAR(1) | If security is enabled, user access to data can be restricted via Roles |
IsDeleteable | N | CHAR(1) | Indicates if records can be deleted from the database |
IsHighVolume | N | CHAR(1) | Use Search instead of Pick list |
ImportTable | Y | CHAR(1) | Create Dictionary Columns of Table not existing as a Column but in the Database |
IsChangeLog | Y | CHAR(1) | Maintain a log of changes |
PO_Window_ID | Y | VARCHAR2(32) | Purchase Order Window |
IsDefaultAcct | Y | CHAR(1) | Is default account |
SQL_Record_Identifier | Y | VARCHAR2(4000) | SQL_Record_Identifier |
Developmentstatus | Y | VARCHAR2(60) | Development Status |
AD_Package_ID | N | VARCHAR2(32) | Links a table to a package |
Treetype | Y | VARCHAR2(60) | Element this tree is built on (i.e Product, Business Partner) |
Acctdate_Column_ID | Y | VARCHAR2(32) | null |
Acctclassname | Y | VARCHAR2(1000) | null |
IsFullyAudited | N | CHAR(1) | Maitain Audit Trail for this table |
Other Info
Check constraints
These are the check constraints for this table:
- AD_TABLE_ISACTIVE_CHK: ISACTIVE 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_ISVIEW_CHK: ISVIEW IN ('Y', 'N')
Indexes
These are the indexes for this table (for each index there is a list of all the columns included within it):
Non Unique
- AD_TABLE_PACKAGE_IDX
Unique
- AD_TABLE_CLASSNAME_PACKAGE_UN
- AD_TABLE_KEY
- AD_TABLE_NAME
- AD_TABLE_TREETYPE_UN
Columns
Table
The Table indicates the table in which a field or fields reside.
- Physical column name: AD_Table_ID
- Property Name: id
- Reference: ID
Client
- Physical column name: AD_Client_ID
- Property Name: client
- Reference: TableDir
- Default value: @AD_CLIENT_ID@
Foreign key column to AD_Client table, (column: AD_Client_ID)
Validation Rule AD_Client Security validation: Clients with user access rights. With the following code:
AD_Client.AD_Client_ID IN (@#User_Client@)
Organization
- Physical column name: AD_Org_ID
- Property Name: organization
- Reference: TableDir
- Default value: @AD_Org_ID@
Foreign key column to AD_Org table, (column: AD_Org_ID)
Active
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.
- Physical column name: IsActive
- Property Name: active
- Reference: YesNo
- Default value: Y
Creation Date
The Created field indicates the date that this record was created.
- Physical column name: Created
- Property Name: creationDate
- Reference: DateTime
Created By
- Physical column name: CreatedBy
- Property Name: createdBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Updated
The Updated field indicates the date that this record was updated.
- Physical column name: Updated
- Property Name: updated
- Reference: DateTime
Updated By
- Physical column name: UpdatedBy
- Property Name: updatedBy
- Reference: Search
Foreign key column to AD_User table, (column: AD_User_ID)
Name
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.
- Physical column name: Name
- Property Name: name
- Reference: String
Description
A description is limited to 255 characters.
- Physical column name: Description
- Property Name: description
- Reference: String
Help/Comment
The Help field contains a hint, comment or help about the use of this item.
- Physical column name: Help
- Property Name: helpComment
- Reference: Text
DB Table Name
The DB Table Name indicates the name of the table in database.
- Physical column name: TableName
- Property Name: dBTableName
- Reference: String
- This column is part of the table's identifier
Java Class Name
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.
- Physical column name: Classname
- Property Name: javaClassName
- Reference: String
View
This is a view rather than a table. A view is always treated as read only in the system.
- Physical column name: IsView
- Property Name: view
- Reference: YesNo
- Default value: N
Data Access Level
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)
- Physical column name: AccessLevel
- Property Name: dataAccessLevel
- Reference: List
- Default value: 4
List values: AD_Table Access Levels
The allowed values for this list are:
- 1 (Organization)
- 3 (Client/Organization)
- 4 (System only)
- 6 (System/Client)
- 7 (All)
Window
- Physical column name: AD_Window_ID
- Property Name: window
- Reference: TableDir
Foreign key column to AD_Window table, (column: AD_Window_ID)
Security enabled
The Security Enabled checkbox indicates that user access to the data in this table can be restricted using Roles.
- Physical column name: IsSecurityEnabled
- Property Name: securityEnabled
- Reference: YesNo
Deletable Records
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
- Physical column name: IsDeleteable
- Property Name: deletableRecords
- Reference: YesNo
- Default value: Y
High Volume
The High Volume Checkbox indicates if a search screen will display as opposed to a pick list for selecting records from this table.
- Physical column name: IsHighVolume
- Property Name: highVolume
- Reference: YesNo
Create Columns from DB
If you have added columns in the database to this table, this procedure creates the Column records in the Dictionary. Please be aware, that they may deleted, if the entity type is not set to User.
- Physical column name: ImportTable
- Property Name: importTable
- Reference: Button
Maintain Change Log
If selected, a log of all changes is maintained.
- Physical column name: IsChangeLog
- Property Name: maintainChangeLog
- Reference: YesNo
PO Window
- Physical column name: PO_Window_ID
- Property Name: pOWindow
- Reference: Table
Foreign key column to AD_Window table, (column: AD_Window_ID)
Reference Table AD_Window
Default Account
Is default account
- Physical column name: IsDefaultAcct
- Property Name: defaultAccount
- Reference: YesNo
- Default value: N
SQL_Record_Identifier
SQL_Record_Identifier
- Physical column name: SQL_Record_Identifier
- Property Name: sQLRecordIdentifier
- Reference: Memo
- This column is transient
Development Status
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.
- Physical column name: Developmentstatus
- Property Name: developmentStatus
- Reference: List
- Default value: RE
List values: Development Status
The allowed values for this list are:
- CC (Custom Code)
- DP (Deprecated)
- NI (Not Implemented Yet)
- RE (Ready)
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)
Validation Rule AD_Package_ID IsInDevelopment: AD_Package_ID IsInDevelopment. With the following code:
ad_module_id IN (SELECT ad_module_id FROM ad_module WHERE IsInDevelopment = 'Y')
TreeType
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.
- Physical column name: Treetype
- Property Name: treeType
- Reference: List
List values: AD_TreeType Type
The allowed values for this list are:
- AR (Accounting report)
- AY (Activity)
- BB (BoM): Bill of Materials
- BP (Bus Partner)
- EV (Element Value (Account, etc.))
- II (Instructions)
- MC (Campaign)
- MM (Menu)
- OO (Organization)
- PC (Product Category)
- PJ (Project)
- PR (Product)
- SR (Sales Region)
- TR (Tax report)
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)
Reference Table AD_Column date column With the following where clause:
AD_Column.AD_Reference_ID IN ('16', '15') AND AD_Column.AD_Table_ID=@AD_Table_ID@
Acctclassname
Java class name where the posting of table is developed
- Physical column name: Acctclassname
- Property Name: acctclassname
- Reference: String
IsFullyAudited
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.
- Physical column name: IsFullyAudited
- Property Name: isFullyAudited
- Reference: YesNo
- Default value: N
Callout: SL_TableAudit
This element is linked to a callout.
It is implemented by org.openbravo.erpCommon.ad_callouts.SL_TableAudit Java class.
Related tables
Tables that link this table:
- ADAttachment.Table
- ADChangeLog.Table
- ADColumn.Table
- ADColumnAccess.Table
- ADNote.Table
- ADRecordAccess.Table
- ADReferencedTable.Table
- ADSelector.Table
- ADTab.Table
- ADTableAccess.Table
- AD_Audit_Trail.Table
- AD_CreateFact_template.AD_Table_ID
- Attachment.Table
- DataImportFormat.Table
- DataSetTable.Table
- DocumentType.Table
- FinancialMgmtAccountingFact.Table
- FinancialMgmtAcctSchemaTable.Table
- ReferenceDataStore.Table