net.anotheria.anosite.gen.asgenericdata.data.ModuleASGenericData Maven / Gradle / Ivy
/**
********************************************************************************
*** ModuleASGenericData.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.asgenericdata.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 ModuleASGenericData extends Module{
public static final String MODULE_ID = "asgenericdata";
public static final String LIST_GENERICBOXTYPE = "list_genericboxtype";
public static final String ID_HOLDER_GENERICBOXTYPE = IDHolder.DOC_ID_HOLDER_PRE+"genericboxtype";
public static final String LIST_GENERICBOXHANDLERDEF = "list_genericboxhandlerdef";
public static final String ID_HOLDER_GENERICBOXHANDLERDEF = IDHolder.DOC_ID_HOLDER_PRE+"genericboxhandlerdef";
public static final String LIST_GENERICGUARDDEF = "list_genericguarddef";
public static final String ID_HOLDER_GENERICGUARDDEF = IDHolder.DOC_ID_HOLDER_PRE+"genericguarddef";
public ModuleASGenericData(){
super(MODULE_ID);
}
@SuppressWarnings("unchecked")
private DocumentList _getGenericBoxTypes(){
try{
return getList(LIST_GENERICBOXTYPE);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_GENERICBOXTYPE);
}
}
private void _updateGenericBoxTypes(DocumentList list){
putList(list);
}
public List getGenericBoxTypes(){
return _getGenericBoxTypes().getList();
}
public GenericBoxTypeDocument getGenericBoxType(String id){
return _getGenericBoxTypes().getDocumentById(id);
}
public void updateGenericBoxType(GenericBoxTypeDocument genericboxtype){
DocumentList genericboxtypes = _getGenericBoxTypes();
genericboxtypes.removeDocumentById(genericboxtype.getId());
genericboxtype.setLastUpdateNow();
genericboxtype.setCallContextAuthor();
genericboxtypes.addDocument(genericboxtype);
_updateGenericBoxTypes(genericboxtypes);
}
public void deleteGenericBoxType(String id){
DocumentList entries = _getGenericBoxTypes();
entries.removeDocumentById(id);
_updateGenericBoxTypes(entries);
}
public GenericBoxTypeDocument createGenericBoxType(GenericBoxTypeDocument genericboxtype ){
IDHolder idh = _getIdHolder(ID_HOLDER_GENERICBOXTYPE);
int id = idh.getNextIdInt();
genericboxtype.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getGenericBoxTypes();
genericboxtype.setLastUpdateNow();
genericboxtype.setCallContextAuthor();
entries.addDocument(genericboxtype);
_updateGenericBoxTypes(entries);
return genericboxtype;
}
public GenericBoxTypeDocument importGenericBoxType(GenericBoxTypeDocument genericboxtype ){
IDHolder idh = _getIdHolder(ID_HOLDER_GENERICBOXTYPE);
idh.adjustTill(genericboxtype.getId());
putDocument(idh);
DocumentList entries = _getGenericBoxTypes();
genericboxtype.setLastUpdateNow();
genericboxtype.setCallContextAuthor();
entries.addDocument(genericboxtype);
_updateGenericBoxTypes(entries);
return genericboxtype;
}
@SuppressWarnings("unchecked")
private DocumentList _getGenericBoxHandlerDefs(){
try{
return getList(LIST_GENERICBOXHANDLERDEF);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_GENERICBOXHANDLERDEF);
}
}
private void _updateGenericBoxHandlerDefs(DocumentList list){
putList(list);
}
public List getGenericBoxHandlerDefs(){
return _getGenericBoxHandlerDefs().getList();
}
public GenericBoxHandlerDefDocument getGenericBoxHandlerDef(String id){
return _getGenericBoxHandlerDefs().getDocumentById(id);
}
public void updateGenericBoxHandlerDef(GenericBoxHandlerDefDocument genericboxhandlerdef){
DocumentList genericboxhandlerdefs = _getGenericBoxHandlerDefs();
genericboxhandlerdefs.removeDocumentById(genericboxhandlerdef.getId());
genericboxhandlerdef.setLastUpdateNow();
genericboxhandlerdef.setCallContextAuthor();
genericboxhandlerdefs.addDocument(genericboxhandlerdef);
_updateGenericBoxHandlerDefs(genericboxhandlerdefs);
}
public void deleteGenericBoxHandlerDef(String id){
DocumentList entries = _getGenericBoxHandlerDefs();
entries.removeDocumentById(id);
_updateGenericBoxHandlerDefs(entries);
}
public GenericBoxHandlerDefDocument createGenericBoxHandlerDef(GenericBoxHandlerDefDocument genericboxhandlerdef ){
IDHolder idh = _getIdHolder(ID_HOLDER_GENERICBOXHANDLERDEF);
int id = idh.getNextIdInt();
genericboxhandlerdef.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getGenericBoxHandlerDefs();
genericboxhandlerdef.setLastUpdateNow();
genericboxhandlerdef.setCallContextAuthor();
entries.addDocument(genericboxhandlerdef);
_updateGenericBoxHandlerDefs(entries);
return genericboxhandlerdef;
}
public GenericBoxHandlerDefDocument importGenericBoxHandlerDef(GenericBoxHandlerDefDocument genericboxhandlerdef ){
IDHolder idh = _getIdHolder(ID_HOLDER_GENERICBOXHANDLERDEF);
idh.adjustTill(genericboxhandlerdef.getId());
putDocument(idh);
DocumentList entries = _getGenericBoxHandlerDefs();
genericboxhandlerdef.setLastUpdateNow();
genericboxhandlerdef.setCallContextAuthor();
entries.addDocument(genericboxhandlerdef);
_updateGenericBoxHandlerDefs(entries);
return genericboxhandlerdef;
}
@SuppressWarnings("unchecked")
private DocumentList _getGenericGuardDefs(){
try{
return getList(LIST_GENERICGUARDDEF);
}catch(NoSuchDocumentListException e){
return new DocumentList(LIST_GENERICGUARDDEF);
}
}
private void _updateGenericGuardDefs(DocumentList list){
putList(list);
}
public List getGenericGuardDefs(){
return _getGenericGuardDefs().getList();
}
public GenericGuardDefDocument getGenericGuardDef(String id){
return _getGenericGuardDefs().getDocumentById(id);
}
public void updateGenericGuardDef(GenericGuardDefDocument genericguarddef){
DocumentList genericguarddefs = _getGenericGuardDefs();
genericguarddefs.removeDocumentById(genericguarddef.getId());
genericguarddef.setLastUpdateNow();
genericguarddef.setCallContextAuthor();
genericguarddefs.addDocument(genericguarddef);
_updateGenericGuardDefs(genericguarddefs);
}
public void deleteGenericGuardDef(String id){
DocumentList entries = _getGenericGuardDefs();
entries.removeDocumentById(id);
_updateGenericGuardDefs(entries);
}
public GenericGuardDefDocument createGenericGuardDef(GenericGuardDefDocument genericguarddef ){
IDHolder idh = _getIdHolder(ID_HOLDER_GENERICGUARDDEF);
int id = idh.getNextIdInt();
genericguarddef.renameTo(""+id);
putDocument(idh);
DocumentList entries = _getGenericGuardDefs();
genericguarddef.setLastUpdateNow();
genericguarddef.setCallContextAuthor();
entries.addDocument(genericguarddef);
_updateGenericGuardDefs(entries);
return genericguarddef;
}
public GenericGuardDefDocument importGenericGuardDef(GenericGuardDefDocument genericguarddef ){
IDHolder idh = _getIdHolder(ID_HOLDER_GENERICGUARDDEF);
idh.adjustTill(genericguarddef.getId());
putDocument(idh);
DocumentList entries = _getGenericGuardDefs();
genericguarddef.setLastUpdateNow();
genericguarddef.setCallContextAuthor();
entries.addDocument(genericguarddef);
_updateGenericGuardDefs(entries);
return genericguarddef;
}
}