Class ExtraDBDataManager

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REVISION  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ExtraDBData getExtraDBData​(Data data, java.lang.String name)
      Retrieve the ExtraDBData instance for the specified Data and name.
      static java.util.List<ExtraDBData> getExtraDBDataList​(Data data)
      Retrieve all ExtraDBData for the specified Data.
      static java.util.Map<java.lang.String,​java.lang.String> getExtraDBDataMap​(Data data)
      Retrieve all the extradbdata values for the specified Data.
      static java.lang.String getExtraDBDataValue​(Data data, java.lang.String name)
      Retrieve the extradbdata value for the specified Data and name.
      static int removeAllExtraDBData​(Data data)
      Delete all ExtraDBData for the specified Data.
      static java.lang.String saveExtraDBData​(Data data, java.lang.String name, java.lang.String value)
      Save, update or remove the specified extradbdata value for the specified Data and name.
      static void saveExtraDBDataMap​(Data data, java.util.Map<java.lang.String,​java.lang.String> extraDBDataMap, boolean replace)
      Save, update or remove the specified extradbdatas values for the specified Data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExtraDBDataManager

        public ExtraDBDataManager()
    • Method Detail

      • getExtraDBData

        public static ExtraDBData getExtraDBData​(Data data,
                                                 java.lang.String name)
        Retrieve the ExtraDBData instance for the specified Data and name.
        Parameters:
        data - the Data for which the ExtraDBData is being retrieved
        name - the name of the ExtraDBData to retrieve
        Returns:
        the first ExtraDBData matching the given name or null if no ExtraDBData exists for the specified name
        Since:
        jcms-6.0
      • getExtraDBDataValue

        public static java.lang.String getExtraDBDataValue​(Data data,
                                                           java.lang.String name)
        Retrieve the extradbdata value for the specified Data and name.
        Parameters:
        data - the Data for which the extra is being retrieved
        name - the name of the extradbdata to be retrieved
        Returns:
        the value as a String (or null if no value could be found)
        Since:
        jcms-6.0
      • saveExtraDBData

        public static java.lang.String saveExtraDBData​(Data data,
                                                       java.lang.String name,
                                                       java.lang.String value)
        Save, update or remove the specified extradbdata value for the specified Data and name.
        Parameters:
        data - the Data for which the extra is being set
        name - the name of the extradbdata to be set
        value - the value of the extradbdata to be set (set to null to remove this extradbdata)
        Returns:
        previous value associated with specified name, or null if there was no mapping for name. A null return can also indicate that null was associated with the specified name.
        Since:
        jcms-6.0
      • getExtraDBDataList

        public static java.util.List<ExtraDBData> getExtraDBDataList​(Data data)
        Retrieve all ExtraDBData for the specified Data.
        Parameters:
        data - the Data for which the ExtraDBData are being retrieved
        Returns:
        all ExtraDBData associated the given name or null if no ExtraDBData could be found (never return null)
        Since:
        jcms-6.0
      • getExtraDBDataMap

        public static java.util.Map<java.lang.String,​java.lang.String> getExtraDBDataMap​(Data data)
        Retrieve all the extradbdata values for the specified Data.
        Parameters:
        data - the Data for which the extra is being retrieved
        Returns:
        the extradbdata values, null if there is not extradbdata bound to specified Data
        Since:
        jcms-6.0
      • saveExtraDBDataMap

        public static void saveExtraDBDataMap​(Data data,
                                              java.util.Map<java.lang.String,​java.lang.String> extraDBDataMap,
                                              boolean replace)
        Save, update or remove the specified extradbdatas values for the specified Data.
        Parameters:
        data - the Data for which the extra is being set
        extraDBDataMap - the map of ALL name/value to be saved/updated/removed
        replace - if true, all existing value will be replaced with the specified map, if false, only the key of the specified map are updated/deleted
        Since:
        jcms-6.0
      • removeAllExtraDBData

        public static int removeAllExtraDBData​(Data data)
        Delete all ExtraDBData for the specified Data.
        Parameters:
        data - the Data for which the ExtraDBData are being deleted
        Returns:
        the number of ExtraDBData deleted
        Since:
        jcms-6.0