Package org.openbravo.model.ad.utility
Class TableTree
- java.lang.Object
-
- org.openbravo.base.structure.BaseOBObject
-
- org.openbravo.model.ad.utility.TableTree
-
- All Implemented Interfaces:
Serializable
,BaseOBObjectDef
,OBNotSingleton
,OBProvidable
,ActiveEnabled
,ClientEnabled
,DynamicEnabled
,Identifiable
,OrganizationEnabled
,Traceable
public class TableTree extends BaseOBObject implements Traceable, ClientEnabled, OrganizationEnabled, ActiveEnabled
Entity class for entity ADTableTree (stored in table ad_table_tree).
NOTE: This class should not be instantiated directly. To instantiate this class theOBProvider
should be used.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ENTITY_NAME
static String
PROPERTY_ACTIVE
Property active stored in column Isactive in table ad_table_treestatic String
PROPERTY_APPLYWHERECLAUSETOCHILDNODES
Property applyWhereClauseToChildNodes stored in column Applywhereclausetochildnodes in table ad_table_tree
Help: 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.static String
PROPERTY_CLIENT
Property client stored in column AD_Client_ID in table ad_table_treestatic String
PROPERTY_CREATEDBY
Property createdBy stored in column Createdby in table ad_table_treestatic String
PROPERTY_CREATIONDATE
Property creationDate stored in column Created in table ad_table_treestatic String
PROPERTY_DATASOURCE
Property datasource stored in column Obserds_Datasource_ID in table ad_table_tree
Help: Datasource used to feed the tablestatic String
PROPERTY_HANDLENODESMANUALLY
Property handleNodesManually stored in column Ishandlenodesmanually in table ad_table_tree
Help: 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.static String
PROPERTY_HASMULTIPARENTNODES
Property hasMultiparentNodes stored in column Hasmultiparentnodes in table ad_table_tree
Help: 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.static String
PROPERTY_ID
Property id stored in column AD_Table_Tree_ID in table ad_table_tree
Help: 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.static String
PROPERTY_ISMAINTREE
Property isMainTree stored in column Ismaintree in table ad_table_tree
Help: 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.static String
PROPERTY_ISORDERED
Property isOrdered stored in column Isordered in table ad_table_tree
Help: 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.static String
PROPERTY_ISPARENTSELECTIONALLOWED
Property isParentSelectionAllowed stored in column Isparentselectionallowed in table ad_table_tree
Help: This property is used to define if non-leaf nodes are allowed to be selected in a tree reference.static String
PROPERTY_LINKTOPARENTCOLUMN
Property linkToParentColumn stored in column Linktoparentcolumn in table ad_table_tree
Help: 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 nodestatic String
PROPERTY_MODULE
Property module stored in column AD_Module_ID in table ad_table_tree
Help: Indicates the module the element forms part of.static String
PROPERTY_NAME
Property name stored in column Name in table ad_table_treestatic String
PROPERTY_NODEDELETIONPOLICY
Property nodeDeletionPolicy stored in column NodeDeletionPolicy in table ad_table_tree
Help: It defines the behavior when a node item is deletedstatic String
PROPERTY_NODEIDCOLUMN
Property nodeIdColumn stored in column Nodeidcolumn in table ad_table_tree
Help: For Link to Parent tables: column that represents the id of the node. Usually the id column should be used.static String
PROPERTY_ORGANIZATION
Property organization stored in column AD_Org_ID in table ad_table_treestatic String
PROPERTY_TABLE
Property table stored in column AD_Table_ID in table ad_table_tree
Help: The Table indicates the table in which a field or fields reside.static String
PROPERTY_TREESTRUCTURE
Property treeStructure stored in column Treestructure in table ad_table_tree
Help: 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 definedstatic String
PROPERTY_UPDATED
Property updated stored in column Updated in table ad_table_treestatic String
PROPERTY_UPDATEDBY
Property updatedBy stored in column Updatedby in table ad_table_treestatic String
TABLE_NAME
-
Fields inherited from class org.openbravo.base.structure.BaseOBObject
ID
-
-
Constructor Summary
Constructors Constructor Description TableTree()
-
Method Summary
-
Methods inherited from class org.openbravo.base.structure.BaseOBObject
checkDerivedReadable, get, get, get, getEntity, getIdentifier, getValue, isAllowRead, isNewOBObject, isOrgClientAccessCheckEnabled, isWriteAccessCheckEnabled, set, setAccessChecks, setAllowRead, setDefaultValue, setId, setNewOBObject, setValue, toString, validate
-
-
-
-
Field Detail
-
TABLE_NAME
public static final String TABLE_NAME
- See Also:
- Constant Field Values
-
ENTITY_NAME
public static final String ENTITY_NAME
- See Also:
- Constant Field Values
-
PROPERTY_ID
public static final String PROPERTY_ID
Property id stored in column AD_Table_Tree_ID in table ad_table_tree
Help: 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.- See Also:
- Constant Field Values
-
PROPERTY_CLIENT
public static final String PROPERTY_CLIENT
Property client stored in column AD_Client_ID in table ad_table_tree- See Also:
ClientEnabled
, Constant Field Values
-
PROPERTY_ORGANIZATION
public static final String PROPERTY_ORGANIZATION
Property organization stored in column AD_Org_ID in table ad_table_tree- See Also:
OrganizationEnabled
, Constant Field Values
-
PROPERTY_ACTIVE
public static final String PROPERTY_ACTIVE
Property active stored in column Isactive in table ad_table_tree- See Also:
ActiveEnabled
, Constant Field Values
-
PROPERTY_CREATIONDATE
public static final String PROPERTY_CREATIONDATE
Property creationDate stored in column Created in table ad_table_tree- See Also:
Traceable
, Constant Field Values
-
PROPERTY_CREATEDBY
public static final String PROPERTY_CREATEDBY
Property createdBy stored in column Createdby in table ad_table_tree- See Also:
Traceable
, Constant Field Values
-
PROPERTY_UPDATED
public static final String PROPERTY_UPDATED
Property updated stored in column Updated in table ad_table_tree- See Also:
Traceable
, Constant Field Values
-
PROPERTY_UPDATEDBY
public static final String PROPERTY_UPDATEDBY
Property updatedBy stored in column Updatedby in table ad_table_tree- See Also:
Traceable
, Constant Field Values
-
PROPERTY_TABLE
public static final String PROPERTY_TABLE
Property table stored in column AD_Table_ID in table ad_table_tree
Help: The Table indicates the table in which a field or fields reside.- See Also:
- Constant Field Values
-
PROPERTY_LINKTOPARENTCOLUMN
public static final String PROPERTY_LINKTOPARENTCOLUMN
Property linkToParentColumn stored in column Linktoparentcolumn in table ad_table_tree
Help: 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- See Also:
- Constant Field Values
-
PROPERTY_NODEIDCOLUMN
public static final String PROPERTY_NODEIDCOLUMN
Property nodeIdColumn stored in column Nodeidcolumn in table ad_table_tree
Help: For Link to Parent tables: column that represents the id of the node. Usually the id column should be used.- See Also:
- Constant Field Values
-
PROPERTY_HASMULTIPARENTNODES
public static final String PROPERTY_HASMULTIPARENTNODES
Property hasMultiparentNodes stored in column Hasmultiparentnodes in table ad_table_tree
Help: 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.- See Also:
- Constant Field Values
-
PROPERTY_MODULE
public static final String PROPERTY_MODULE
Property module stored in column AD_Module_ID in table ad_table_tree
Help: Indicates the module the element forms part of.- See Also:
- Constant Field Values
-
PROPERTY_APPLYWHERECLAUSETOCHILDNODES
public static final String PROPERTY_APPLYWHERECLAUSETOCHILDNODES
Property applyWhereClauseToChildNodes stored in column Applywhereclausetochildnodes in table ad_table_tree
Help: 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.- See Also:
- Constant Field Values
-
PROPERTY_NAME
public static final String PROPERTY_NAME
Property name stored in column Name in table ad_table_tree- See Also:
- Constant Field Values
-
PROPERTY_ISPARENTSELECTIONALLOWED
public static final String PROPERTY_ISPARENTSELECTIONALLOWED
Property isParentSelectionAllowed stored in column Isparentselectionallowed in table ad_table_tree
Help: This property is used to define if non-leaf nodes are allowed to be selected in a tree reference.- See Also:
- Constant Field Values
-
PROPERTY_ISORDERED
public static final String PROPERTY_ISORDERED
Property isOrdered stored in column Isordered in table ad_table_tree
Help: 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.- See Also:
- Constant Field Values
-
PROPERTY_TREESTRUCTURE
public static final String PROPERTY_TREESTRUCTURE
Property treeStructure stored in column Treestructure in table ad_table_tree
Help: 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- See Also:
- Constant Field Values
-
PROPERTY_DATASOURCE
public static final String PROPERTY_DATASOURCE
Property datasource stored in column Obserds_Datasource_ID in table ad_table_tree
Help: Datasource used to feed the table- See Also:
- Constant Field Values
-
PROPERTY_HANDLENODESMANUALLY
public static final String PROPERTY_HANDLENODESMANUALLY
Property handleNodesManually stored in column Ishandlenodesmanually in table ad_table_tree
Help: 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.- See Also:
- Constant Field Values
-
PROPERTY_ISMAINTREE
public static final String PROPERTY_ISMAINTREE
Property isMainTree stored in column Ismaintree in table ad_table_tree
Help: 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.- See Also:
- Constant Field Values
-
PROPERTY_NODEDELETIONPOLICY
public static final String PROPERTY_NODEDELETIONPOLICY
Property nodeDeletionPolicy stored in column NodeDeletionPolicy in table ad_table_tree
Help: It defines the behavior when a node item is deleted- See Also:
- Constant Field Values
-
-
Method Detail
-
getEntityName
public String getEntityName()
- Specified by:
getEntityName
in interfaceIdentifiable
- Specified by:
getEntityName
in classBaseOBObject
-
getId
public String getId()
- Specified by:
getId
in interfaceBaseOBObjectDef
- Specified by:
getId
in interfaceIdentifiable
- Overrides:
getId
in classBaseOBObject
- See Also:
PROPERTY_ID
-
setId
public void setId(String id)
- See Also:
PROPERTY_ID
-
getClient
public Client getClient()
Description copied from interface:ClientEnabled
Client field- Specified by:
getClient
in interfaceClientEnabled
- Returns:
- client
- See Also:
PROPERTY_CLIENT
-
setClient
public void setClient(Client client)
Description copied from interface:ClientEnabled
Client field- Specified by:
setClient
in interfaceClientEnabled
- See Also:
PROPERTY_CLIENT
-
getOrganization
public Organization getOrganization()
Description copied from interface:OrganizationEnabled
Gets organization field- Specified by:
getOrganization
in interfaceOrganizationEnabled
- Returns:
- organization
- See Also:
PROPERTY_ORGANIZATION
-
setOrganization
public void setOrganization(Organization organization)
Description copied from interface:OrganizationEnabled
Sets organization field- Specified by:
setOrganization
in interfaceOrganizationEnabled
- See Also:
PROPERTY_ORGANIZATION
-
isActive
public Boolean isActive()
Description copied from interface:ActiveEnabled
Gets active field- Specified by:
isActive
in interfaceActiveEnabled
- Returns:
- active
- See Also:
PROPERTY_ACTIVE
-
setActive
public void setActive(Boolean active)
Description copied from interface:ActiveEnabled
Sets active field- Specified by:
setActive
in interfaceActiveEnabled
- See Also:
PROPERTY_ACTIVE
-
getCreationDate
public Date getCreationDate()
Description copied from interface:Traceable
Creation date of audit- Specified by:
getCreationDate
in interfaceTraceable
- Returns:
- Date of creation
- See Also:
PROPERTY_CREATIONDATE
-
setCreationDate
public void setCreationDate(Date creationDate)
Description copied from interface:Traceable
Creation date of audit- Specified by:
setCreationDate
in interfaceTraceable
- See Also:
PROPERTY_CREATIONDATE
-
getCreatedBy
public User getCreatedBy()
Description copied from interface:Traceable
Created by audit user- Specified by:
getCreatedBy
in interfaceTraceable
- Returns:
- User
- See Also:
PROPERTY_CREATEDBY
-
setCreatedBy
public void setCreatedBy(User createdBy)
Description copied from interface:Traceable
Created by audit user- Specified by:
setCreatedBy
in interfaceTraceable
- See Also:
PROPERTY_CREATEDBY
-
getUpdated
public Date getUpdated()
Description copied from interface:Traceable
Update date of audit- Specified by:
getUpdated
in interfaceTraceable
- Returns:
- Date of update
- See Also:
PROPERTY_UPDATED
-
setUpdated
public void setUpdated(Date updated)
Description copied from interface:Traceable
Update date of audit- Specified by:
setUpdated
in interfaceTraceable
- See Also:
PROPERTY_UPDATED
-
getUpdatedBy
public User getUpdatedBy()
Description copied from interface:Traceable
Update by audit user- Specified by:
getUpdatedBy
in interfaceTraceable
- Returns:
- User who updated
- See Also:
PROPERTY_UPDATEDBY
-
setUpdatedBy
public void setUpdatedBy(User updatedBy)
Description copied from interface:Traceable
Update by audit user- Specified by:
setUpdatedBy
in interfaceTraceable
- See Also:
PROPERTY_UPDATEDBY
-
getTable
public Table getTable()
- See Also:
PROPERTY_TABLE
-
setTable
public void setTable(Table table)
- See Also:
PROPERTY_TABLE
-
getLinkToParentColumn
public Column getLinkToParentColumn()
- See Also:
PROPERTY_LINKTOPARENTCOLUMN
-
setLinkToParentColumn
public void setLinkToParentColumn(Column linkToParentColumn)
- See Also:
PROPERTY_LINKTOPARENTCOLUMN
-
getNodeIdColumn
public Column getNodeIdColumn()
- See Also:
PROPERTY_NODEIDCOLUMN
-
setNodeIdColumn
public void setNodeIdColumn(Column nodeIdColumn)
- See Also:
PROPERTY_NODEIDCOLUMN
-
isHasMultiparentNodes
public Boolean isHasMultiparentNodes()
- See Also:
PROPERTY_HASMULTIPARENTNODES
-
setHasMultiparentNodes
public void setHasMultiparentNodes(Boolean hasMultiparentNodes)
- See Also:
PROPERTY_HASMULTIPARENTNODES
-
getModule
public Module getModule()
- See Also:
PROPERTY_MODULE
-
setModule
public void setModule(Module module)
- See Also:
PROPERTY_MODULE
-
isApplyWhereClauseToChildNodes
public Boolean isApplyWhereClauseToChildNodes()
- See Also:
PROPERTY_APPLYWHERECLAUSETOCHILDNODES
-
setApplyWhereClauseToChildNodes
public void setApplyWhereClauseToChildNodes(Boolean applyWhereClauseToChildNodes)
- See Also:
PROPERTY_APPLYWHERECLAUSETOCHILDNODES
-
getName
public String getName()
- See Also:
PROPERTY_NAME
-
setName
public void setName(String name)
- See Also:
PROPERTY_NAME
-
isParentSelectionAllowed
public Boolean isParentSelectionAllowed()
- See Also:
PROPERTY_ISPARENTSELECTIONALLOWED
-
setParentSelectionAllowed
public void setParentSelectionAllowed(Boolean isParentSelectionAllowed)
- See Also:
PROPERTY_ISPARENTSELECTIONALLOWED
-
isOrdered
public Boolean isOrdered()
- See Also:
PROPERTY_ISORDERED
-
setOrdered
public void setOrdered(Boolean isOrdered)
- See Also:
PROPERTY_ISORDERED
-
getTreeStructure
public String getTreeStructure()
- See Also:
PROPERTY_TREESTRUCTURE
-
setTreeStructure
public void setTreeStructure(String treeStructure)
- See Also:
PROPERTY_TREESTRUCTURE
-
getDatasource
public DataSource getDatasource()
- See Also:
PROPERTY_DATASOURCE
-
setDatasource
public void setDatasource(DataSource datasource)
- See Also:
PROPERTY_DATASOURCE
-
isHandleNodesManually
public Boolean isHandleNodesManually()
- See Also:
PROPERTY_HANDLENODESMANUALLY
-
setHandleNodesManually
public void setHandleNodesManually(Boolean handleNodesManually)
- See Also:
PROPERTY_HANDLENODESMANUALLY
-
isMainTree
public Boolean isMainTree()
- See Also:
PROPERTY_ISMAINTREE
-
setMainTree
public void setMainTree(Boolean isMainTree)
- See Also:
PROPERTY_ISMAINTREE
-
getNodeDeletionPolicy
public String getNodeDeletionPolicy()
- See Also:
PROPERTY_NODEDELETIONPOLICY
-
setNodeDeletionPolicy
public void setNodeDeletionPolicy(String nodeDeletionPolicy)
- See Also:
PROPERTY_NODEDELETIONPOLICY
-
-