Simple Repository Example
Overview
The task is to set up a simple repository from scratch.
Database Table
| STUDENT |
| ID |
integer (primary key) |
| NAME |
string |
| GPA |
number(28, 20) (double) |
Repository Item
| Student |
|
|
id |
integer (primary key) |
| fullName |
string |
| gpa |
double |
Repository Component
A atg.adapter.gsa.GSARepository with the nucleus name /Repository/StudentRepository
Steps
- Create your database table using the HTTP admin UI on port 8830 or via SQL
- Create the Template Definition File named StudentRepository.xml in the
Repository folder under your CONFIGPATH. Use the
file C:\ATG\Dynamo5.1\DAS\src\config\atg\dynamo\service\jdbc\sqlRepository.xml
as a template to get started
- Configure your repository component from scratch or just copy (right
click) the atg\dynamo\service\jdbc\SQLRepository component in the DCC and
paste it to where you want it, then just change the definitionFiles property
to reference your new xml file
Help
CREATE TABLE Student (
id INTEGER not null,
NAME VARCHAR(32) null,
GPA NUMERIC(28, 20) null,
primary key(id)
);
|