Friday, May 20, 2011

Manage custom types with DQL

I. Create custom type
CREATE TYPE "custom_document"
("booleanAttr" bool REPEATING,
"integerAttr" integer,
"commentAttr" string(10),
"numberAttr" string(20),
"idAttr" id,
"dateAttr" date,
"doubleAttr" double,
"charAttr" CHAR(20))
WITH SUPERTYPE dm_document
publish;

II. Modify custom type
General tab settings
alter type custom_type
set label_text = 'Title' ,
set help_text = 'some hint' ,
set comment_text = 'some comment'
set DEFAULT BUSINESS POLICY='dm_policy.r_object_id' VERSION 'NONE'
SET DEFAULT STORAGE='filestore_01'
Display configuration
a) “Display Configuration” tab (for webtop application)
Get type configuration for webtop application (tabs and position)
select distinct r_object_id, display_config, i_is_replica, i_vstamp, parent_id, scope_class, scope_value from dm_scope_config where r_object_id in (select distinct scope_config from dmi_dd_type_info where type_name='myType') and any scope_value = 'webtop'
Get the position and display mode of the attributes on all tabs
select r_object_id, attribute_display_hint, attribute_name, attribute_source, fixed_display, i_config_identifier, i_is_replica, i_vstamp, object_name from dm_display_config
where r_object_id in (select display_config from dm_scope_config where r_object_id in (select distinct scope_config from dmi_dd_type_info where type_name='type_name')
and any scope_value = 'webtop')
b) Modify display config for custom type
update dm_display_config objects
set attribute_source='custom_type'
set attribute_name[0]='r_object_id'
set attribute_display_hint[0]=1
set attribute_name[1]='attr_name'
set attribute_display_hint[1]=1
where r_object_id = '6bab413080033559'
c) Create a new display configuration (a new tab on properties page)
create dm_display_config object
set "object_name"='newTab'
set "attribute_source"='custom_type'
set "fixed_display"=0
append attribute_name='attr_name'
append attribute_display_hint=1
d) Add the new display config to the application (desktop, webtop, etc.)
UPDATE dm_scope_config OBJECTS
INSERT "display_config"[0] = (select r_object_id from dm_display_config where attribute_source='myType' and object_name='newTab') WHERE r_object_id in (select distinct scope_config from dmi_dd_type_info where type_name='custom_type') and any scope_value='webtop'
e) Remove a display configuration
UPDATE dm_scope_config OBJECTS
REMOVE "display_config"[index]
WHERE r_object_id in (select distinct scope_config from dmi_dd_type_info where type_name='myType') and any scope_value='webtop'
*The index must be known
Security tab
Set default ACL
ALTER TYPE type_name SET DEFAULT ACL acl_name [IN acl_domain]
ALTER TYPE type_name SET DEFAULT ACL NULL
Constraints tab
ALTER TYPE type_name [FOR POLICY policy_id STATE state_name] ADD constraint_specification
a) Primary Key
ALTER TYPE type_name
add PRIMARY KEY ("notnullAttr1")
REPORT 'TEXT'
ENFORCE BY APPLICATION
publish;
ALTER TYPE type_name
drop PRIMARY KEY
publish;
b) Unique Key
ALTER TYPE type_name
ADD UNIQUE ("notnullAttr4")
REPORT 'TEXT'
ENFORCE BY APPLICATION
publish;
ALTER TYPE type_name
DROP UNIQUE ("notnullAttr4")
publish;
c) Foreign Key
ALTER TYPE type_name1
ADD FOREIGN KEY("notnullAttr4") REFERENCES type_name2 ("pk2")
REPORT 'TEXT'
ENFORCE BY APPLICATION
publish;
ALTER TYPE type_name1
DROP FOREIGN KEY("notnullAttr4") REFERENCES type_name2 ("pk2")
publish;
Events tab
Add application events:
ALTER TYPE type_name
APPEND auditable_appevents = 'dm_ev0',
APPEND auditable_appevents = 'dm_ev1'
publish;
Add system events:
ALTER TYPE type_name
APPEND auditable_sysevents = 'dm_sysev0',
APPEND auditable_sysevents = 'dm_sysev1'
publish;

