Class DefaultUnitService

    • Constructor Detail

      • DefaultUnitService

        public DefaultUnitService()
    • Method Detail

      • getAllUnitTypes

        public java.util.Set<java.lang.String> getAllUnitTypes()
        Description copied from interface: UnitService
        Returns all unit types (e.g. 'weight', 'size' ).
        Specified by:
        getAllUnitTypes in interface UnitService
        Returns:
        a set of type strings
      • getAllUnits

        public java.util.Set<UnitModel> getAllUnits()
        Description copied from interface: UnitService
        Returns all Units.
        Specified by:
        getAllUnits in interface UnitService
        Returns:
        a set containing all units.
      • setUnitDao

        public void setUnitDao​(UnitDao unitDao)
      • getUnitsForUnitType

        public java.util.Set<UnitModel> getUnitsForUnitType​(java.lang.String unitType)
        Description copied from interface: UnitService
        Returns all units for specific unit type
        Specified by:
        getUnitsForUnitType in interface UnitService
        Parameters:
        unitType - search only units for this unit type
        Returns:
        found units that match unit type