ATG Repository supports data anywhere architecture. We will begin creating simple repository from requirements. For further more technical aspects related to repository, ATG Repository Guide is helpful.
Few Must read points:
1. Every XML Definition file should begin with <gsa-template> tag.
2. <gsa-template> can contain N number of <item-descriptor>'s.
3. <item-descriptor> can contain only one Primary Table, N number of Auxillary and Multi tables.
Step 1. Analyse the Requirement.
From Above diagram, following points are collected.
Step 2: Drawing in line repository structure.
Above diagram is pretty self explanatory.
Step 3: Creating the XML Definition file(with minimal required attributes)
PUBLIC "-//Art Technology Group, Inc.//DTD General SQL Adapter//EN"
"http://www.atg.com/dtds/gsa/gsa_1.0.dtd">
<gsa-template>
<header>
<name>Library Repository</name>
<author>Iranna</author>
</header>
<item-descriptor name="author" display-name="author" >
<table name="AUTHOR_MASTER" type="primary" id-column-name="author_id">
<property name="id" column-name="author_id"/>
<property name="firstName" column-name="first_name" display-name="firstName" data-type="string"/>
<property name="lastName" column-name="last_name" display-name="lastName" data-type="string"/>
<property name="dob" column-name="dob" display-name="dateOfBirth" data-type="date"/>
<property name="gender" column-name="gender" display-name="gender" data-type="enumerated">
<attribute name="useCodeForValue" value="true"/>
<option value="Male" code="101"/>
<option value="Female" code="202"/>
<option value="DontSpecify" code="303"/>
</property>
</table>
</item-descriptor>
<item-descriptor name="book" display-name="book" >
<table name="BOOK_MASTER" type="primary" id-column-name="book_id">
<property name="id" column-name="book_id"/>
<property name="name" column-name="name" display-name="name" data-type="string"/>
<property name="description" column-name="description" display-name="description" data-type="big string"/>
<property name="price" column-name="price" display-name="price" data-type="double"/>
<property name="pages" column-name="pages" display-name="pages" data-type="int"/>
<property name="available" column-name="available" display-name="available" data-type="boolean"/>
</table>
</item-descriptor>
</gsa-template>
Step 4: Creating the Component for XML Definition file.
Path: /my/Library.properties
$class=atg.adapter.gsa.GSARepository
$scope=global
repositoryName=Library
# database access- for making repositry as versioned, use SwitchingDataSource else use JTDataSource
dataSource=/atg/dynamo/service/jdbc/SwitchingDataSource
transactionManager=/atg/dynamo/transaction/TransactionManager
# our XML definitionFile
definitionFiles=/my/library.xml
# XML parsing
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
# id generation
idGenerator=/atg/dynamo/service/IdGenerator
Few Must read points:
1. Every XML Definition file should begin with <gsa-template> tag.
2. <gsa-template> can contain N number of <item-descriptor>'s.
3. <item-descriptor> can contain only one Primary Table, N number of Auxillary and Multi tables.
Step 1. Analyse the Requirement.
From Above diagram, following points are collected.
- There are two separate OBJECTS, which can be clubbed together. So now these two Objects "Author" and "Book" will treated as Items(<item-descriptor>) under the one repository XML definition file.
- Identify the each Property under the each Object. Identify the Data Types of each.
Step 2: Drawing in line repository structure.
Above diagram is pretty self explanatory.
Step 3: Creating the XML Definition file(with minimal required attributes)
File Name: /my/library.xml
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE gsa-templatePUBLIC "-//Art Technology Group, Inc.//DTD General SQL Adapter//EN"
"http://www.atg.com/dtds/gsa/gsa_1.0.dtd">
<gsa-template>
<header>
<name>Library Repository</name>
<author>Iranna</author>
</header>
<item-descriptor name="author" display-name="author" >
<table name="AUTHOR_MASTER" type="primary" id-column-name="author_id">
<property name="id" column-name="author_id"/>
<property name="firstName" column-name="first_name" display-name="firstName" data-type="string"/>
<property name="lastName" column-name="last_name" display-name="lastName" data-type="string"/>
<property name="dob" column-name="dob" display-name="dateOfBirth" data-type="date"/>
<property name="gender" column-name="gender" display-name="gender" data-type="enumerated">
<attribute name="useCodeForValue" value="true"/>
<option value="Male" code="101"/>
<option value="Female" code="202"/>
<option value="DontSpecify" code="303"/>
</property>
</table>
</item-descriptor>
<item-descriptor name="book" display-name="book" >
<table name="BOOK_MASTER" type="primary" id-column-name="book_id">
<property name="id" column-name="book_id"/>
<property name="name" column-name="name" display-name="name" data-type="string"/>
<property name="description" column-name="description" display-name="description" data-type="big string"/>
<property name="price" column-name="price" display-name="price" data-type="double"/>
<property name="pages" column-name="pages" display-name="pages" data-type="int"/>
<property name="available" column-name="available" display-name="available" data-type="boolean"/>
</table>
</item-descriptor>
</gsa-template>
Step 4: Creating the Component for XML Definition file.
Path: /my/Library.properties
$class=atg.adapter.gsa.GSARepository
$scope=global
repositoryName=Library
# database access- for making repositry as versioned, use SwitchingDataSource else use JTDataSource
dataSource=/atg/dynamo/service/jdbc/SwitchingDataSource
transactionManager=/atg/dynamo/transaction/TransactionManager
# our XML definitionFile
definitionFiles=/my/library.xml
# XML parsing
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
# id generation
idGenerator=/atg/dynamo/service/IdGenerator
Nice explanation
ReplyDeleteAwesome Excellent please dont stop posting.....
ReplyDeleteExcellent information for learners
ReplyDeleteThanks for explaining...
ReplyDeleteCould you please give any explanations about table relationships, DML operations in ATG as well.
It will be helpfulfor me.
Thanks in advance
Helpful ,thanks
ReplyDeleteCould you please explain PropertyDescriptor in ATG in detail. Thanks In advance.
ReplyDeleteYes. That's one of my to-do. I will be posting soon about "Derived properties and User-defined properties".
Deletehow I will use a custom repository in a java class
ReplyDeletefor eg,suppose i have a repository like SongRepository and there is a java class SongList.java Now my question is How will i create instance of this songrepository in the Songlist.java
You need to create property of type 'Repository' in your class. And then create setter and getter for the same. And in SongList.properties, map the property to SongRepository. Then you have access to SongRepository in SongList.java
DeleteRegards,
Iranna
what is item and item descriptor ? and what is repository item can any one explain?
ReplyDeleteItem descriptor is a collection of tables and repository item is a row in table.
DeleteNice Explaination.
ReplyDeleteWish you a very Happy new year
Daily Inspiration Peak
ReplyDeleteVery nice. Find useful bihar gk in hindi
ReplyDeleteDiyarbakır
ReplyDeleteAdana
Bursa
izmir
Sakarya
20CZRU
Kocaeli
ReplyDeleteDenizli
Bartın
Kocaeli
Adana
EJ7
bitlis
ReplyDeletekastamonu
çorum
van
sakarya
OGÄ°
whatsapp goruntulu show
ReplyDeleteshow
LQMB
https://titandijital.com.tr/
ReplyDeletebingöl parça eşya taşıma
kırşehir parça eşya taşıma
gümüşhane parça eşya taşıma
rize parça eşya taşıma
253Ä°
şırnak evden eve nakliyat
ReplyDeletemuÄŸla evden eve nakliyat
hatay evden eve nakliyat
niÄŸde evden eve nakliyat
ardahan evden eve nakliyat
YDS8P8
kayseri evden eve nakliyat
ReplyDeletesamsun evden eve nakliyat
muÄŸla evden eve nakliyat
bursa evden eve nakliyat
bingöl evden eve nakliyat
YM40C
785DD
ReplyDeleteKütahya Lojistik
Erzurum Lojistik
İstanbul Parça Eşya Taşıma
Kilis Parça Eşya Taşıma
Aksaray Şehirler Arası Nakliyat
Tokat Evden Eve Nakliyat
MuÅŸ Evden Eve Nakliyat
Tunceli Parça Eşya Taşıma
MaraÅŸ Evden Eve Nakliyat
77977
ReplyDeleteArtvin Şehirler Arası Nakliyat
Gate io Güvenilir mi
Bolu Lojistik
Erzincan Evden Eve Nakliyat
Sincan Fayans Ustası
Amasya Şehirler Arası Nakliyat
Mersin Şehirler Arası Nakliyat
Altındağ Parke Ustası
Bitlis Şehir İçi Nakliyat
3ED90
ReplyDeleteSilivri Evden Eve Nakliyat
Edirne Lojistik
Diyarbakır Şehirler Arası Nakliyat
Burdur Evden Eve Nakliyat
Artvin Evden Eve Nakliyat
Çerkezköy Oto Boya
Çerkezköy Boya Ustası
Ceek Coin Hangi Borsada
Antep Şehirler Arası Nakliyat
8FFCB
ReplyDelete%20 binance referans kodu
4B27D
ReplyDeletereferanskodunedir.com.tr
8208C
ReplyDeletemuğla canlı sohbet bedava
Bayburt Görüntülü Sohbet
Rize Mobil Sohbet Siteleri
Eskişehir Mobil Sohbet Odaları
Afyon Sesli Görüntülü Sohbet
giresun rastgele sohbet uygulaması
kastamonu en iyi ücretsiz sohbet uygulamaları
antep bedava sohbet siteleri
yabancı görüntülü sohbet siteleri
71909
ReplyDeleteDlive Takipçi Hilesi
Instagram BeÄŸeni Hilesi
Facebook Sayfa Beğeni Satın Al
Binance Ne Zaman Kuruldu
Bitcoin MadenciliÄŸi Siteleri
Bitcoin Oynama
Cate Coin Hangi Borsada
Linkedin Takipçi Satın Al
Kwai BeÄŸeni Hilesi
68253
ReplyDeleteBitcoin Nasıl Alınır
Btcst Coin Hangi Borsada
Mexc Borsası Güvenilir mi
Onlyfans Takipçi Hilesi
Bitcoin Oynama
Linkedin Takipçi Hilesi
Bitcoin Kazanma
Kripto Para Nasıl Alınır
Bitcoin Kazanma
B27C0
ReplyDeletedcent
poocoin
pancakeswap
chainlist
defillama
arbitrum
arbitrum
poocoin
dappradar