All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
net.anotheria.anosite.gen.ascustomdata.data.CustomGuardDefDocument Maven / Gradle / Ivy
/**
********************************************************************************
*** CustomGuardDefDocument.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.ascustomdata.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 CustomGuardDefDocument extends AbstractASGDocument implements CustomGuardDef, IComparable{
public CustomGuardDefDocument() {
super("");
}
public CustomGuardDefDocument(String id){
super(id);
}
public CustomGuardDefDocument(CustomGuardDefDocument toClone){
super(toClone);
}
CustomGuardDefDocument(CustomGuardDefBuilder builder){
super("");
setParameter1(builder.parameter1);
setParameter2(builder.parameter2);
setParameter3(builder.parameter3);
setParameter4(builder.parameter4);
setParameter5(builder.parameter5);
setDescription(builder.description);
setName(builder.name);
setClazz(builder.clazz);
}
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 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 toString(){
String ret = "CustomGuardDef ";
ret += "["+getId()+"] ";
ret += "parameter1: "+getParameter1();
ret += ", ";
ret += "parameter2: "+getParameter2();
ret += ", ";
ret += "parameter3: "+getParameter3();
ret += ", ";
ret += "parameter4: "+getParameter4();
ret += ", ";
ret += "parameter5: "+getParameter5();
ret += ", ";
ret += "description: "+getDescription();
ret += ", ";
ret += "name: "+getName();
ret += ", ";
ret += "clazz: "+getClazz();
return ret;
}
public int compareTo(CustomGuardDef comparable){
return compareTo(comparable, CustomGuardDefSortType.SORT_BY_DEFAULT);
}
public int compareTo(IComparable anotherComparable, int method){
CustomGuardDefDocument anotherDoc = (CustomGuardDefDocument) anotherComparable;
switch(method){
case CustomGuardDefSortType.SORT_BY_ID:
return BasicComparable.compareString(getId(), anotherDoc.getId());
case CustomGuardDefSortType.SORT_BY_PARAMETER1:
return BasicComparable.compareString(getParameter1(), anotherDoc.getParameter1());
case CustomGuardDefSortType.SORT_BY_PARAMETER2:
return BasicComparable.compareString(getParameter2(), anotherDoc.getParameter2());
case CustomGuardDefSortType.SORT_BY_PARAMETER3:
return BasicComparable.compareString(getParameter3(), anotherDoc.getParameter3());
case CustomGuardDefSortType.SORT_BY_PARAMETER4:
return BasicComparable.compareString(getParameter4(), anotherDoc.getParameter4());
case CustomGuardDefSortType.SORT_BY_PARAMETER5:
return BasicComparable.compareString(getParameter5(), anotherDoc.getParameter5());
case CustomGuardDefSortType.SORT_BY_DESCRIPTION:
return BasicComparable.compareString(getDescription(), anotherDoc.getDescription());
case CustomGuardDefSortType.SORT_BY_NAME:
return BasicComparable.compareString(getName(), anotherDoc.getName());
case CustomGuardDefSortType.SORT_BY_CLAZZ:
return BasicComparable.compareString(getClazz(), anotherDoc.getClazz());
default:
throw new RuntimeException("Sort method "+method+" is not supported.");
}
}
public String getDefinedName(){
return "CustomGuardDef";
}
public String getDefinedParentName(){
return "ASCustomData";
}
public String getFootprint(){
StringBuilder footprint = new StringBuilder();
footprint.append(getParameter1());
footprint.append(getParameter2());
footprint.append(getParameter3());
footprint.append(getParameter4());
footprint.append(getParameter5());
footprint.append(getDescription());
footprint.append(getName());
footprint.append(getClazz());
return MD5Util.getMD5Hash(footprint);
}
public boolean equals(Object o){
return o == this || ((o instanceof CustomGuardDefDocument) && ((CustomGuardDefDocument)o).getId().equals(getId()));
}
}