Database Reference
In-Depth Information
programmed and the actions that can be performed on those components. Although
it sounds complicated, it really is not. The objects that comprise the Essbase Java API
object model are the objects most Essbase professionals work with every day in EAS
(Essbase Administrative Services) or maxL, the only difference being that they use a
funny Java naming convention. In this section, you will learn about these objects and
how they are organized, but first we will discuss some basic Java terminology that will
be used throughout the chapter.
Java code is organized into files called classes . A class contains the definition, or
blueprint, for an object. An object is defined by describing its attributes, describing
what it can do and describing what happens to it. An attribute used to describe an
object is called a property . A property describes a single aspect of an object, and an
object may have many properties that describe it. to use a real-world example, a planet
may be described, in part, by its color, how many moons it has, and whether it has life
on it. In object-oriented terms, you could say a planet object has color, moonCount,
and hasLife properties. objects can often do things, or have actions that they can take.
In object-oriented terms, an action is called a method . For example, a planet may have
a rotate method. objects also may have things that happen to them. In programming
terminology, the things that can happen to an object are called events . For example, a
planet may have a dayOccurred event.
A class is a definition of an object, but it is not considered an object. In essence, it is
the pattern from which an object is created. An object created from the pattern is called
an object instance. An instance can store properties that describe the object. An exam-
ple of an instance of a planet object is Earth. This instance, Earth, has a color property of
blue, a moonCount property of 1, and a hasLife property of true. one or more instances
of a class, grouped together, are referred to as a collection of objects. using our planet
example, you could say that our solar system is a collection of planets.
In Java, related classes are organized into directory hierarchies where the directories
are named based on the functionality provided by the classes they contain. The direc-
tory hierarchies are called packages . related packages, in turn, are grouped together
for deployment in jar files. A jar file is a self-contained collection of classes compressed
into a single file that, internally, maintains its package hierarchy. In other words, it is a
glorified zip ile.
now that we have learned how Java code is organized and distributed, let us turn
our attention to how Java classes are organized in the Essbase Java API. The Java API
is organized into six major packages. The packages, along with their functionality, are
displayed in table 8.1.
Classes from these packages are split between two different jar files for deploy-
ment. The “ess_japi.jar” file contains classes required for the client portion of the API,
while the “ess_es_server.jar” file contains classes required by the server components of
the API.
The Essbase packages contain two distinct types of classes: interfaces and concrete
classes. An interface class is a special type of class that contains only the property and
method definitions and is used to define a public programming interface. A concrete
class, on the other hand, is a class that can be instantiated and, in the case of the Essbase
Java API, oten implements an interface. Interfaces provide a consistent contract between
an API and its consumers. Interfaces also provide freedom for the implementers of
an API to implement functionality as needed, while maintaining a consistent exter-
nal interface. Though it is possible to write code against the concrete Essbase classes,
Search WWH ::




Custom Search