The SQL repository is a generalized and flexible implementation of the ATG Repository API that an application can use to access data stored in a SQL database. See the Repository API chapter for more information. The SQL repository is implemented through the atg.adapter.gsa package. (GSA stands for “Generic SQL Adapter.”) The main ATG component in the SQL repository is an instance of the atg.adapter.gsa.GSARepository class, which implements the interfaces atg.repository.MutableRepository and atg.repository.content.ContentRepository and which extends the class atg.repository.RepositoryImpl. Whenever you need to create a new SQL repository instance, you should instantiate the atg.adapter.gsa.GSARepository class. The ATG API Reference does not include Javadoc for this class and it is not intended that you access this class directly from Java code. Normally, you should access all Repository functionality using the interfaces atg.repository.Repository and atg.repository.MutableRepository. This will enable your classes to work with any repository implementation for the greatest flexibility. Certain methods like those for cache invalidation are defined on the class atg.repository.RepositoryImpl. It is anticipated that future repositories will extend that class and so again you can make your code more reusable and maintainable by accessing those methods on this base class rather than the implementation class of atg.adapter.gsa.GSARepository.

The SQL repository uses an XML file called a repository definition file to describe the item descriptors that make up a repository. The repository definition file also describes the relationships between the repository’s item descriptors, repository items, and repository item properties, on the one hand, and the SQL database’s tables, rows, and columns. The XML tags that make up the repository definition file are described in detail in the SQL Repository Reference chapter. The XML tags are also introduced in the examples in this chapter and in the SQL Repository Item Properties chapter.

 
loading table of contents...