PeopleCode

PeopleCode
Paradigm multi-paradigm: object-oriented, imperative
Developer Oracle Corporation

PeopleCode is an object-oriented, proprietary language used to express business logic for PeopleSoft applications. In its fundamentals, PeopleCode syntax resembles other programming languages. Some aspects of the PeopleCode language, however, are specifically related to the PeopleTools environment. However, the fundamentals of objects and classes are the same as in Java language. Definition name references, for example, enable you to refer to PeopleTools definitions, such as record definitions or pages, without using hard-coded string literals.[1] Other language features, such as PeopleCode data types and metastrings, reflect the close interaction of PeopleTools and Structured Query Language (SQL). Dot notation, classes and methods in PeopleCode are similar to other object oriented languages, like Java. Object syntax was an important feature of PeopleTools 8.[2]

Language features

Supported Functions

PeopleCode supports the following types of functions:[3]

Built-in: The standard set of PeopleCode functions. These can be called without being declared.

Internal: Functions that are defined (using the Function statement) within the PeopleCode program in which they are called.

External PeopleCode: PeopleCode functions defined outside the calling program. These are generally contained in record definitions that serve as function libraries.

External non-PeopleCode: Functions stored in external (C-callable) libraries.

In addition, PeopleCode supports methods. The main differences between a built-in function and a method are:

-A built-in function, in your code, is on a line by itself, and does not (generally) have any dependencies.

-You do not have to instantiate an object before you can use the function.

-A method can only be executed by an object (using dot notation).

-You must instantiate the object first.

Describing Application Class Structure

  Import PackageName:Superclassname;
   Class Classname [Extends SuperClassname]
        [Method_declarations]
        [Property_declarations]
   [Private
        [Method_declaration]
        [Instance_decalarion]
        Constant declaration
    End-class;
  Property datatype PropertyName [get][set];
  Method MethodName ([parameter_list])
  Private
    Instance DataType &InstanceName;
    Constant &Constant = {Number | String | True | False | Null };
  get Propertyname
   Return &Value;
  end-get;
  set PropertyName
   
  end-set;
  method Methodname
   statements;
  end-method;

Executing SQL in PeopleCode

  &SQL = CreateSQL("SQL Statement",[bind values]);

You can also choose to omit the values for the bind variables and supply those values later. For Insert, Update, or Delete commands these values would be supplied using Execute method. (If you supply all the necessary input values, the SQL is executed immediately.)

   &SQL = CreateSQL("SQL Statement");
   &SQL.Execute([bind_values]);

PeopleCode Functions, retrieved 2008-12-14 

See also

External links

References

  1. DeLia, Tony et al (2001). Essential Guide to Peoplesoft Development and Customization. Manning Publications Co. p.260
  2. DeLia, Tony et al (2001). Essential Guide to Peoplesoft Development and Customization. Manning Publications Co. p.417
  3. DeLia, Tony et al (2001). Essential Guide to Peoplesoft Development and Customization. p.375
This article is issued from Wikipedia - version of the Thursday, January 22, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.