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 TypeMethodDescriptionint
boolean
abstract int
Id of subject who is banned on target.abstract int
Id of target where subject is banned on.abstract String
getType()
Class name of specific ban.int
hashCode()
void
setDescription
(String description) void
setValidityTo
(Date validityTo) toString()
Methods inherited from class cz.metacentrum.perun.core.api.Auditable
getCreatedAt, getCreatedBy, getCreatedByUid, getModifiedAt, getModifiedBy, getModifiedByUid, setCreatedAt, setCreatedBy, setCreatedByUid, setModifiedAt, setModifiedBy, setModifiedByUid
Methods 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:
compareTo
in interfaceComparable<PerunBean>
- Overrides:
compareTo
in 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:
serializeToString
in classAuditable
-
toString
-