Class ViewType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable

    public class ViewType
    extends ComposedType
    Represents the funtionality of a 'SQL-View'. Visit wiki.hybris.de for more informations.
    See Also:
    Serialized Form
    • Constructor Detail

      • ViewType

        public ViewType()
    • Method Detail

      • getJaloClass

        public java.lang.Class getJaloClass()
        Redefined to return ViewResultItem class.
        Overrides:
        getJaloClass in class ComposedType
        Returns:
        the jalo class object of the item defined by this type. if this type doesnt have a own jalo class the supertype is used.
      • isAbstract

        public boolean isAbstract()
        redefined to return true always.
        Overrides:
        isAbstract in class ComposedType
        Returns:
        true if the type cannot have instances.
      • getQuery

        public java.lang.String getQuery()
        Returns:
        the flexible search query which defines the instances of this view type
      • setQuery

        public void setQuery​(java.lang.String q)
        Changes the flexible search query of this view type.

        Please make sure that the amount and oder of the column and param attribute descriptors of this type still match the query!

        Parameters:
        q - the new query - must not be null
      • setParamAttributeDescriptors

        protected void setParamAttributeDescriptors​(java.util.Set params)
        Changes the current param attribute descriptor set. All previous attribute descriptors which are not contained in the new set are removed.
        Parameters:
        params - the new set of param attribute descriptors
      • getParamAttributeDescriptors

        public java.util.Set getParamAttributeDescriptors()
        Returns:
        a set of all attribute descriptors which describe query params for this view type
      • setColumnAttributeDescriptors

        protected void setColumnAttributeDescriptors​(java.util.List cols)
        Changes the current column attribute descriptor list. All previous attribute descriptors which are not contained in the new set are removed. The list order must match the query SELECT order!
        Parameters:
        cols - the new list of column attribute descriptors
      • getColumnAttributeDescriptors

        public java.util.List getColumnAttributeDescriptors()
        Returns:
        a set of all attribute descriptors which describe query params for this view type
      • getResultRowSignature

        protected java.util.List getResultRowSignature​(java.util.List resultRowAttributes)
      • createAttributeMapFromRow

        protected java.util.Map createAttributeMapFromRow​(java.util.List resultAttributes,
                                                          java.util.List rowData)
      • convertGenericValueConditions

        public java.util.Map convertGenericValueConditions​(GenericCondition cond)
        Since:
        2.10
      • search

        public SearchResult search​(java.util.Map values,
                                   boolean dontNeedTotal,
                                   int start,
                                   int count)
      • search

        public SearchResult search​(SessionContext ctx,
                                   java.util.Map values,
                                   boolean dontNeedTotal,
                                   int start,
                                   int count)
      • getXMLCustomProperties

        protected java.util.Map getXMLCustomProperties​(java.lang.String forExtension)
        Exports its query as XML custom properties.
        Overrides:
        getXMLCustomProperties in class ComposedType