III. Modify custom type attributes settings
General tab
alter type typeName
modify (“rg_contry” (
set label_text='Country Name:',
set help_text = 'The name of the country' ,
set comment_text = 'comment',
set ignore_immutable = TRUE,
set is_hidden = TRUE,
set is_required = TRUE,
set not_null = TRUE,
set not_null_msg = 'L’attributo deve essere valorizzato',
set read_only = TRUE,
DEFAULT='DEFAULT VALUE'
))
Advanced tab
alter type typeName
modify “rg_contry” (
set is_searchable = TRUE,
append allowed_search_ops = 1,
append allowed_search_ops = 2,
append allowed_search_ops = 3,
set format_pattern = 'pattern',
set format_pattern_tag = 1,
set category_name = 'categorie',
set default_search_arg = 'somevalue',
set default_search_op = 3
)
Constraints tab
alter type type_name
modify “rg_contry” (
set ignore_constraints = TRUE,
set val_constraint='expression',
set val_constraint_dep = '????',
set val_constraint_enf = '????',
set val_constraint_msg = 'Error message for constraint violation'
)
ALTER TYPE type_name
MODIFY "pk" (
ADD PRIMARY KEY | UNIQUE KEY | NOT NULL
REPORT 'error message' on violation
ENFORCE BY APPLICATION
)
ALTER TYPE type_name
MODIFY "pk" (
DROP PRIMARY KEY
)
publish;
ALTER TYPE type_name1
MODIFY "pk" (ADD FOREIGN KEY REFERENCES type_name2("pk2")
REPORT 'message_string' ON VIOLATION ENFORCE BY APPLICATION)
ALTER TYPE type_name1
MODIFY "pk" (DROP FOREIGN KEY REFERENCES type_name2("pk2"))

Value Assistance tab
a) Set query
ALTER TYPE type_name
MODIFY “rg_country” (
VALUE ASSISTANCE IS QRY 'select distinct attribute_name from type_name order by 1'
qry attr = attribute_name allow caching is complete)
b) Set list
ALTER TYPE type_name
modify "countrycode" (VALUE ASSISTANCE is LIST ('ONE', 'TWO', 'THREE') IS COMPLETE)
c) Drop
ALTER TYPE type_name MODIFY "countrycode" (DROP VALUE ASSISTANCE)

Value Mapping tab
Add mapping
ALTER TYPE type_name
MODIFY "countrycode" (
MAPPING TABLE (
VALUE='UK'
DISPLAY='United Kingdom'
COMMENT='comment1',
VALUE='US'
DISPLAY='United States'
COMMENT='comment2'
))
publish;
Drop mapping
ALTER TYPE type_name MODIFY "countrycode" (DROP MAPPING TABLE)

