Package cz.metacentrum.perun.core.api
Class Ban
java.lang.Object
cz.metacentrum.perun.core.api.PerunBean
cz.metacentrum.perun.core.api.Auditable
cz.metacentrum.perun.core.api.Ban
- All Implemented Interfaces:
Serializable,Comparable<PerunBean>
- Direct Known Subclasses:
BanOnFacility,BanOnResource,BanOnVo
Represents ban for someone on something in perun. Description and timestamp.
- Author:
- Michal Stava
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanabstract intId of subject who is banned on target.abstract intId of target where subject is banned on.abstract StringgetType()Class name of specific ban.inthashCode()voidsetDescription(String description) voidsetValidityTo(Date validityTo) toString()Methods inherited from class cz.metacentrum.perun.core.api.Auditable
getCreatedAt, getCreatedBy, getCreatedByUid, getModifiedAt, getModifiedBy, getModifiedByUid, setCreatedAt, setCreatedBy, setCreatedByUid, setModifiedAt, setModifiedBy, setModifiedByUidMethods inherited from class cz.metacentrum.perun.core.api.PerunBean
getBeanName, getId, setId
-
Constructor Details
-
Ban
public Ban()Constructs a new instance. -
Ban
-
Ban
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<PerunBean>- Overrides:
compareToin classPerunBean
-
equals
-
getDescription
-
setDescription
-
getSubjectId
public abstract int getSubjectId()Id of subject who is banned on target.- Returns:
- id of affected subject
-
getTargetId
public abstract int getTargetId()Id of target where subject is banned on.- Returns:
- id of affected target
-
getType
Class name of specific ban.- Returns:
- class name of specific ban
-
getValidityTo
-
setValidityTo
-
getValidityToAsLong
-
hashCode
public int hashCode() -
serializeToString
- Overrides:
serializeToStringin classAuditable
-
toString
-