+

Search Tips   |   Advanced Search

Resources, resource instances, and resource collections

A resource class defines the properties of a user or content object. It is analogous to the database scheme that defines the column names and types for a database table. Resource classes must implement the com.ibm.websphere.personalization.resources.Resource interface

A resource instance is an instance of the resource class. The resource instance is similar to a row of a database table because it contains actual values for each property defined by the resource.

A resource collection is a Java class that represents and allows access to a collection of resource instances. It is similar to a database table with a fixed schema and a number of rows. Resource collection classes must implement the com.ibm.websphere.personalization.resources.ResourceDomain3 interface. Rational Application Developer provides a wizard that can create resource collections that store data in SQL databases or LDAP repositories. The classes that can make up the resource collection are as follows:

For more details, refer to the Javadoc API documentation for Personalization APIs We can provide our own implementation of these classes or use the RAD Personalization Wizard to generate classes that query against SQL or LDAP repositories.

While resources, resource instances, and resource collections easily mapped to familiar database concepts, it is important to note that the actual content store they refer to does not have to be a database table. It can be a file system, an LDAP repository, an XML store, or virtually any content store accessible by Java.


Parent: Personalization terms
Next: User resources