
net.anotheria.anosite.gen.aswizarddata.data.ModuleASWizardData Maven / Gradle / Ivy
/**
********************************************************************************
*** ModuleASWizardData.java ***
*** generated by AnoSiteGenerator (ASG), Version: 4.2.2 ***
*** Copyright (C) 2005 - 2025 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.aswizarddata.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 ModuleASWizardData extends Module{
public static final String MODULE_ID = "aswizarddata";
public static final String LIST_WIZARDDEF = "list_wizarddef";
public static final String ID_HOLDER_WIZARDDEF = IDHolder.DOC_ID_HOLDER_PRE+"wizarddef";
public static final String LIST_WIZARDHANDLERDEF = "list_wizardhandlerdef";
public static final String ID_HOLDER_WIZARDHANDLERDEF = IDHolder.DOC_ID_HOLDER_PRE+"wizardhandlerdef";
public ModuleASWizardData(){
super(MODULE_ID);
}
@SuppressWarnings("unchecked")
private DocumentList _getWizardDefs(){
try{
return getList(LIST_WIZARDDEF);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_WIZARDDEF);
}
}
private void _updateWizardDefs(DocumentList list){
putList(list);
}
public List getWizardDefs(){
return _getWizardDefs().getList();
}
public WizardDefDocument getWizardDef(String id){
return _getWizardDefs().getDocumentById(id);
}
public void updateWizardDef(WizardDefDocument wizarddef){
DocumentList wizarddefs = _getWizardDefs();
wizarddefs.removeDocumentById(wizarddef.getId());
wizarddef.setLastUpdateNow();
wizarddef.setCallContextAuthor();
wizarddefs.addDocument(wizarddef);
_updateWizardDefs(wizarddefs);
}
public void deleteWizardDef(String id){
DocumentList entries = _getWizardDefs();
entries.removeDocumentById(id);
_updateWizardDefs(entries);
}
public WizardDefDocument createWizardDef(WizardDefDocument wizarddef ){
IDHolder idh = _getIdHolder(ID_HOLDER_WIZARDDEF);
int id = idh.getNextIdInt();
wizarddef.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getWizardDefs();
wizarddef.setLastUpdateNow();
wizarddef.setCallContextAuthor();
entries.addDocument(wizarddef);
_updateWizardDefs(entries);
return wizarddef;
}
public WizardDefDocument importWizardDef(WizardDefDocument wizarddef ){
IDHolder idh = _getIdHolder(ID_HOLDER_WIZARDDEF);
idh.adjustTill(wizarddef.getId());
putDocument(idh);
DocumentList entries = _getWizardDefs();
wizarddef.setLastUpdateNow();
wizarddef.setCallContextAuthor();
entries.addDocument(wizarddef);
_updateWizardDefs(entries);
return wizarddef;
}
@SuppressWarnings("unchecked")
private DocumentList _getWizardHandlerDefs(){
try{
return getList(LIST_WIZARDHANDLERDEF);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_WIZARDHANDLERDEF);
}
}
private void _updateWizardHandlerDefs(DocumentList list){
putList(list);
}
public List getWizardHandlerDefs(){
return _getWizardHandlerDefs().getList();
}
public WizardHandlerDefDocument getWizardHandlerDef(String id){
return _getWizardHandlerDefs().getDocumentById(id);
}
public void updateWizardHandlerDef(WizardHandlerDefDocument wizardhandlerdef){
DocumentList wizardhandlerdefs = _getWizardHandlerDefs();
wizardhandlerdefs.removeDocumentById(wizardhandlerdef.getId());
wizardhandlerdef.setLastUpdateNow();
wizardhandlerdef.setCallContextAuthor();
wizardhandlerdefs.addDocument(wizardhandlerdef);
_updateWizardHandlerDefs(wizardhandlerdefs);
}
public void deleteWizardHandlerDef(String id){
DocumentList entries = _getWizardHandlerDefs();
entries.removeDocumentById(id);
_updateWizardHandlerDefs(entries);
}
public WizardHandlerDefDocument createWizardHandlerDef(WizardHandlerDefDocument wizardhandlerdef ){
IDHolder idh = _getIdHolder(ID_HOLDER_WIZARDHANDLERDEF);
int id = idh.getNextIdInt();
wizardhandlerdef.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getWizardHandlerDefs();
wizardhandlerdef.setLastUpdateNow();
wizardhandlerdef.setCallContextAuthor();
entries.addDocument(wizardhandlerdef);
_updateWizardHandlerDefs(entries);
return wizardhandlerdef;
}
public WizardHandlerDefDocument importWizardHandlerDef(WizardHandlerDefDocument wizardhandlerdef ){
IDHolder idh = _getIdHolder(ID_HOLDER_WIZARDHANDLERDEF);
idh.adjustTill(wizardhandlerdef.getId());
putDocument(idh);
DocumentList entries = _getWizardHandlerDefs();
wizardhandlerdef.setLastUpdateNow();
wizardhandlerdef.setCallContextAuthor();
entries.addDocument(wizardhandlerdef);
_updateWizardHandlerDefs(entries);
return wizardhandlerdef;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy