net.anotheria.anosite.gen.asuserdata.bean.UserDefListItemBean Maven / Gradle / Ivy
/**
********************************************************************************
*** UserDefListItemBean.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.asuserdata.bean;
import java.util.List;
import net.anotheria.util.sorter.IComparable;
import net.anotheria.util.BasicComparable;
/**
* Generated by class net.anotheria.asg.generator.view.action.ModuleBeanGenerator
*/
public class UserDefListItemBean implements IComparable{
// Generated by: class net.anotheria.asg.generator.view.action.ModuleBeanGenerator.generateListItemBean
private String id;
// Elements sort type is NUMERICAL
private int idForSorting;
private String login;
// Elements sort type is ALPHABETHICAL
private String loginForSorting;
private String status;
// Elements sort type is CONTAINERS
private List statusForSorting;
private String editLink;
private String deleteWithConfirmationLink;
private String lockLink;
private String unlockLink;
private String transferLink;
private String plainId;
private String documentLastUpdateTimestamp;
public void setIdForSorting(String idForSorting ){
this.idForSorting = Integer.parseInt(idForSorting);
}
public int getIdForSorting(){
return idForSorting;
}
public void setId(String id ){
this.id = id;
}
public String getId(){
return id;
}
public void setLoginForSorting(String loginForSorting ){
this.loginForSorting = loginForSorting;
}
public String getLoginForSorting(){
return loginForSorting;
}
public void setLogin(String login ){
this.login = login;
}
public String getLogin(){
return login;
}
public void setStatusForSorting(List statusForSorting ){
this.statusForSorting = statusForSorting;
}
public List getStatusForSorting(){
return statusForSorting;
}
public void setStatus(String status ){
this.status = status;
}
public String getStatus(){
return status;
}
public void setEditLink(String editLink ){
this.editLink = editLink;
}
public String getEditLink(){
return editLink;
}
public void setDeleteWithConfirmationLink(String deleteWithConfirmationLink ){
this.deleteWithConfirmationLink = deleteWithConfirmationLink;
}
public String getDeleteWithConfirmationLink(){
return deleteWithConfirmationLink;
}
public void setLockLink(String lockLink ){
this.lockLink = lockLink;
}
public String getLockLink(){
return lockLink;
}
public void setUnlockLink(String unlockLink ){
this.unlockLink = unlockLink;
}
public String getUnlockLink(){
return unlockLink;
}
public void setTransferLink(String transferLink ){
this.transferLink = transferLink;
}
public String getTransferLink(){
return transferLink;
}
public void setPlainId(String plainId ){
this.plainId = plainId;
}
public String getPlainId(){
return plainId;
}
public void setDocumentLastUpdateTimestamp(String documentLastUpdateTimestamp ){
this.documentLastUpdateTimestamp = documentLastUpdateTimestamp;
}
public String getDocumentLastUpdateTimestamp(){
return documentLastUpdateTimestamp;
}
/**
* LockableObject "locked" property. For object Locking.
*/
private boolean locked;
public void setLocked(boolean locked ){
this.locked = locked;
}
public boolean isLocked(){
return locked;
}
/**
* LockableObject "lockerId" property. For userName containing.
*/
private String lockerId;
public void setLockerId(String lockerId ){
this.lockerId = lockerId;
}
public String getLockerId(){
return lockerId;
}
/**
* LockableObject "lockingTime" property.
*/
private String lockingTime;
public void setLockingTime(String lockingTime ){
this.lockingTime = lockingTime;
}
public String getLockingTime(){
return lockingTime;
}
public int compareTo(IComparable anotherComparable, int method){
UserDefListItemBean anotherBean = (UserDefListItemBean) anotherComparable;
switch(method){
case UserDefListItemBeanSortType.SORT_BY_ID:
return BasicComparable.compareInt(idForSorting, anotherBean.idForSorting);
case UserDefListItemBeanSortType.SORT_BY_LOGIN:
return BasicComparable.compareString(loginForSorting, anotherBean.loginForSorting);
case UserDefListItemBeanSortType.SORT_BY_STATUS:
return BasicComparable.compareList(statusForSorting, anotherBean.statusForSorting);
default:
throw new RuntimeException("Sort method "+method+" is not supported.");
}
}
}