Class Ban

All Implemented Interfaces:
Serializable, Comparable<PerunBean>
Direct Known Subclasses:
BanOnFacility, BanOnResource, BanOnVo

public abstract class Ban extends Auditable implements Comparable<PerunBean>
Represents ban for someone on something in perun. Description and timestamp.
Author:
Michal Stava
See Also:
  • Constructor Details

    • Ban

      public Ban()
      Constructs a new instance.
    • Ban

      public Ban(int id, Date validityTo)
    • Ban

      public Ban(int id, Date validityTo, String description)
  • Method Details

    • getValidityTo

      public Date getValidityTo()
    • setValidityTo

      public void setValidityTo(Date validityTo)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getType

      public abstract String getType()
      Class name of specific ban.
      Returns:
      class name of specific ban
    • 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
    • serializeToString

      public String serializeToString()
      Overrides:
      serializeToString in class Auditable
    • toString

      public String toString()
      Overrides:
      toString in class Auditable
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Auditable
    • compareTo

      public int compareTo(PerunBean perunBean)
      Specified by:
      compareTo in interface Comparable<PerunBean>
      Overrides:
      compareTo in class PerunBean