net.anotheria.anosite.gen.asgenericdata.data.GenericGuardDefDocument Maven / Gradle / Ivy
The newest version!
/**
********************************************************************************
*** GenericGuardDefDocument.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.asgenericdata.data;
import net.anotheria.asg.data.AbstractASGDocument;
import net.anotheria.util.crypt.MD5Util;
import net.anotheria.util.sorter.IComparable;
import net.anotheria.util.BasicComparable;
public class GenericGuardDefDocument extends AbstractASGDocument implements GenericGuardDef, IComparable{
public GenericGuardDefDocument() {
super("");
}
public GenericGuardDefDocument(String id){
super(id);
}
public GenericGuardDefDocument(GenericGuardDefDocument toClone){
super(toClone);
}
GenericGuardDefDocument(GenericGuardDefBuilder builder){
super("");
setName(builder.name);
setClazz(builder.clazz);
setParameter1(builder.parameter1);
setParameter2(builder.parameter2);
setParameter3(builder.parameter3);
setParameter4(builder.parameter4);
setParameter5(builder.parameter5);
setDescription(builder.description);
}
public String getName(){
return getString(PROP_NAME);
}
public void setName(String value){
setString(PROP_NAME, value);
}
public String getClazz(){
return getString(PROP_CLAZZ);
}
public void setClazz(String value){
setString(PROP_CLAZZ, value);
}
public String getParameter1(){
return getString(PROP_PARAMETER1);
}
public void setParameter1(String value){
setString(PROP_PARAMETER1, value);
}
public String getParameter2(){
return getString(PROP_PARAMETER2);
}
public void setParameter2(String value){
setString(PROP_PARAMETER2, value);
}
public String getParameter3(){
return getString(PROP_PARAMETER3);
}
public void setParameter3(String value){
setString(PROP_PARAMETER3, value);
}
public String getParameter4(){
return getString(PROP_PARAMETER4);
}
public void setParameter4(String value){
setString(PROP_PARAMETER4, value);
}
public String getParameter5(){
return getString(PROP_PARAMETER5);
}
public void setParameter5(String value){
setString(PROP_PARAMETER5, value);
}
public String getDescription(){
return getString(PROP_DESCRIPTION);
}
public void setDescription(String value){
setString(PROP_DESCRIPTION, value);
}
public String toString(){
String ret = "GenericGuardDef ";
ret += "["+getId()+"] ";
ret += "name: "+getName();
ret += ", ";
ret += "clazz: "+getClazz();
ret += ", ";
ret += "parameter1: "+getParameter1();
ret += ", ";
ret += "parameter2: "+getParameter2();
ret += ", ";
ret += "parameter3: "+getParameter3();
ret += ", ";
ret += "parameter4: "+getParameter4();
ret += ", ";
ret += "parameter5: "+getParameter5();
ret += ", ";
ret += "description: "+getDescription();
return ret;
}
public int compareTo(GenericGuardDef comparable){
return compareTo(comparable, GenericGuardDefSortType.SORT_BY_DEFAULT);
}
public int compareTo(IComparable anotherComparable, int method){
GenericGuardDefDocument anotherDoc = (GenericGuardDefDocument) anotherComparable;
switch(method){
case GenericGuardDefSortType.SORT_BY_ID:
return BasicComparable.compareString(getId(), anotherDoc.getId());
case GenericGuardDefSortType.SORT_BY_NAME:
return BasicComparable.compareString(getName(), anotherDoc.getName());
case GenericGuardDefSortType.SORT_BY_CLAZZ:
return BasicComparable.compareString(getClazz(), anotherDoc.getClazz());
case GenericGuardDefSortType.SORT_BY_PARAMETER1:
return BasicComparable.compareString(getParameter1(), anotherDoc.getParameter1());
case GenericGuardDefSortType.SORT_BY_PARAMETER2:
return BasicComparable.compareString(getParameter2(), anotherDoc.getParameter2());
case GenericGuardDefSortType.SORT_BY_PARAMETER3:
return BasicComparable.compareString(getParameter3(), anotherDoc.getParameter3());
case GenericGuardDefSortType.SORT_BY_PARAMETER4:
return BasicComparable.compareString(getParameter4(), anotherDoc.getParameter4());
case GenericGuardDefSortType.SORT_BY_PARAMETER5:
return BasicComparable.compareString(getParameter5(), anotherDoc.getParameter5());
case GenericGuardDefSortType.SORT_BY_DESCRIPTION:
return BasicComparable.compareString(getDescription(), anotherDoc.getDescription());
default:
throw new RuntimeException("Sort method "+method+" is not supported.");
}
}
public String getDefinedName(){
return "GenericGuardDef";
}
public String getDefinedParentName(){
return "ASGenericData";
}
public String getFootprint(){
StringBuilder footprint = new StringBuilder();
footprint.append(getName());
footprint.append(getClazz());
footprint.append(getParameter1());
footprint.append(getParameter2());
footprint.append(getParameter3());
footprint.append(getParameter4());
footprint.append(getParameter5());
footprint.append(getDescription());
return MD5Util.getMD5Hash(footprint);
}
public boolean equals(Object o){
return o == this || ((o instanceof GenericGuardDefDocument) && ((GenericGuardDefDocument)o).getId().equals(getId()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy