Enum Class QueueEntity
- All Implemented Interfaces:
Serializable, Comparable<QueueEntity>, Constable
An entity a queue can list: everything about it the otherwise entity-agnostic queue machinery
needs — the table to select from, the fields a column or a filter may address, the object type
its
param:<id> columns and filters belong to, and how access to its rows is restricted.
Adding an entity to the queues is meant to be this enum plus its titles, nothing else: columns,
filters, sorting, the search query, the chooser of visible filters and the screens are shared.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEquipment.Items.Manufacturers.Equipment models.Stock movements — a journal rather than a catalogue: rows are never updated or deleted, and each one names the warehouse it happened on, so warehouse access restricts it.Warehouses. -
Method Summary
Modifier and TypeMethodDescriptionaccessRestriction(Connection con, DynActionForm form) Rows the user may see.Column of the table holding the warehouse anaccessRestriction(Connection, DynActionForm)applies to.getFieldExpression(String name) SQL expression of a plain field addressable from the configuration ascolumn.N.value=<name>.Sorted, so that the list of available fields an error message names reads the same way every time — seeQueueColumn.of.getId()Stored in theentitycolumn of the queue and used in configuration.Object type of the parameters aparam:<id>column or filter may address.getTable()Table the queue selects from, always aliased ast.Phrase to show a person, to be passed through the localizer.booleanWhether the table has adeleted_atcolumn, which the 'deleted' filter needs.static QueueEntitystatic QueueEntityReturns the enum constant of this class with the specified name.static QueueEntity[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STORE
Warehouses. Access is restricted byStoreAccessService, unlike the others. -
ITEM
Items. Visible to anyone allowed to open the screen — an item belongs to no warehouse. -
DEVICE
Equipment. Lives on a warehouse, so the same restriction as warehouses applies. -
MANUFACTURER
Manufacturers. A directory: visible to anyone allowed to open the screen. -
MODEL
Equipment models. A directory as well; its title is the model name. -
MOVEMENT
Stock movements — a journal rather than a catalogue: rows are never updated or deleted, and each one names the warehouse it happened on, so warehouse access restricts it. Its free text is the comment, which is what a 'title' filter searches.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
of
-
getId
Stored in theentitycolumn of the queue and used in configuration. -
getTitleKey
Phrase to show a person, to be passed through the localizer. The id is a configuration token ('store', 'item', 'device') and reads as one when put on a screen. -
getTable
Table the queue selects from, always aliased ast. -
getObjectType
Object type of the parameters aparam:<id>column or filter may address. -
isSoftDelete
public boolean isSoftDelete()Whether the table has adeleted_atcolumn, which the 'deleted' filter needs. -
getFieldExpression
-
getFieldNames
-
accessRestriction
Rows the user may see.- Returns:
nullwhen unrestricted, otherwise the IDs of the warehouses the rows must belong to — an empty set meaning nothing is visible.- Throws:
Exception
-
getAccessColumn
Column of the table holding the warehouse anaccessRestriction(Connection, DynActionForm)applies to.- Returns:
- the column, or
nullwhen the entity is not restricted that way.
-