Class MetadataHelper
- java.lang.Object
-
- com.orchestranetworks.addon.mame.common.util.metadata.MetadataHelper
-
public class MetadataHelper extends java.lang.ObjectRetrieves data from the add-on's metadata dataset.
-
-
Constructor Summary
Constructors Constructor Description MetadataHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.math.BigDecimalgetGroupId(com.onwbp.adaptation.Adaptation record)Gets the group id of the given record.static StategetState(com.onwbp.adaptation.Adaptation record)Gets theStateof the given record.static com.onwbp.adaptation.AdaptationgetTargetRecord(com.onwbp.adaptation.Adaptation record)Gets the target record of a given record in the business table.static booleanisAutoCreated(com.onwbp.adaptation.Adaptation record)Checks whether the given record is auto-created.
-
-
-
Method Detail
-
getGroupId
public static java.math.BigDecimal getGroupId(com.onwbp.adaptation.Adaptation record) throws com.orchestranetworks.addon.mame.common.InvalidParameterException, com.orchestranetworks.schema.PathAccessExceptionGets the group id of the given record.- Parameters:
record- A record in business table- Returns:
- BigDecimal
The group id of the given record, or
nullwhen 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 occurrencecom.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 theStateof the given record.- Parameters:
record- A record in business table- Returns:
StateThe state of the given record- Throws:
com.orchestranetworks.addon.mame.common.InvalidParameterException- When given record is null or not a table occurrencecom.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.PathAccessExceptionChecks whether the given record is auto-created.- Parameters:
record- A record in business table- Returns:
- boolean
truewhen the given record is auto-created,falseotherwise - Throws:
com.orchestranetworks.addon.mame.common.InvalidParameterException- When given record is null or not a table occurrencecom.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.InvalidStateExceptionGets 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
nullwhen the given record has no target - Throws:
com.orchestranetworks.addon.mame.common.InvalidParameterException- When given record is null or not a table occurrencecom.orchestranetworks.addon.mame.common.InvalidStateException- When the target record does not exist in business tablecom.orchestranetworks.schema.PathAccessException- When the given record belong to the table which did not activate matching yet
-
-