Class QuotaType

    • Constructor Detail

      • QuotaType

        QuotaType​(QuotaTypeData data)
        Creates a new QuotaType item.
        Parameters:
        data - The data class for this item.
    • Method Detail

      • getQuery

        public static ItemQuery<QuotaType> getQuery()
        Get a query configured to retrieve QuotaType. All logged in users have READ permission to all QuotaType items.
        Returns:
        An ItemQuery object
      • getType

        public Item getType()
        Description copied from interface: Identifiable
        Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.
        Specified by:
        getType in interface Identifiable
        Returns:
        A value indicating the type of item
      • getName

        public String getName()
        Description copied from interface: Nameable
        Get the name of the item.
        Specified by:
        getName in interface Nameable
        Returns:
        A String with the name of the item
      • getDescription

        public String getDescription()
        Description copied from interface: Nameable
        Get the description for the item.
        Specified by:
        getDescription in interface Nameable
        Returns:
        A String with a description of the item
      • getSystemId

        public String getSystemId()
        Description copied from interface: SystemItem
        Get the system id for the item.
        Specified by:
        getSystemId in interface SystemItem
        Returns:
        The id of the item or null if it is not a system item
      • isSystemItem

        public boolean isSystemItem()
        Description copied from interface: SystemItem
        Check if the item is a system item or not. A system item have a non-null value for the system id.
        Specified by:
        isSystemItem in interface SystemItem
        Returns:
        TRUE if this item is a system item, FALSE otherwise
      • getEntryDate

        public Date getEntryDate()
        Description copied from interface: Registered
        Get the date that the item was registered in the database.
        Specified by:
        getEntryDate in interface Registered
        Returns:
        A date or null if this is not known
      • setEntryDate

        public void setEntryDate​(Date entryDate)
        Description copied from interface: Registered
        Set the date the entry was registered in the database. Implementations should only allow this property to be set before the item is first stored in the database. The intention of this method is to facilitate export/import of data between server.
        Specified by:
        setEntryDate in interface Registered
        Parameters:
        entryDate - A date or null to use today's date
      • isUsed

        public boolean isUsed()
        Description copied from class: BasicItem
        Check if this item is used by some other item. With used we mean that another item is linking to this item in way that prevents this item from beeing deleted. Ie. if we tried to delete an item that is used, we would get a foreign key violation error from the database. If the subclass overrides this method it should propagate the call to the superclass, ie. super.isUsed(), unless it has decided that the item is used by some other means.
        Overrides:
        isUsed in class BasicItem
        Returns:
        Allways return true.
        See Also:
        BasicItem.getUsingItems()
      • initPermissions

        void initPermissions​(int granted,
                             int denied)
                      throws BaseException
        The logged in user has read permission to the quota assigned to him/her. If this is a system item, delete and create permissions are denied.
        Overrides:
        initPermissions in class BasicItem
        Parameters:
        granted - Permissions that have been granted by the subclass
        denied - Permissions that have been denied by the subclass
        Throws:
        BaseException - This exception is thrown if there is any error