Interface ItemModelInternalContext

  • All Superinterfaces:
    ItemModelContext
    All Known Implementing Classes:
    ItemModelContextImpl

    public interface ItemModelInternalContext
    extends ItemModelContext
    Warning: this context represents all methods considered to be internal to the hybris model layer. Therefore they should be used with care because no guarantees can be given for them staying in the same shape!
    • Method Detail

      • getValue

        <T> T getValue​(java.lang.String attribute,
                       T currentValue)
        Retrieves the current value of the specific attribute.
        Returns:
        the current value.
      • setValue

        <T> T setValue​(java.lang.String attribute,
                       T newValue)
        Sets the new value for the specific attribute.
        Returns:
        the new value of the attribute.
      • getLocalizedValue

        <T> T getLocalizedValue​(java.lang.String attribute,
                                java.util.Locale loc)
        Retrieves the current value of the specific attribute with the locale.
        Returns:
        the current value with the locale.
      • getLocalizedRelationValue

        <T> T getLocalizedRelationValue​(java.lang.String attribute,
                                        java.util.Locale loc)
        Retrieves the current value of the specific attribute with the locale.
        Returns:
        the current value with the locale.
      • setLocalizedValue

        <T> void setLocalizedValue​(java.lang.String attribute,
                                   java.util.Locale usedLoc,
                                   T value)
        Sets the new value for the specific attribute with the locale.
      • getDynamicValue

        <T> T getDynamicValue​(AbstractItemModel model,
                              java.lang.String attribute)
        Retrieves the dynamic value of the attribute.
        Parameters:
        model - YTODO
        Returns:
        the dynamic value.
      • setDynamicValue

        <T> void setDynamicValue​(AbstractItemModel model,
                                 java.lang.String attribute,
                                 T value)
        Sets the dynamic value of the attribute.
        Parameters:
        model - YTODO
      • getLocalizedDynamicValue

        <T> T getLocalizedDynamicValue​(AbstractItemModel model,
                                       java.lang.String attribute,
                                       java.util.Locale loc)
        Retrieves the dynamic value of the attribute with the local.
        Parameters:
        model - YTODO
        Returns:
        the dynamic value.
      • setLocalizedDynamicValue

        <T> void setLocalizedDynamicValue​(AbstractItemModel model,
                                          java.lang.String attribute,
                                          java.util.Locale loc,
                                          T value)
        Sets the dynamic value of the attribute under the locale.
        Parameters:
        model - YTODO
      • hashCode

        int hashCode​(AbstractItemModel abstractItemModel)
        Calculates the hash code of the model.
        Returns:
        the hash code value
      • writeReplace

        java.lang.Object writeReplace​(java.lang.Object model)
                               throws java.io.ObjectStreamException
        YXX
        Throws:
        java.io.ObjectStreamException
      • getNewPK

        PK getNewPK()
        Returns the newPK assigned to the current model
        Returns:
        new PK for the not saved model
      • generateNewPK

        PK generateNewPK()
        Generate the new PK and assigns it to the current model. Will be generated only for new models if the new PK has not been generated yet
        Returns:
        new generated PK for the not saved model
      • getPropertyValue

        <T> T getPropertyValue​(java.lang.String attribute)
        Returns a value of a property with given name.
        Parameters:
        attribute - name
        Returns:
        value of property with given name
      • setPropertyValue

        <T> void setPropertyValue​(java.lang.String attribute,
                                  T value)
        Allows to set a value of a property with given name.
        Parameters:
        attribute - name
        value - value to set
      • isDynamicAttribute

        boolean isDynamicAttribute​(java.lang.String attributeName)
        Returns information whether given attribute is dynamic or not
        Parameters:
        attributeName - attribute name
        Returns:
        true if attribute is dynamic, false otherwise
      • loadOriginalValue

        java.lang.Object loadOriginalValue​(java.lang.String attribute)
        Returns the original value for the given attribute
        Parameters:
        attribute - attribute name
        Returns:
        original value of the given attribute
      • loadOriginalValue

        java.lang.Object loadOriginalValue​(java.lang.String attribute,
                                           java.util.Locale locale)
        Returns the original localized value for the given attribute
        Parameters:
        attribute - attribute name
        locale - locale name
        Returns:
        original value of the given attribute