Support for POJOs
TeaOperation supports Plain Old Java Object (POJO) as parameters and return types.
To enable POJO support, you must enable the
enable_class_generation property on
EnterpriseAdministrator as follows:
import tibco.tea
tea =tibco.tea.EnterpriseAdministrator(config={'enable_class_generation':True})
The property is, by default, set to false, so ensure that you set this to true if you want the Python scripts to support POJO objects. POJO support comes with some supported scenarios and limitations.
Supported Scenarios
The following java objects are supported as a parameter or a return type:
- A POJO
- Array of POJO
- List of POJOs
- Map of POJOs
- Nested POJOs
- A list of POJOs passed as a parameter to a Map is supported as a return type.
- If you have classes with same names in different packages, underscore separated fully qualified names are used to distinguish them. For example, if there is a class by the name,
TeaAgentincom.tibco.tea.agentA, andcom.tibco.tea.agent.agentB, the class in packageagentAis identified by usingcom_tibco_tea_agent_agentA_TeaAgentand the class inagentBis identified by usingcom_tibco_tea_agent_agentB_TeaAgent.Fully Qualified Name in Java Fully Qualified Name in Python com.tibco.tea.agent.agentA.TeaAgentcom_tibco_tea_agent_agentA_TeaAgentcom.tibco.tea.agent.agentB.TeaAgentcom_tibco_tea_agent_agentB_TeaAgent
Subtopics