Class MetadataHelper


  • public class MetadataHelper
    extends java.lang.Object
    Retrieves data from the add-on's metadata dataset.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.math.BigDecimal getGroupId​(com.onwbp.adaptation.Adaptation record)
      Gets the group id of the given record.
      static State getState​(com.onwbp.adaptation.Adaptation record)
      Gets the State of the given record.
      static com.onwbp.adaptation.Adaptation getTargetRecord​(com.onwbp.adaptation.Adaptation record)
      Gets the target record of a given record in the business table.
      static boolean isAutoCreated​(com.onwbp.adaptation.Adaptation record)
      Checks whether the given record is auto-created.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getGroupId

        public static java.math.BigDecimal getGroupId​(com.onwbp.adaptation.Adaptation record)
                                               throws com.orchestranetworks.addon.mame.common.InvalidParameterException,
                                                      com.orchestranetworks.schema.PathAccessException
        Gets the group id of the given record.
        Parameters:
        record - A record in business table
        Returns:
        BigDecimal The group id of the given record, or null when the given record does not belong to any group
        Throws:
        com.orchestranetworks.addon.mame.common.InvalidParameterException - When given record is null or not a table occurrence
        com.orchestranetworks.schema.PathAccessException - When the given record belong to the table which did not activate matching yet
      • getState

        public static State getState​(com.onwbp.adaptation.Adaptation record)
                              throws com.orchestranetworks.addon.mame.common.InvalidParameterException,
                                     com.orchestranetworks.schema.PathAccessException
        Gets the State of the given record.
        Parameters:
        record - A record in business table
        Returns:
        State The state of the given record
        Throws:
        com.orchestranetworks.addon.mame.common.InvalidParameterException - When given record is null or not a table occurrence
        com.orchestranetworks.schema.PathAccessException - When the given record belong to the table which did not activate matching yet
      • isAutoCreated

        public static boolean isAutoCreated​(com.onwbp.adaptation.Adaptation record)
                                     throws com.orchestranetworks.addon.mame.common.InvalidParameterException,
                                            com.orchestranetworks.schema.PathAccessException
        Checks whether the given record is auto-created.
        Parameters:
        record - A record in business table
        Returns:
        boolean true when the given record is auto-created, false otherwise
        Throws:
        com.orchestranetworks.addon.mame.common.InvalidParameterException - When given record is null or not a table occurrence
        com.orchestranetworks.schema.PathAccessException - When the given record belong to the table which did not activate matching yet
      • getTargetRecord

        public static com.onwbp.adaptation.Adaptation getTargetRecord​(com.onwbp.adaptation.Adaptation record)
                                                               throws com.orchestranetworks.addon.mame.common.InvalidParameterException,
                                                                      com.orchestranetworks.schema.PathAccessException,
                                                                      com.orchestranetworks.addon.mame.common.InvalidStateException
        Gets the target record of a given record in the business table.
        Parameters:
        record - A record in business table
        Returns:
        Adaptation The target record in business table, or null when the given record has no target
        Throws:
        com.orchestranetworks.addon.mame.common.InvalidParameterException - When given record is null or not a table occurrence
        com.orchestranetworks.addon.mame.common.InvalidStateException - When the target record does not exist in business table
        com.orchestranetworks.schema.PathAccessException - When the given record belong to the table which did not activate matching yet