Class MultiPropertyIdMethod

  • All Implemented Interfaces:
    IdMethod

    public class MultiPropertyIdMethod
    extends Object
    implements IdMethod
    Identification method implementation that can use a multiple properties (eg, name, id, externalId, etc.) for identifying items. Each property is tried in turn and a result is returned as soon as the query returns at least one result.
    Version:
    2.8
    Author:
    nicklas
    Last modified
    $Date: 2016-03-08 13:22:23 +0100 (ti, 08 mar 2016) $
    • Field Detail

      • NAME_OR_EXTERNALID

        public static final MultiPropertyIdMethod NAME_OR_EXTERNALID
        Use the name or external ID for finding items.
      • NAME_OR_BARCODE

        public static final MultiPropertyIdMethod NAME_OR_BARCODE
        Use the name or barcode for finding items.
      • NAME_OR_SYSTEMID

        public static final MultiPropertyIdMethod NAME_OR_SYSTEMID
        Use the name or system Id for finding items.
        Since:
        3.0
      • NAME_OR_UNITSYMBOL

        public static final MultiPropertyIdMethod NAME_OR_UNITSYMBOL
        Use the name or unit symbol for finding items. Can be used for finding units.
        Since:
        3.8
      • method

        private final String method
      • properties

        private final String[] properties
      • title

        private final String title
      • unique

        private final boolean unique
      • valueType

        private final Type valueType
    • Constructor Detail

      • MultiPropertyIdMethod

        public MultiPropertyIdMethod​(String method,
                                     String title,
                                     String[] properties,
                                     boolean unique,
                                     Type valueType)
        Create a new id method.
        Parameters:
        method - The method name, which should be unique among all methods
        title - The title to use for display purposes
        properties - The name of the properties to filter on when using this id method
        unique - If this property is guaranteed to be unique or not
        valueType - The type of values