341 comments:

  1. Thanks a lot!! very useful! :)

    ReplyDelete
  2. Многие пользователи, накручивающие Инстаграм на платных сервисах, сталкиваются с тем, что со временем часть подписчиков пропадает. Они или списываются социальной сетью, или сами отписываются. Сайт Krutiminst.ru гарантируют качество - все подписчики реальные люди, и в случае если подписчики ушли, то Krutiminst вернет потраченные деньги - накрутка инстаграм бесплатно подписчики

    ReplyDelete
  3. Обостряйте качественные беклинки на ваш интернет ресурс и умножьте посещаемость, ИКС. Разбавьте текущую ссылочную массу, усиливайте обратные ссылки с бирж, фигура ссылок, tier 1, tier 2, tier 3. Устойчивые к климату ссылки с мега трастовых сайтов на ваш интернет ресурс, дешевле чем на биржах и аналогов на интернет рынке беклинков. Официальный сайт - https://seobomba.ru/

    ReplyDelete
  4. remonty mieszkań warszawa remonty mieszkań w stolicy to temat który mnie niepokoi

    ReplyDelete
  5. Влагонепроницаемый вид фактически не впитывает пар, а уже после высыхания не изменяется. Чаще всего ФСФ фанеру http://ksjy88.com/home.php?mod=space&uid=2787701 используют как лицевой облицовочный материал. Фанерная плита ФСФ - это водоустойчивый класс фанеры, получивший большое распространение в строительной сфере. Для внутрикомнатных действий употреблять ФСФ фанеру запрещается - могут присутствовать вредоносные субстанции при определенных ситуациях.

    ReplyDelete
  6. IsraFace - еврейские анекдоды, это клуб для евреев, где объединяются евреи и еврейки и русский еврей из Винницы, России. Добавляйте крутые фотки, записи, подключайтесь в группы по интересам, ведите блог, заходите на форум, устанавливайте еврейские знакомства.

    ReplyDelete
  7. remonty warszawa sprawdź i wejdź to materia jaka mnie trapi

    ReplyDelete
  8. С целью произвести хороший ремонт, следует понимать, какие типы фанеры представлены на рынке и как они эксплуатируются. Есть несколько ключевых и максимально используемых классов отделочного материала. фанера крепкая любой желающий сможет на складе-магазине фанеры в Белоруссии Фанвуд.

    ReplyDelete
  9. Мухаббат Либослари в хорошем качестве https://cojo.ru/

    ReplyDelete
  10. Когогина Альфия милые картинки cojo.ru

    ReplyDelete
  11. Влагостойкая фанера ФСФ http://www.gwoman.ru/forum/?PAGE_NAME=profile_view&UID=45315 - область применения

    ReplyDelete
  12. sprawdź i wejdź najfajniejsza strona na temat remonty warszawa

    ReplyDelete
  13. wejdź tu własna strona www proszę sprawdzić

    ReplyDelete
  14. co to są remonty najfajniejsza strona internetowa na temat remonty warszawa

    ReplyDelete
  15. wykończenie wnętrz w Warszawie własna strona internetowa zapraszam do sprawdzenia

    ReplyDelete
  16. remonty mieszkań moja strona internetowa zapraszam do sprawdzenia

    ReplyDelete
  17. remonty mieszkań warszawa remonty to materia jaka mnie niepokoi

    ReplyDelete
  18. tutaj kliknij najlepsza strona internetowa na temat remonty mieszkań warszawa

    ReplyDelete
  19. remont mieszkania najlepsza strona internetowa w temacie remonty mieszkań warszawa

    ReplyDelete
  20. sprawdź tu własna strona proszę sprawdzić

    ReplyDelete
  21. tutaj super strona www w temacie remonty mieszkań warszawa

    ReplyDelete
  22. Cobie Smulders 53 лучших фото красивые фото https://cojo.ru/

    ReplyDelete
  23. Продукция бритвы gillette купить оптом, это отличная идея для начала нового бизнеса. Постоянные скидки на лезвия gillette fusion power. Средства для бритья триммер-лезвие fusion функциональные комплекты gillette купить оптом по минимальной стоимости производителя. Хорошая возможность приобрести лезвия gillette mach3, станки для бритья джилет мак 3 турбо, а также любой другой продукт серии gillette mach3 по максимальной выгодой стоимости!. Хит продаж одноразовые станки gillette venus.

    ReplyDelete
  24. Продукция одноразовые бритвы gillette купить оптом, это отличное начало нового бизнеса. Постоянные распродажи на сменные картриджи gillette fusion proglide. Средства для бритья триммер-лезвие fusion практичные наборы gillette купить оптом по минимальной стоимости производителя. Хорошая возможность заказать лезвия джилет mach3, станки для бритья джилет мак 3 турбо, а также любой другой продукт линейки жилет мак 3 по максимальной выгодой стоимости!. Всегда в наличии популярные одноразовые станки gillette 2.

    ReplyDelete
  25. tutaj kliknij najlepsza strona internetowa o wykończenia wnętrz warszawa

    ReplyDelete
  26. sprawdź tu super strona internetowa o wykończenia wnętrz warszawa

    ReplyDelete
  27. wykończenia wnętrz warszawa kliknij tu to zagadnienie jakie mnie nurtuje

    ReplyDelete
  28. jakie wykończenia wnętrz najfajniejsza strona www w temacie wykończenia wnętrz warszawa

    ReplyDelete
  29. wejdź moja strona internetowa

    ReplyDelete
  30. klik tutaj to materia jakie mnie niepokoi

    ReplyDelete
  31. kliknij tu najfajniejsza strona o usługi remontowe warszawa

    ReplyDelete
  32. Хвост с канекалоном красивые фото https://cojo.ru/pricheski-i-strizhki/hvost-s-kanekalonom-61-foto/

    ReplyDelete
  33. wykończenia wnętrz warszawa jakie wykończenia wnętrz Warszawa to zagadnienie które mnie trapi

    ReplyDelete
  34. tutaj wejdź najfajniejsza strona www o wykończenia wnętrz warszawa

    ReplyDelete
  35. wejdź i sprawdź to temat które mnie interesuje

    ReplyDelete
  36. Картинки одноклассники крутые фото https://cojo.ru/kartinki/kartinki-odnoklassniki-28-foto/

    ReplyDelete
  37. co to jest remont mieszkań w Warszawie własna strona internetowa proszę sprawdzić

    ReplyDelete
  38. kompleksowe wykończenia wnętrz warszawa kompleksowe wykończenia mieszkań w Warszawie to temat który mnie nurtuje

    ReplyDelete
  39. zobacz tutaj najfajniejsza strona na temat remonty mieszkań warszawa

    ReplyDelete
  40. Great to fulfill you, my name is Normand Weathersby. Nebraska is where me and my spouse live. The task I've been occupying for years is a procurement officer however I've constantly desired my own company. What he likes doing is to do interior design and now he is trying to make money with it. Go to my site to discover more: list of game pc

    ReplyDelete
  41. Дед мороз с подарками и пожелание картинки https://cojo.ru/pozdravleniya/ded-moroz-s-podarkami-i-pozhelanie-17-foto/

    ReplyDelete
  42. zobacz to temat które mnie niepokoi

    ReplyDelete
  43. The author's name is Esta Knapp and she absolutely digs that name. I am a messenger. To resolve puzzles is something he truly takes pleasure in doing. Pennsylvania is his birth location. See what's brand-new on his site here: papas freezeria

    ReplyDelete
  44. Firmy remontowo wykończeniowe najfajniejsza strona o usługi remontowe warszawa

    ReplyDelete
  45. usługi remontowe warszawa kliknij to zagadnienie jakie mnie trapi

    ReplyDelete
  46. po co Firmy remontowo wykończeniowe moja strona internetowa zapraszam do sprawdzenia

    ReplyDelete
  47. They call me Providencia but I never ever truly liked that name. My good friends state it's bad for me however what I like doing is fashion and now I'm trying to make money with it. Accounting has been my day task for a while but I have actually currently requested another one. My family resides in Mississippi. You can find my site here: among us always imposter mod apk

    ReplyDelete
  48. Прически с бубликом смотреть фото https://cojo.ru/pricheski-i-strizhki/pricheski-s-bublikom-46-foto/

    ReplyDelete
  49. usługi remontowe warszawa usługi remontowe to materia która mnie trapi

    ReplyDelete
  50. tutaj sprawdź to myśl jakie mnie nurtuje

    ReplyDelete
  51. tutaj kliknij najfajniejsza strona o usługi remontowe warszawa

    ReplyDelete
  52. usługi remontowe w Warszawie własna strona www zapraszam do sprawdzenia

    ReplyDelete
  53. kliknij tu super strona www na temat usługi remontowe warszawa

    ReplyDelete
  54. usługi remontowe warszawa usługi remontowe to kwestia która mnie intryguje

    ReplyDelete
  55. wejdź i sprawdź najlepsza strona internetowa na temat usługi remontowe warszawa

    ReplyDelete
  56. Greetings. The author's name is Ben Gioia. My good friends say it's not excellent for me however what I love doing is archery and I have actually been doing it for quite a while. For years I've been working as a filing assistant. My household resides in Kansas. She is running and maintaining a blog here: ark survival evolved mod apk

    ReplyDelete
  57. remonty warszawa fachowcy od remontu Warszawa to sprawa jaka mnie trapi

    ReplyDelete
  58. wejdź i sprawdź najlepsza strona internetowa o szalunki ścienne sprzedaż

    ReplyDelete
  59. używane szalunki ścienne sprzedaż najlepsza strona internetowa o szalunki ścienne sprzedaż

    ReplyDelete
  60. klik to myśl jakie mnie niepokoi

    ReplyDelete
  61. szalunek ścienny opisy najfajniejsza strona www o szalunki ścienne sprzedaż

    ReplyDelete
  62. Britteny is how I'm called and I like it. To act is what he loves doing. A long time ago I chose to live in Mississippi and will never ever move. Dispersing production is what I do in my day task. If you want to discover out more check out my site: athena institute pheromones

    ReplyDelete
  63. gerflor tutaj zobacz to sprawa jaka mnie nurtuje

    ReplyDelete
  64. sprawdź super strona o gerflor

    ReplyDelete
  65. odbiory mieszkań warszawa fachowcy i odbiór mieszkania w Warszawie to materia która mnie niepokoi

    ReplyDelete
  66. odbiory mieszkań warszawa Odbiór mieszkania od dewelopera Warszawa to kwestia jaka mnie niepokoi

    ReplyDelete
  67. odbiory mieszkań warszawa odbiory mieszkań to sprawa która mnie intryguje

    ReplyDelete
  68. obudowy wykopów sprawdź to temat który mnie nurtuje

    ReplyDelete
  69. tutaj wejdź najfajniejsza strona internetowa na temat obudowy wykopów

    ReplyDelete
  70. obudowy wykopów do czego obudowa wykopów to kwestia która mnie niepokoi

    ReplyDelete
  71. obudowy wykopów klik to kwestia jaka mnie niepokoi

    ReplyDelete
  72. 80'S Synthwave Wallpapers WallpapersHigh.com FULLHD fast and free https://wallpapershigh.com/80-s-synthwave

    ReplyDelete
  73. Introductions. Allow me start by telling you the author's name - Kayla Moen and also she likes it. Connecticut is where she's been living for several years. Bookkeeping has actually been his day job for a while and also he will not change it anytime quickly. As a woman what I actually like is cooking yet I have not made a dollar with it. See what's brand-new on my website here: punta cana off the beaten path

    ReplyDelete
  74. Light Wallpapers wallpapershigh.com HD absolutely free https://wallpapershigh.com/light

    ReplyDelete
  75. I'm Bernardo however I do not like when people utilize my complete name. Sending off is what I provide for a living. One of the things he loves most is baking as well as he would never stop doing it. For a while she's remained in Maryland today she is considering various other choices. Have a look at the current information on her internet site: dieta odchudzająca szybka

    ReplyDelete
  76. Audi R8 V10 Plus Wallpapers WallpapersHigh.com high resolution fast and free https://wallpapershigh.com/audi-r8-v10-plus

    ReplyDelete
  77. Beige Damask Wallpapers wallpapershigh.com HIGH RESOLUTION for free https://wallpapershigh.com/beige-damask

    ReplyDelete
  78. Army Color Wallpapers wallpapershigh.com HIGH RES fast and free https://wallpapershigh.com/army-color

    ReplyDelete
  79. Anime Meliodas Wallpapers WallpapersHigh.com hd 100% free https://wallpapershigh.com/anime-meliodas

    ReplyDelete
  80. Garden Of Earthly Delights Wallpapers WallpapersHigh.com high resolution absolutely free https://wallpapershigh.com/garden-of-earthly-delights-wallpapers

    ReplyDelete
  81. When people make use of the full name, her name is Norman Dehaven and she feels comfortable. Years ago we moved to Oklahoma. Her good friends claim it's bad for her however what she enjoys doing is secure fencing and she'll be beginning something else together with it. She works as a dentist. If you intend to figure out even more check out my site: online puppy training

    ReplyDelete
  82. Aesthetic Black Simple Wallpapers wallpapershigh.com Full Hd 100% free https://wallpapershigh.com/aesthetic-black-simple

    ReplyDelete
  83. wejdź tutaj najlepsza strona internetowa o wykończenie mieszkania warszawa

    ReplyDelete
  84. Bullet Wallpapers WallpapersHigh.com High Quality absolutely free https://wallpapershigh.com/bullet

    ReplyDelete
  85. remont mieszkania warszawa własna strona www proszę sprawdzić

    ReplyDelete
  86. remonty mieszkań stolica własna strona www zapraszam do sprawdzenia

    ReplyDelete
  87. co to jest remont mieszkań w Warszawie super strona internetowa w temacie remonty mieszkań warszawa

    ReplyDelete
  88. Friends call her Malia. Maine is where she's been living for several years and her parents live nearby. After being out of my job for many years I came to be a credit history authoriser. To collect kites is something my spouse does not truly like yet I do. He's not godd at design yet you might wish to examine his website: The Way To Choose An Excellent Pheromone Like Nexus Pheromones ferretfriendsrescue

    ReplyDelete
  89. wejdź tutaj super strona www o wykończenie pod klucz warszawa cena

    ReplyDelete
  90. wykończenie pod klucz warszawa cena klik tutaj to przedmiot jaki mnie ciekawi

    ReplyDelete
  91. wykończenie pod klucz warszawa cena wykańczanie mieszkań pod klucz warszawa cennik to przedmiot który mnie intryguje

    ReplyDelete
  92. tutaj zobacz najfajniejsza strona www na temat wykończenie pod klucz warszawa cena

    ReplyDelete
  93. Hey there dear visitor. I am Demetrice Durand. To lift weights is the point he enjoys most. The job I've been occupying for several years is a dentist. Years ago we relocated to Nebraska. I'm not good at webdesign but you could want to examine my internet site: low carb fast dinners irishjap

    ReplyDelete
  94. remont mieszkania pod klucz w Warszawie super strona internetowa na temat remonty mieszkań pod klucz warszawa

    ReplyDelete
  95. remonty mieszkań pod klucz warszawa tutaj sprawdź to temat jaki mnie niepokoi

    ReplyDelete
  96. Jade Meads is what you can call her and also her husband doesn't like it at all. Puerto Rico is the only area he's been staying in and his family enjoys it. To play croquet is the only pastime my spouse does not accept of. Interviewing is where my primary income comes from. Look into my website right here: the reality of the game dev industry in 2022 www.malejkum.info

    ReplyDelete
  97. Introductions. The author's name is Doorperson. Indiana is our birth place today I'm taking into consideration various other options. The favored hobby for my children as well as me is to fencing however I'm believing on starting something brand-new. Workplace overseeing is what I perform in my day task and the wage has actually been truly satisfying. She is running and preserving a blog site right here: keto diets serenada

    ReplyDelete
  98. taraflex wejdź tu to temat który mnie intryguje

    ReplyDelete
  99. gerflor podłoga Gerflor opis to zagadnienie jakie mnie intryguje

    ReplyDelete
  100. When people utilize her complete name, Dorothea is exactly how she's called but she doesn't like. Bookkeeping is what I perform in my day task. His better half as well as him live in New york city and he will certainly never ever relocate. Among her favorite pastimes is jetski as well as she would certainly never quit doing it. She's bad at layout but you may wish to inspect her web site: cost per watt solar hilfe-fuer-behinderte

    ReplyDelete
  101. When individuals use the full name, Wilford Zamudio is what individuals call him as well as he feels comfortable. Dispatching is what I do as well as I'm doing pretty great monetarily. What I actually delight in doing is warm air balooning but I've been handling brand-new things lately. For a while I have actually been in Connecticut but I require to propose my household. He's not godd at layout yet you might wish to inspect his internet site: www.hilfe-fuer-behinderte.info/google-voice-works-for-me-starting-today-invites-are-for-you-to-new-users/

    ReplyDelete
  102. When people utilize the complete name, they call the writer Odell and also he really feels comfy. Years ago we moved to California and also I like on a daily basis living below. To bake is a point that I'm totally addicted to. Credit history authorizing is exactly how he earns a living and also his income has been really satisfying. Look into his website below: when should I go to Kenya and Tanzania keniatravel.info

    ReplyDelete
  103. url super strona o kompleksowe wykończenia wnętrz warszawa

    ReplyDelete
  104. kompleksowe wykończenia wnętrz warszawa wejdź tu to temat jaki mnie intryguje

    ReplyDelete
  105. Dante is how I'm called although it is not the name on my birth certification. Invoicing is exactly how I support my family members but quickly I'll be on my very own. My house is now in Tennessee. Her good friends state it's not great for her yet what she loves doing is to do martial arts yet she's been handling brand-new things lately. Take a look at his site right here: affordable flights costa rica kostarykatravel.info

    ReplyDelete
  106. kompleksowe wykończenia wnętrz warszawa kompleksowe wykończenie wnętrz w Warszawie to kwestia która mnie trapi

    ReplyDelete
  107. tutaj super strona internetowa o mieszkanie pod klucz warszawa

    ReplyDelete