A repository is a collection of repository items. A repository item is a JavaBean component that implements atg.repository.RepositoryItem or one of its sub-interfaces, and corresponds to the smallest uniquely identifiable entity in the underlying data store. In the SQL repository, for example, a repository item often corresponds roughly to a row in a table. In the SQL profile repository, each user profile is a repository item.


Each repository item is composed of named properties that store the item’s data—for example, id, firstName, and lastName. In the SQL repository, these properties generally correspond to table columns. Repository item properties are defined in its item descriptor.

Repository item properties can be single-or multi-valued. In some repository implementations such as the SQL repository, a property’s value can refer to one or more other repository items, either in the same or another repository. This enables a repository item to use properties that are complex data structures..

Repository IDs

Each repository item must have an identifier, which is called a repository ID. The repository ID must uniquely differentiate the repository item from all other repository items of the same type. The repository is typically configured to find the repository ID from some elements of the underlying data. In the SQL repository, for instance, each item descriptor must specify the columns that act as the repository ID, usually the same as the table’s primary key. Depending on the repository’s configuration, the repository ID might not be exposed as a property of the repository item.

The combination of item descriptors, properties, identifiers, and items allows a repository to read application data from the underlying data store and write application data back to it. If desired, a repository can be defined to expose certain properties, item descriptors, or the entire repository as read-only. Properties can also act as translators between the underlying data source and the Java application. For example, you might want your Oracle ATG Web Commerce application to display last names in upper case. You can define a repository property named lastNameUpperCase that takes the last name value from the database and returns it in upper case. The Repository API provides this and other options without requiring you to modify any application code.