Interface TypeService

    • Method Detail

      • getBaseType

        BaseType getBaseType​(java.lang.String code)
        Gets the base type.
        Parameters:
        code - the code
        Returns:
        the base type
      • getExtendedType

        ExtendedType getExtendedType​(java.lang.String code)
        Gets the extended type.
        Parameters:
        code - the code
        Returns:
        the extended type
      • getObjectTemplate

        ObjectTemplate getObjectTemplate​(java.lang.String code)
        Gets the object template.
        Parameters:
        code - the code
        Returns:
        the object template
      • getAllSubtypes

        java.util.Set<ObjectType> getAllSubtypes​(ObjectType type)
        Gets the all subtypes.
        Parameters:
        type - the type
        Returns:
        the all subtypes
      • getAllSupertypes

        java.util.List<ObjectType> getAllSupertypes​(ObjectType type)
        Gets the all supertypes.
        Parameters:
        type - the type
        Returns:
        the all supertypes
      • getObjectTemplates

        java.util.List<ObjectTemplate> getObjectTemplates​(BaseType type)
        Gets the object templates.
        Parameters:
        type - the type
        Returns:
        the object templates
      • getPropertyDescriptor

        PropertyDescriptor getPropertyDescriptor​(ObjectType type,
                                                 java.lang.String qualifier)
        Gets the property descriptor.
        Parameters:
        type - the type
        qualifier - the qualifier
        Returns:
        the property descriptor
      • getObjectType

        ObjectType getObjectType​(java.lang.String code)
        Gets the object type.
        Parameters:
        code - the code
        Returns:
        the object type
      • getTypeCodeFromPropertyQualifier

        java.lang.String getTypeCodeFromPropertyQualifier​(java.lang.String propertyQualifier)
        The type (base or extended) part of the property qualifier. (E.g. having qualifier "Product.code" this returns "Product".)
        Parameters:
        propertyQualifier - the property qualifier
        Returns:
        the type code from property qualifier
      • getAttributeCodeFromPropertyQualifier

        java.lang.String getAttributeCodeFromPropertyQualifier​(java.lang.String propertyQualifier)
        Gets the attribute code from property qualifier.
        Parameters:
        propertyQualifier - the property qualifier
        Returns:
        the attribute code from property qualifier
      • getObjectTypeFromPropertyQualifier

        ObjectType getObjectTypeFromPropertyQualifier​(java.lang.String propertyQualifier)
        Gets the object type from property qualifier.
        Parameters:
        propertyQualifier - the property qualifier
        Returns:
        the object type from property qualifier
      • getPropertyDescriptor

        PropertyDescriptor getPropertyDescriptor​(java.lang.String propertyQualifier)
        Gets the property descriptor.
        Parameters:
        propertyQualifier - the property qualifier
        Returns:
        the property descriptor
      • getValueTypeCode

        java.lang.String getValueTypeCode​(PropertyDescriptor propertyDescriptor)
        Gets the value type code.
        Parameters:
        propertyDescriptor - the property descriptor
        Returns:
        the value type code
      • getAvailableValues

        java.util.List<java.lang.Object> getAvailableValues​(PropertyDescriptor propertyDescriptor)
        Gets the available values.
        Parameters:
        propertyDescriptor - the property descriptor
        Returns:
        the available values
      • getAvailableValues

        java.util.List<java.lang.Object> getAvailableValues​(PropertyDescriptor propertyDescriptor,
                                                            TypedObject object)
        Gets the available values.
        Parameters:
        propertyDescriptor - the property descriptor
        Returns:
        the available values
      • wrapItem

        TypedObject wrapItem​(java.lang.Object item)
        Wrap item.
        Parameters:
        item - the item
        Returns:
        the typed object
      • wrapItems

        java.util.List<TypedObject> wrapItems​(java.util.Collection<? extends java.lang.Object> items)
        Wrap items.
        Parameters:
        items - the items
        Returns:
        the list< typed object>
      • unwrapItems

        java.util.List<ItemModel> unwrapItems​(java.util.Collection<TypedObject> typedObjects)
        Unwrap items to models
        Parameters:
        typedObjects -
        Returns:
        the list of ItemModel items
      • getBestTemplate

        ObjectTemplate getBestTemplate​(TypedObject object)
        Gets the best template.
        Parameters:
        object - the object
        Returns:
        the best template
      • checkItemAlive

        boolean checkItemAlive​(TypedObject typedItem)
        Check item alive.
        Parameters:
        typedItem - the typed item
        Returns:
        true, if successful
      • getAllInstancesOf

        java.util.Collection<TypedObject> getAllInstancesOf​(ObjectType type)
        Gets all instances of the given type. Keep in mind that this can be very expensive, so use countAllInstancesOf(ObjectType) before calling this method
        Parameters:
        type - the type
        Returns:
        the instances of the given type
      • getAllInstancesOf

        java.util.Collection<TypedObject> getAllInstancesOf​(ObjectType type,
                                                            java.lang.String sortBy,
                                                            java.lang.String ascending)
        Gets all instances of the given type according to given sort criteria. Keep in mind that this can be very expensive, so use countAllInstancesOf(ObjectType) before calling this method
        Parameters:
        type - the type
        sortBy - given sort property
        ascending - given sort order
        Returns:
        the instances of the given type
      • countAllInstancesOf

        int countAllInstancesOf​(ObjectType type)
        Count all instances of the given type
        Parameters:
        type - the type
        Returns:
        the number of instances or -1 if there was an error
      • getSelectionOf

        PropertyDescriptor getSelectionOf​(PropertyDescriptor descriptor)
        returns the "selectionOf" property of the given property descriptor
        Parameters:
        descriptor - the source property descriptor
        Returns:
        the "selectionOf" property of the given property descriptor
      • getReverseSelectionOf

        java.util.Collection<PropertyDescriptor> getReverseSelectionOf​(PropertyDescriptor descriptor)
        returns the list of all property descriptors that the give property descriptor is "selectionOf"
        Parameters:
        descriptor - the source property descriptor
        Returns:
        the list of all property descriptors that the give property descriptor is "selectionOf"