net.anotheria.anosite.gen.assitedata.data.ModuleASSiteData Maven / Gradle / Ivy
/**
********************************************************************************
*** ModuleASSiteData.java ***
*** generated by AnoSiteGenerator (ASG), Version: 3.2.2 ***
*** Copyright (C) 2005 - 2023 Anotheria.net, www.anotheria.net ***
*** All Rights Reserved. ***
********************************************************************************
*** Don't edit this code, if you aren't sure ***
*** that you do exactly know what you are doing! ***
*** It's better to invest time in the generator, as into the generated code. ***
********************************************************************************
*/
package net.anotheria.anosite.gen.assitedata.data;
import net.anotheria.anodoc.data.Module;
import net.anotheria.anodoc.data.DocumentList;
import net.anotheria.anodoc.data.IDHolder;
import net.anotheria.anodoc.data.NoSuchDocumentListException;
import java.util.List;
public class ModuleASSiteData extends Module{
public static final String MODULE_ID = "assitedata";
public static final String LIST_PAGETEMPLATE = "list_pagetemplate";
public static final String ID_HOLDER_PAGETEMPLATE = IDHolder.DOC_ID_HOLDER_PRE+"pagetemplate";
public static final String LIST_MEDIALINK = "list_medialink";
public static final String ID_HOLDER_MEDIALINK = IDHolder.DOC_ID_HOLDER_PRE+"medialink";
public static final String LIST_SCRIPT = "list_script";
public static final String ID_HOLDER_SCRIPT = IDHolder.DOC_ID_HOLDER_PRE+"script";
public static final String LIST_SITE = "list_site";
public static final String ID_HOLDER_SITE = IDHolder.DOC_ID_HOLDER_PRE+"site";
public static final String LIST_NAVIITEM = "list_naviitem";
public static final String ID_HOLDER_NAVIITEM = IDHolder.DOC_ID_HOLDER_PRE+"naviitem";
public static final String LIST_ENTRYPOINT = "list_entrypoint";
public static final String ID_HOLDER_ENTRYPOINT = IDHolder.DOC_ID_HOLDER_PRE+"entrypoint";
public static final String LIST_PAGEALIAS = "list_pagealias";
public static final String ID_HOLDER_PAGEALIAS = IDHolder.DOC_ID_HOLDER_PRE+"pagealias";
public static final String LIST_REDIRECTURL = "list_redirecturl";
public static final String ID_HOLDER_REDIRECTURL = IDHolder.DOC_ID_HOLDER_PRE+"redirecturl";
public ModuleASSiteData(){
super(MODULE_ID);
}
@SuppressWarnings("unchecked")
private DocumentList _getPageTemplates(){
try{
return getList(LIST_PAGETEMPLATE);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_PAGETEMPLATE);
}
}
private void _updatePageTemplates(DocumentList list){
putList(list);
}
public List getPageTemplates(){
return _getPageTemplates().getList();
}
public PageTemplateDocument getPageTemplate(String id){
return _getPageTemplates().getDocumentById(id);
}
public void updatePageTemplate(PageTemplateDocument pagetemplate){
DocumentList pagetemplates = _getPageTemplates();
pagetemplates.removeDocumentById(pagetemplate.getId());
pagetemplate.setLastUpdateNow();
pagetemplate.setCallContextAuthor();
pagetemplates.addDocument(pagetemplate);
_updatePageTemplates(pagetemplates);
}
public void deletePageTemplate(String id){
DocumentList entries = _getPageTemplates();
entries.removeDocumentById(id);
_updatePageTemplates(entries);
}
public PageTemplateDocument createPageTemplate(PageTemplateDocument pagetemplate ){
IDHolder idh = _getIdHolder(ID_HOLDER_PAGETEMPLATE);
int id = idh.getNextIdInt();
pagetemplate.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getPageTemplates();
pagetemplate.setLastUpdateNow();
pagetemplate.setCallContextAuthor();
entries.addDocument(pagetemplate);
_updatePageTemplates(entries);
return pagetemplate;
}
public PageTemplateDocument importPageTemplate(PageTemplateDocument pagetemplate ){
IDHolder idh = _getIdHolder(ID_HOLDER_PAGETEMPLATE);
idh.adjustTill(pagetemplate.getId());
putDocument(idh);
DocumentList entries = _getPageTemplates();
pagetemplate.setLastUpdateNow();
pagetemplate.setCallContextAuthor();
entries.addDocument(pagetemplate);
_updatePageTemplates(entries);
return pagetemplate;
}
@SuppressWarnings("unchecked")
private DocumentList _getMediaLinks(){
try{
return getList(LIST_MEDIALINK);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_MEDIALINK);
}
}
private void _updateMediaLinks(DocumentList list){
putList(list);
}
public List getMediaLinks(){
return _getMediaLinks().getList();
}
public MediaLinkDocument getMediaLink(String id){
return _getMediaLinks().getDocumentById(id);
}
public void updateMediaLink(MediaLinkDocument medialink){
DocumentList medialinks = _getMediaLinks();
medialinks.removeDocumentById(medialink.getId());
medialink.setLastUpdateNow();
medialink.setCallContextAuthor();
medialinks.addDocument(medialink);
_updateMediaLinks(medialinks);
}
public void deleteMediaLink(String id){
DocumentList entries = _getMediaLinks();
entries.removeDocumentById(id);
_updateMediaLinks(entries);
}
public MediaLinkDocument createMediaLink(MediaLinkDocument medialink ){
IDHolder idh = _getIdHolder(ID_HOLDER_MEDIALINK);
int id = idh.getNextIdInt();
medialink.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getMediaLinks();
medialink.setLastUpdateNow();
medialink.setCallContextAuthor();
entries.addDocument(medialink);
_updateMediaLinks(entries);
return medialink;
}
public MediaLinkDocument importMediaLink(MediaLinkDocument medialink ){
IDHolder idh = _getIdHolder(ID_HOLDER_MEDIALINK);
idh.adjustTill(medialink.getId());
putDocument(idh);
DocumentList entries = _getMediaLinks();
medialink.setLastUpdateNow();
medialink.setCallContextAuthor();
entries.addDocument(medialink);
_updateMediaLinks(entries);
return medialink;
}
@SuppressWarnings("unchecked")
private DocumentList _getScripts(){
try{
return getList(LIST_SCRIPT);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_SCRIPT);
}
}
private void _updateScripts(DocumentList list){
putList(list);
}
public List getScripts(){
return _getScripts().getList();
}
public ScriptDocument getScript(String id){
return _getScripts().getDocumentById(id);
}
public void updateScript(ScriptDocument script){
DocumentList scripts = _getScripts();
scripts.removeDocumentById(script.getId());
script.setLastUpdateNow();
script.setCallContextAuthor();
scripts.addDocument(script);
_updateScripts(scripts);
}
public void deleteScript(String id){
DocumentList entries = _getScripts();
entries.removeDocumentById(id);
_updateScripts(entries);
}
public ScriptDocument createScript(ScriptDocument script ){
IDHolder idh = _getIdHolder(ID_HOLDER_SCRIPT);
int id = idh.getNextIdInt();
script.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getScripts();
script.setLastUpdateNow();
script.setCallContextAuthor();
entries.addDocument(script);
_updateScripts(entries);
return script;
}
public ScriptDocument importScript(ScriptDocument script ){
IDHolder idh = _getIdHolder(ID_HOLDER_SCRIPT);
idh.adjustTill(script.getId());
putDocument(idh);
DocumentList entries = _getScripts();
script.setLastUpdateNow();
script.setCallContextAuthor();
entries.addDocument(script);
_updateScripts(entries);
return script;
}
@SuppressWarnings("unchecked")
private DocumentList _getSites(){
try{
return getList(LIST_SITE);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_SITE);
}
}
private void _updateSites(DocumentList list){
putList(list);
}
public List getSites(){
return _getSites().getList();
}
public SiteDocument getSite(String id){
return _getSites().getDocumentById(id);
}
public void updateSite(SiteDocument site){
DocumentList sites = _getSites();
sites.removeDocumentById(site.getId());
site.setLastUpdateNow();
site.setCallContextAuthor();
sites.addDocument(site);
_updateSites(sites);
}
public void deleteSite(String id){
DocumentList entries = _getSites();
entries.removeDocumentById(id);
_updateSites(entries);
}
public SiteDocument createSite(SiteDocument site ){
IDHolder idh = _getIdHolder(ID_HOLDER_SITE);
int id = idh.getNextIdInt();
site.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getSites();
site.setLastUpdateNow();
site.setCallContextAuthor();
entries.addDocument(site);
_updateSites(entries);
return site;
}
public SiteDocument importSite(SiteDocument site ){
IDHolder idh = _getIdHolder(ID_HOLDER_SITE);
idh.adjustTill(site.getId());
putDocument(idh);
DocumentList entries = _getSites();
site.setLastUpdateNow();
site.setCallContextAuthor();
entries.addDocument(site);
_updateSites(entries);
return site;
}
@SuppressWarnings("unchecked")
private DocumentList _getNaviItems(){
try{
return getList(LIST_NAVIITEM);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_NAVIITEM);
}
}
private void _updateNaviItems(DocumentList list){
putList(list);
}
public List getNaviItems(){
return _getNaviItems().getList();
}
public NaviItemDocument getNaviItem(String id){
return _getNaviItems().getDocumentById(id);
}
public void updateNaviItem(NaviItemDocument naviitem){
DocumentList naviitems = _getNaviItems();
naviitems.removeDocumentById(naviitem.getId());
naviitem.setLastUpdateNow();
naviitem.setCallContextAuthor();
naviitems.addDocument(naviitem);
_updateNaviItems(naviitems);
}
public void deleteNaviItem(String id){
DocumentList entries = _getNaviItems();
entries.removeDocumentById(id);
_updateNaviItems(entries);
}
public NaviItemDocument createNaviItem(NaviItemDocument naviitem ){
IDHolder idh = _getIdHolder(ID_HOLDER_NAVIITEM);
int id = idh.getNextIdInt();
naviitem.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getNaviItems();
naviitem.setLastUpdateNow();
naviitem.setCallContextAuthor();
entries.addDocument(naviitem);
_updateNaviItems(entries);
return naviitem;
}
public NaviItemDocument importNaviItem(NaviItemDocument naviitem ){
IDHolder idh = _getIdHolder(ID_HOLDER_NAVIITEM);
idh.adjustTill(naviitem.getId());
putDocument(idh);
DocumentList entries = _getNaviItems();
naviitem.setLastUpdateNow();
naviitem.setCallContextAuthor();
entries.addDocument(naviitem);
_updateNaviItems(entries);
return naviitem;
}
@SuppressWarnings("unchecked")
private DocumentList _getEntryPoints(){
try{
return getList(LIST_ENTRYPOINT);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_ENTRYPOINT);
}
}
private void _updateEntryPoints(DocumentList list){
putList(list);
}
public List getEntryPoints(){
return _getEntryPoints().getList();
}
public EntryPointDocument getEntryPoint(String id){
return _getEntryPoints().getDocumentById(id);
}
public void updateEntryPoint(EntryPointDocument entrypoint){
DocumentList entrypoints = _getEntryPoints();
entrypoints.removeDocumentById(entrypoint.getId());
entrypoint.setLastUpdateNow();
entrypoint.setCallContextAuthor();
entrypoints.addDocument(entrypoint);
_updateEntryPoints(entrypoints);
}
public void deleteEntryPoint(String id){
DocumentList entries = _getEntryPoints();
entries.removeDocumentById(id);
_updateEntryPoints(entries);
}
public EntryPointDocument createEntryPoint(EntryPointDocument entrypoint ){
IDHolder idh = _getIdHolder(ID_HOLDER_ENTRYPOINT);
int id = idh.getNextIdInt();
entrypoint.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getEntryPoints();
entrypoint.setLastUpdateNow();
entrypoint.setCallContextAuthor();
entries.addDocument(entrypoint);
_updateEntryPoints(entries);
return entrypoint;
}
public EntryPointDocument importEntryPoint(EntryPointDocument entrypoint ){
IDHolder idh = _getIdHolder(ID_HOLDER_ENTRYPOINT);
idh.adjustTill(entrypoint.getId());
putDocument(idh);
DocumentList entries = _getEntryPoints();
entrypoint.setLastUpdateNow();
entrypoint.setCallContextAuthor();
entries.addDocument(entrypoint);
_updateEntryPoints(entries);
return entrypoint;
}
@SuppressWarnings("unchecked")
private DocumentList _getPageAliass(){
try{
return getList(LIST_PAGEALIAS);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_PAGEALIAS);
}
}
private void _updatePageAliass(DocumentList list){
putList(list);
}
public List getPageAliass(){
return _getPageAliass().getList();
}
public PageAliasDocument getPageAlias(String id){
return _getPageAliass().getDocumentById(id);
}
public void updatePageAlias(PageAliasDocument pagealias){
DocumentList pagealiass = _getPageAliass();
pagealiass.removeDocumentById(pagealias.getId());
pagealias.setLastUpdateNow();
pagealias.setCallContextAuthor();
pagealiass.addDocument(pagealias);
_updatePageAliass(pagealiass);
}
public void deletePageAlias(String id){
DocumentList entries = _getPageAliass();
entries.removeDocumentById(id);
_updatePageAliass(entries);
}
public PageAliasDocument createPageAlias(PageAliasDocument pagealias ){
IDHolder idh = _getIdHolder(ID_HOLDER_PAGEALIAS);
int id = idh.getNextIdInt();
pagealias.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getPageAliass();
pagealias.setLastUpdateNow();
pagealias.setCallContextAuthor();
entries.addDocument(pagealias);
_updatePageAliass(entries);
return pagealias;
}
public PageAliasDocument importPageAlias(PageAliasDocument pagealias ){
IDHolder idh = _getIdHolder(ID_HOLDER_PAGEALIAS);
idh.adjustTill(pagealias.getId());
putDocument(idh);
DocumentList entries = _getPageAliass();
pagealias.setLastUpdateNow();
pagealias.setCallContextAuthor();
entries.addDocument(pagealias);
_updatePageAliass(entries);
return pagealias;
}
@SuppressWarnings("unchecked")
private DocumentList _getRedirectUrls(){
try{
return getList(LIST_REDIRECTURL);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_REDIRECTURL);
}
}
private void _updateRedirectUrls(DocumentList list){
putList(list);
}
public List getRedirectUrls(){
return _getRedirectUrls().getList();
}
public RedirectUrlDocument getRedirectUrl(String id){
return _getRedirectUrls().getDocumentById(id);
}
public void updateRedirectUrl(RedirectUrlDocument redirecturl){
DocumentList redirecturls = _getRedirectUrls();
redirecturls.removeDocumentById(redirecturl.getId());
redirecturl.setLastUpdateNow();
redirecturl.setCallContextAuthor();
redirecturls.addDocument(redirecturl);
_updateRedirectUrls(redirecturls);
}
public void deleteRedirectUrl(String id){
DocumentList entries = _getRedirectUrls();
entries.removeDocumentById(id);
_updateRedirectUrls(entries);
}
public RedirectUrlDocument createRedirectUrl(RedirectUrlDocument redirecturl ){
IDHolder idh = _getIdHolder(ID_HOLDER_REDIRECTURL);
int id = idh.getNextIdInt();
redirecturl.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getRedirectUrls();
redirecturl.setLastUpdateNow();
redirecturl.setCallContextAuthor();
entries.addDocument(redirecturl);
_updateRedirectUrls(entries);
return redirecturl;
}
public RedirectUrlDocument importRedirectUrl(RedirectUrlDocument redirecturl ){
IDHolder idh = _getIdHolder(ID_HOLDER_REDIRECTURL);
idh.adjustTill(redirecturl.getId());
putDocument(idh);
DocumentList entries = _getRedirectUrls();
redirecturl.setLastUpdateNow();
redirecturl.setCallContextAuthor();
entries.addDocument(redirecturl);
_updateRedirectUrls(entries);
return redirecturl;
}
}