View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

ERP/3.0/Developers Guide/Reference/Entity Model/ADTableTree

This article is protected against manual editing because it is automatically generated from Openbravo meta-data. Learn more about writing and translating such documents.
Back button.png   Back to ERP/3.0/Developers_Guide/Reference/Entity_Model#ADTableTree


ADTableTree

To the database table (ad_table_tree) of this entity.

Properties

Note:

Property Column Constraints Type Description
id* AD_Table_Tree_ID Mandatory
Max Length: 32
java.lang.String 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.
client AD_Client_ID Mandatory
ADClient A Client is a company or a legal entity. You cannot share data between Clients.
organization AD_Org_ID Mandatory
Organization An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.
active Isactive Mandatory
java.lang.Boolean 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.

creationDate Created Mandatory
java.util.Date The Created field indicates the date that this record was created.
createdBy Createdby Mandatory
ADUser The Created By field indicates the user who created this record.
updated Updated Mandatory
java.util.Date The Updated field indicates the date that this record was updated.
updatedBy Updatedby Mandatory
ADUser The Updated By field indicates the user who updated this record.
table AD_Table_ID ADTable The Table indicates the table in which a field or fields reside.
linkToParentColumn Linktoparentcolumn ADColumn 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
nodeIdColumn Nodeidcolumn ADColumn For Link to Parent tables: column that represents the id of the node. Usually the id column should be used.
hasMultiparentNodes Hasmultiparentnodes Mandatory
java.lang.Boolean 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.
module AD_Module_ID Mandatory
ADModule Indicates the module the element forms part of.
applyWhereClauseToChildNodes Applywhereclausetochildnodes Mandatory
java.lang.Boolean 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.
name# Name Mandatory
Max Length: 200
java.lang.String 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.
isParentSelectionAllowed Isparentselectionallowed Mandatory
java.lang.Boolean This property is used to define if non-leaf nodes are allowed to be selected in a tree reference.
isOrdered Isordered Mandatory
java.lang.Boolean 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.
treeStructure Treestructure Max Length: 60
java.lang.String 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

datasource Obserds_Datasource_ID OBSERDS_Datasource Datasource used to feed the table
handleNodesManually Ishandlenodesmanually Mandatory
java.lang.Boolean 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.

isMainTree Ismaintree Mandatory
java.lang.Boolean 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.

nodeDeletionPolicy NodeDeletionPolicy Mandatory
Max Length: 60
java.lang.String It defines the behavior when a node item is deleted
aDReferencedTreeList ADReferencedTree
aDTabList ADTab


Java Entity Class

 
 
 /*
  *************************************************************************
  * The contents of this file are subject to the Openbravo  Public  License
  * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
  * Version 1.1  with a permitted attribution clause; you may not  use this
  * file except in compliance with the License. You  may  obtain  a copy of
  * the License at http://www.openbravo.com/legal/license.html
  * Software distributed under the License  is  distributed  on  an "AS IS"
  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
  * License for the specific  language  governing  rights  and  limitations
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2008-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
 */
 package org.openbravo.model.ad.utility;
 
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
 import org.openbravo.base.structure.ActiveEnabled;
 import org.openbravo.base.structure.BaseOBObject;
 import org.openbravo.base.structure.ClientEnabled;
 import org.openbravo.base.structure.OrganizationEnabled;
 import org.openbravo.base.structure.Traceable;
 import org.openbravo.model.ad.access.User;
 import org.openbravo.model.ad.datamodel.Column;
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.domain.ReferencedTree;
 import org.openbravo.model.ad.module.Module;
 import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.service.datasource.DataSource;
 /**
  * Entity class for entity ADTableTree (stored in table ad_table_tree).
  *
  * NOTE: This class should not be instantiated directly. To instantiate this
  * class the {@link org.openbravo.base.provider.OBProvider} should be used.
  */
 public class TableTree extends BaseOBObject implements Traceable, ClientEnabled, OrganizationEnabled, ActiveEnabled {
     private static final long serialVersionUID = 1L;
     public static final String TABLE_NAME = "ad_table_tree";
     public static final String ENTITY_NAME = "ADTableTree";
     public static final String PROPERTY_ID = "id";
     public static final String PROPERTY_CLIENT = "client";
     public static final String PROPERTY_ORGANIZATION = "organization";
     public static final String PROPERTY_ACTIVE = "active";
     public static final String PROPERTY_CREATIONDATE = "creationDate";
     public static final String PROPERTY_CREATEDBY = "createdBy";
     public static final String PROPERTY_UPDATED = "updated";
     public static final String PROPERTY_UPDATEDBY = "updatedBy";
     public static final String PROPERTY_TABLE = "table";
     public static final String PROPERTY_LINKTOPARENTCOLUMN = "linkToParentColumn";
     public static final String PROPERTY_NODEIDCOLUMN = "nodeIdColumn";
     public static final String PROPERTY_HASMULTIPARENTNODES = "hasMultiparentNodes";
     public static final String PROPERTY_MODULE = "module";
     public static final String PROPERTY_APPLYWHERECLAUSETOCHILDNODES = "applyWhereClauseToChildNodes";
     public static final String PROPERTY_NAME = "name";
     public static final String PROPERTY_ISPARENTSELECTIONALLOWED = "isParentSelectionAllowed";
     public static final String PROPERTY_ISORDERED = "isOrdered";
     public static final String PROPERTY_TREESTRUCTURE = "treeStructure";
     public static final String PROPERTY_DATASOURCE = "datasource";
     public static final String PROPERTY_HANDLENODESMANUALLY = "handleNodesManually";
     public static final String PROPERTY_ISMAINTREE = "isMainTree";
     public static final String PROPERTY_NODEDELETIONPOLICY = "nodeDeletionPolicy";
     public static final String PROPERTY_ADREFERENCEDTREELIST = "aDReferencedTreeList";
     public static final String PROPERTY_ADTABLIST = "aDTabList";
 
     public TableTree() {
         setDefaultValue(PROPERTY_ACTIVE, true);
         setDefaultValue(PROPERTY_HASMULTIPARENTNODES, false);
         setDefaultValue(PROPERTY_APPLYWHERECLAUSETOCHILDNODES, true);
         setDefaultValue(PROPERTY_ISPARENTSELECTIONALLOWED, true);
         setDefaultValue(PROPERTY_ISORDERED, false);
         setDefaultValue(PROPERTY_HANDLENODESMANUALLY, false);
         setDefaultValue(PROPERTY_ISMAINTREE, true);
         setDefaultValue(PROPERTY_ADREFERENCEDTREELIST, new ArrayList<Object>());
         setDefaultValue(PROPERTY_ADTABLIST, new ArrayList<Object>());
     }
 
     @Override
     public String getEntityName() {
         return ENTITY_NAME;
     }
 
     public String getId() {
         return (String) get(PROPERTY_ID);
     }
 
     public void setId(String id) {
         set(PROPERTY_ID, id);
     }
 
     public Client getClient() {
         return (Client) get(PROPERTY_CLIENT);
     }
 
     public void setClient(Client client) {
         set(PROPERTY_CLIENT, client);
     }
 
     public Organization getOrganization() {
         return (Organization) get(PROPERTY_ORGANIZATION);
     }
 
     public void setOrganization(Organization organization) {
         set(PROPERTY_ORGANIZATION, organization);
     }
 
     public Boolean isActive() {
         return (Boolean) get(PROPERTY_ACTIVE);
     }
 
     public void setActive(Boolean active) {
         set(PROPERTY_ACTIVE, active);
     }
 
     public Date getCreationDate() {
         return (Date) get(PROPERTY_CREATIONDATE);
     }
 
     public void setCreationDate(Date creationDate) {
         set(PROPERTY_CREATIONDATE, creationDate);
     }
 
     public User getCreatedBy() {
         return (User) get(PROPERTY_CREATEDBY);
     }
 
     public void setCreatedBy(User createdBy) {
         set(PROPERTY_CREATEDBY, createdBy);
     }
 
     public Date getUpdated() {
         return (Date) get(PROPERTY_UPDATED);
     }
 
     public void setUpdated(Date updated) {
         set(PROPERTY_UPDATED, updated);
     }
 
     public User getUpdatedBy() {
         return (User) get(PROPERTY_UPDATEDBY);
     }
 
     public void setUpdatedBy(User updatedBy) {
         set(PROPERTY_UPDATEDBY, updatedBy);
     }
 
     public Table getTable() {
         return (Table) get(PROPERTY_TABLE);
     }
 
     public void setTable(Table table) {
         set(PROPERTY_TABLE, table);
     }
 
     public Column getLinkToParentColumn() {
         return (Column) get(PROPERTY_LINKTOPARENTCOLUMN);
     }
 
     public void setLinkToParentColumn(Column linkToParentColumn) {
         set(PROPERTY_LINKTOPARENTCOLUMN, linkToParentColumn);
     }
 
     public Column getNodeIdColumn() {
         return (Column) get(PROPERTY_NODEIDCOLUMN);
     }
 
     public void setNodeIdColumn(Column nodeIdColumn) {
         set(PROPERTY_NODEIDCOLUMN, nodeIdColumn);
     }
 
     public Boolean isHasMultiparentNodes() {
         return (Boolean) get(PROPERTY_HASMULTIPARENTNODES);
     }
 
     public void setHasMultiparentNodes(Boolean hasMultiparentNodes) {
         set(PROPERTY_HASMULTIPARENTNODES, hasMultiparentNodes);
     }
 
     public Module getModule() {
         return (Module) get(PROPERTY_MODULE);
     }
 
     public void setModule(Module module) {
         set(PROPERTY_MODULE, module);
     }
 
     public Boolean isApplyWhereClauseToChildNodes() {
         return (Boolean) get(PROPERTY_APPLYWHERECLAUSETOCHILDNODES);
     }
 
     public void setApplyWhereClauseToChildNodes(Boolean applyWhereClauseToChildNodes) {
         set(PROPERTY_APPLYWHERECLAUSETOCHILDNODES, applyWhereClauseToChildNodes);
     }
 
     public String getName() {
         return (String) get(PROPERTY_NAME);
     }
 
     public void setName(String name) {
         set(PROPERTY_NAME, name);
     }
 
     public Boolean isParentSelectionAllowed() {
         return (Boolean) get(PROPERTY_ISPARENTSELECTIONALLOWED);
     }
 
     public void setParentSelectionAllowed(Boolean isParentSelectionAllowed) {
         set(PROPERTY_ISPARENTSELECTIONALLOWED, isParentSelectionAllowed);
     }
 
     public Boolean isOrdered() {
         return (Boolean) get(PROPERTY_ISORDERED);
     }
 
     public void setOrdered(Boolean isOrdered) {
         set(PROPERTY_ISORDERED, isOrdered);
     }
 
     public String getTreeStructure() {
         return (String) get(PROPERTY_TREESTRUCTURE);
     }
 
     public void setTreeStructure(String treeStructure) {
         set(PROPERTY_TREESTRUCTURE, treeStructure);
     }
 
     public DataSource getDatasource() {
         return (DataSource) get(PROPERTY_DATASOURCE);
     }
 
     public void setDatasource(DataSource datasource) {
         set(PROPERTY_DATASOURCE, datasource);
     }
 
     public Boolean isHandleNodesManually() {
         return (Boolean) get(PROPERTY_HANDLENODESMANUALLY);
     }
 
     public void setHandleNodesManually(Boolean handleNodesManually) {
         set(PROPERTY_HANDLENODESMANUALLY, handleNodesManually);
     }
 
     public Boolean isMainTree() {
         return (Boolean) get(PROPERTY_ISMAINTREE);
     }
 
     public void setMainTree(Boolean isMainTree) {
         set(PROPERTY_ISMAINTREE, isMainTree);
     }
 
     public String getNodeDeletionPolicy() {
         return (String) get(PROPERTY_NODEDELETIONPOLICY);
     }
 
     public void setNodeDeletionPolicy(String nodeDeletionPolicy) {
         set(PROPERTY_NODEDELETIONPOLICY, nodeDeletionPolicy);
     }
 
     @SuppressWarnings("unchecked")
     public List<ReferencedTree> getADReferencedTreeList() {
       return (List<ReferencedTree>) get(PROPERTY_ADREFERENCEDTREELIST);
     }
 
     public void setADReferencedTreeList(List<ReferencedTree> aDReferencedTreeList) {
         set(PROPERTY_ADREFERENCEDTREELIST, aDReferencedTreeList);
     }
 
     @SuppressWarnings("unchecked")
     public List<Tab> getADTabList() {
       return (List<Tab>) get(PROPERTY_ADTABLIST);
     }
 
     public void setADTabList(List<Tab> aDTabList) {
         set(PROPERTY_ADTABLIST, aDTabList);
     }
 
 }

Retrieved from "http://wiki.openbravo.com/wiki/ERP/3.0/Developers_Guide/Reference/Entity_Model/ADTableTree"

This page has been accessed 424 times. This page was last modified on 5 August 2014, at 13:51. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.