@Exported
See: Description
Interface | Description |
---|---|
Attribute |
Base class for
StandardAttribute and CustomAttribute . |
AttributeTrigger |
A trigger for an attribute.
|
AttributeValidator |
A validator for an attribute.
|
BusinessObject |
A business object can be customizable or reference-only.
|
BusinessObjectFunction |
A function for a business object.
|
BusinessObjectTrigger |
A business object trigger.
|
BusinessObjectValidator |
A validator for a business object.
|
CustomAttribute |
A custom attribute for a business object.
|
DataFilter |
Data filter that is used in dynamic choice list to further refine the
set of data appearing within the list of values.
|
FunctionParameter |
A parameter for a function.
|
GlobalFunction |
A global function.
|
LookupCode |
A lookup code.
|
LookupType |
A lookup type.
|
ObjectVisitor | |
StandardAttribute |
A standard attribute for a business object.
|
Class | Description |
---|---|
BaseObjectVisitor | |
BusinessEditorManager |
A logical container for the business objects.
|
CustomObjectInfo |
Class contains options that affect how a custom object is created.
|
LookupManager |
A logical container for the lookup objects.
|
ObjectReportGenerator |
Enum | Description |
---|---|
AttributeTriggerType |
The logical trigger types used by attribute triggers
|
AttributeType |
The formule types used by formula custom attribute
|
BusinessObjectFunctionVisibilityType |
The logical visibility types used by business object function visibility
|
BusinessObjectTriggerType |
The logical trigger types used by business object triggers
|
ComparisonOperator |
The comparison operator used by data filter
|
DatetimeDisplayType |
The display type used by Datetime custom attribute
|
FormulaType |
The formule types used by formula custom attribute
|
Contains public APIs that are used to create, update, and delete business objects.
Once an object is read from the APIs, any change made to the object by another process is not read until commit or rollback is called.
BusinessEditorManager manager = new BusinessEditorManager(); // Get the emp business object BusinessObject emp = manager.findBusinessObject(EMP_VIEW); emp.setDisplayLabel("Employee"); emp.setDisplayNamePlural("Employees"); emp.setDescription("Employee"); // Get the ename attribute from emp business object Attribute ename = emp.findAttribute("Ename"); ename.setRequired(true); ename.setDisplayLabel("Employee Name); // Create new custom attributes in emp business object CustomAttribute jobTitle = emp.createAttribute("JobTitle"); CustomAttribute email = emp.createAttribute("Email"); // Create custom business object BusinessObject trainingCourse = manager.createBusinessObject("TrainingCourse"); CustomAttribute courseCode = trainingCourse.createAttribute("Code"); CustomAttribute courseName = trainingCourse.createAttribute("Name"); // commit manager.commit();
Assuming code from Example1.java was executed, the following example illustrates how to modify custom business objects and attributes.
BusinessEditorManager manager = new BusinessEditorManager(); // Retrieve custom attribute from emp and modify BusinessObject emp = manager.findBusinessObject(EMP_VIEW); Attribute jobTitle = emp.findAttribute("JobTitle"); jobTitle.setDisplayLabel("Job Title"); Attribute email = emp.findAttribute("Email"); email.setRequired(true); // Retrieve custom attribute from custom business objects and modify BusinessObject trainingCourse = manager.findBusinessObject("TrainingCourse"); CustomAttribute courseCode = (CustomAttribute)trainingCourse.findAttribute("Code"); courseCode.setRequired(true); courseCode.setMinLength(4); Attribute courseName = trainingCourse.findAttribute("Name"); courseName.setRequired(true); // commit manager.commit();
The following example illustrates how to retrieve existing lookup code.
LookupManager lkManager = new LookupManager(); LookupType autoLK = lkManager.findLookupType("AUTO_MAKE"); Collection<LookupCode> codes = autoLK.getLookupCodes(); for (LookupCode code : codes) { System.out.println("Code : " + code.getCode()); System.out.println("Meaning : " + code.getMeaning()); System.out.println("Description: " + code.getDescription()); }
The following example illustrates how to create lookup code.
LookupManager lkManager = new LookupManager(); LookupType countriesLK = lkManager.findLookupType("COUNTRY"); countriesLK = lkManager.createLookupType("COUNTRY", "Country", null); Collection countries = countriesLK.getLookupCodes(); LookupCode lk1 = countriesLK.addLookup("CA", "Canada", "HR"); lk1.setEnabled(false); LookupCode lk2 = countriesLK.addLookup("USA", "United States of America", "HQ"); lk2.setDisplaySequence(1.0); LookupCode lk3 = countriesLK.addLookup("MEX", "Mexico", null); // commit lkManager.commit();
The following example illustrates how to create cascading picklist.
BusinessEditorManager manager = new BusinessEditorManager(); BusinessObject bo = manager.findBusinessObject(EMP_VIEW); // create parent picklist CustomAttribute parentPL = bo.createAttribute("ParentPL", FieldTypes.FIXED_CHOICE_LIST); parentPL.setFixedChoiceListLookupType("AUTO_MAKE"); // Create value mapping for cascading picklist List childCodesForVW = new ArrayList(); childCodesForVW.add("GLF"); childCodesForVW.add("BTL"); List childCodesForAudi = new ArrayList(); childCodesForAudi.add("A4"); childCodesForAudi.add("A5"); List childCodesForToyota = new ArrayList(); childCodesForToyota.add("RAV"); childCodesForToyota.add("CMY"); Map<String, List> valueMap = new HashMap<String, List>(); valueMap.put("VW", childCodesForVW); valueMap.put("AU", childCodesForAudi); valueMap.put("TY", childCodesForToyota); // create child picklist CustomAttribute childPL = bo.createAttribute("ChildPL", FieldTypes.FIXED_CHOICE_LIST); childPL.setFixedChoiceListLookupType("AUTO_MODEL"); childPL.setParentChoiceList(parentPL, valueMap); // commit manager.commit();
The following example illustrates how to create dynamic choice list.
BusinessEditorManager manager = new BusinessEditorManager(); BusinessObject bo = manager.findBusinessObject(EMP_VIEW); Attribute empno = emp.findAttribute("Empno"); Attribute ename = emp.findAttribute("Ename"); Attribute comm = emp.findAttribute("Comm"); Attribute sal = emp.findAttribute("Sal"); BusinessObject bo = manager.createBusinessObject("EmpComp"); CustomAttribute attr = bo.createAttribute("EmpAttr", FieldTypes.DYNAMIC_CHOICE_LIST); attr.setListDisplayAttribute(empno); attr.addDisplayAttribute(ename); attr.addDisplayAttribute(comm); attr.addDisplayAttribute(sal); attr.addSearchAttribute(comm); attr.addSearchAttribute(sal); // commit manager.commit();