The BasicLibrary stereotype identifies a Library part that
contains EGL-written functions and values that are used at run time
in other EGL logic parts.
The following rules apply to a BasicLibrary:
- If a generatable logic part (Service,
Handler, or another Library) includes the Library in a use statement,
that part can reference the functions, variables, and constants of
a Library without specifying the Library name.
- To keep a function, variable, or constant declaration from being
used outside of the Library, you can use the private modifier
on the element. You might do this when the element is used only by
a function within the Library.
- Public Library functions (the default) are available outside of
the Library and cannot have loose type parameters. A loose type is
a special case of primitive type that is available only if you want
the parameter to accept a range of argument lengths. For more information,
see Loose types.
The following example shows a Library part that uses the BasicLibrary
stereotype:
package com.companyb.customer;
Record CustomerRecord type SQLRecord
customerNumber CHAR(6);
customerName CHAR(25);
customerBalance BIN(9,2);
end
Library CustomerLibrary type BasicLibrary
// Function Declarations
function getCustomerName(
myCustomerNumber CHAR(6) in,
myCustomerName CHAR(25) inOut)
myCustomer CustomerRecord;
myCustomer.customerNumber = myCustomerNumber;
get myCustomer;
myCustomerName = myCustomer.customerName;
end
end