The Components of Caché

pdf

Available in .pdf

Jalapeño

InterSystems Jalapeño™ technology enables the persistence of Plain Old Java Objects (POJOs) in InterSystems Caché® without object-relational mapping. It can reduce development time by up to 40%, and allows Java programmers to create their data schema within their favorite Java development tool or environment.

Jalapeño

InterSystems Jalapeño (JAva LAnguage PErsistence with NO mapping) technology provides a new way for Java developers to rapidly build database applications. Jalapeño eliminates the object-relational mapping that can soak up as much as 40% of an application’s total development cycle. But Jalapeño uniquely allows a “Java-centric” approach to application development, because it automatically derives persistent Caché classes from Java data class definitions.

Jalapeño lets Java programmers define data classes and build applications within their favorite Java development environments and not be concerned with the mechanics of how their data objects will be stored. They can develop using objectoriented techniques, and, because their data is persisted in Caché, still query it using SQL via JDBC.

At runtime, Jalapeño provides the mechanisms needed for Java classes to interact – via either object or relational access – with their data housed in Caché’s powerful multidimensional database.

Jalapeño has two main components – the Schema Builder, and the Object Manager. Both are Java classes provided as part of the CacheDB.JAR file.

The Jalapeño Schema Builder

Within any Java development environment, importing and invoking InterSystems Jalapeño Schema Builder will automatically create and compile Caché classes that correspond to the Java classes for which persistence is required. Jalapeño provides a full catalog of annotations (a Java feature introduced in JDK 1.5) that can be used to tell the Schema Builder certain things about the objects it will build. For example, by adding the appropriate annotations to their Java class definitions, developers can instruct the Schema Builder to build an index for a property of a class, to set constraints in property values, or to include one class as a collection within another.

Jalapeño Schema Builder

 

The Jalapeño Object Manager

The Java classes that make up Java applications are not, by definition, persistent, and so do not include methods that control database functions. The Jalapeño Object Manager is a Java class that, when instantiated in a Java application, takes care of all interactions between the application and its persistent data housed in Caché. This includes storing and retrieving objects to and from the database, assigning values to properties of objects, etc. Caché allows both object and relational access to data via the same database connection, so the Object Manager also handles SQL queries of the database.

Jalapeño Object Manager

 

Database Independence with Jalapeño

Jalapeño supports database independence by providing an export utility that will convert the Caché class schema (originally derived from pure Java class definitions) to a DDL file that can be imported into a relational database. The Object Manager automatically uses object persistence methods (Open, Save, New, Delete) when accessing Caché, and relational persistence methods (Select, Update, Insert, Delete) when it is configured to connect to a relational database. Developers are likely to find that their Java applications run faster on Caché than on relational databases.