Class MdOMAEntityUtility

java.lang.Object
com.sas.metadata.remote.entities.MdOMAEntityUtility

public class MdOMAEntityUtility extends Object
This class is used for the persistence/serialization of entities to OMR.

Usage

enclosing_type usage is decribed as:

Behavior

Extending

Dependencies

Since:
9.1
See Also:
  • Field Details

    • EntityAllGetTemplate

      public static final String EntityAllGetTemplate
      This template is used to get all the entity related objects, given the entity property object.
      See Also:
    • EntityStoreAllDeleteTemplate

      public static final String EntityStoreAllDeleteTemplate
      See Also:
    • EntityStoreAllDeleteTemplate2

      public static final String EntityStoreAllDeleteTemplate2
      See Also:
    • AttributeDescriptorGetTemplate

      public static final String AttributeDescriptorGetTemplate
      This is to get all the attribute descriptor related objects from OMR, given an attribute descriptor Property object.
      See Also:
    • AttributeGroupGetTemplate

      public static final String AttributeGroupGetTemplate
      This is to get all the attribute group related objects from OMR, given an attribute group PropertyGroup object.
      See Also:
    • AttributeTypeGetTemplate

      public static final String AttributeTypeGetTemplate
      This is to get all the attribute type related objects from OMR, given an attribute type PropertyType object.
      See Also:
    • EntityObjectGetTemplate

      public static final String EntityObjectGetTemplate
      This is to get all the entity directly related objects from OMR, given an entity Property object.
      See Also:
  • Constructor Details

    • MdOMAEntityUtility

      public MdOMAEntityUtility()
  • Method Details

    • populateEntityFromOMRObject

      public static void populateEntityFromOMRObject(com.sas.entities.RemoteEntityInterface entity, Root omrObject) throws MdException, RemoteException
      Take an existing entity object and populate it from metadata object.
      Parameters:
      entity - The entity object to populate
      omrObject - the object to get the entity information from.
      Throws:
      MdException - if any errors retrieveing or setting the data from OMR
      RemoteException
    • populateEntityFromOMRProperty

      public static void populateEntityFromOMRProperty(com.sas.entities.RemoteEntityInterface entity, Property propObject) throws MdException, RemoteException
      populate an entity from the omr Property object that represents that entity.
      Parameters:
      entity -
      propObject -
      Throws:
      MdException
      RemoteException
    • populateEntityGroupfromOMRGroup

      public static void populateEntityGroupfromOMRGroup(com.sas.entities.AttributeGroupInterface group, PropertyGroup omrGroup) throws MdException, RemoteException
      Populate an Entity AttributeGroup from an OMR PropertyGroup
      Parameters:
      group -
      omrGroup -
      Throws:
      MdException
      RemoteException
    • populateEntityGroupfromOMRGroup

      protected static void populateEntityGroupfromOMRGroup(com.sas.entities.AttributeGroupInterface group, PropertyGroup omrGroup, boolean goToServer) throws MdException, RemoteException
      Populate an Entity AttributeGroup from an OMR PropertyGroup
      Parameters:
      group -
      omrGroup -
      goToServer - Determines whether or not to go to the server to get the PropertyGroup object. Default is true.
      Throws:
      MdException
      RemoteException
    • populateEntityAttributeDescriptorfromOMRProperty

      public static void populateEntityAttributeDescriptorfromOMRProperty(com.sas.entities.AttributeDescriptorInterface attrDesc, Property propObject) throws MdException, RemoteException
      Populate an Entity AttributeDescriptor from an OMR Property
      Parameters:
      attrDesc -
      propObject -
      Throws:
      MdException
      RemoteException
    • populateEntityAttributeDescriptorfromOMRProperty

      protected static void populateEntityAttributeDescriptorfromOMRProperty(com.sas.entities.AttributeDescriptorInterface attrDesc, Property propObject, boolean goToServer) throws MdException, RemoteException
      Populate an Entity AttributeDescriptor from an OMR Property
      Parameters:
      attrDesc -
      propObject -
      goToServer - Determines whether or not to go to the server to get the Property object. Default is true.
      Throws:
      MdException
      RemoteException
    • populateEntityAttributeTypeFromOMRPropertyType

      public static void populateEntityAttributeTypeFromOMRPropertyType(com.sas.entities.AttributeTypeInterface attrType, PropertyType propType) throws MdException, RemoteException
      Populate an Entity AttributeType from an OMR PropertyType
      Parameters:
      attrType -
      propType -
      Throws:
      MdException
      RemoteException
    • populateEntityAttributeTypeFromOMRPropertyType

      protected static void populateEntityAttributeTypeFromOMRPropertyType(com.sas.entities.AttributeTypeInterface attrType, PropertyType propType, boolean goToServer) throws MdException, RemoteException
      Populate an Entity AttributeType from an OMR PropertyType
      Parameters:
      attrType -
      propType -
      goToServer - Determines whether or not to go to the server to get the PropertyType object. Default is true.
      Throws:
      MdException
      RemoteException
    • populateOMRPropertyFromEntity

      public static void populateOMRPropertyFromEntity(Property entityProp, com.sas.entities.RemoteEntityInterface entity) throws MdException, RemoteException
      Take an metadata object and populate it with the entity information.
      Parameters:
      entity - The entity object get data from
      omrObject - the object populate with the entity's information
      Throws:
      MdException - if any errors retrieveing or setting the data from OR
      RemoteException
    • populateOMRPropertyGroupFromAttributeGroup

      public static void populateOMRPropertyGroupFromAttributeGroup(PropertyGroup propGroup, com.sas.entities.AttributeGroupInterface attrGroup) throws MdException, RemoteException
      Populate an OMR PropertyGroup from an Entity Attribute Group.
      Parameters:
      propGroup -
      attrGroup -
      Throws:
      MdException
      RemoteException
    • populateOMRPropertyFromAttributeDescriptor

      public static void populateOMRPropertyFromAttributeDescriptor(Property propAttr, com.sas.entities.AttributeDescriptorInterface attrDesc) throws MdException, RemoteException
      Populate an OMR Property from and Entity Attribute Descriptor
      Parameters:
      propAttr -
      attrDesc -
      Throws:
      MdException
      RemoteException
    • populateOMRPropertyTypeFromAttributeType

      public static void populateOMRPropertyTypeFromAttributeType(PropertyType propType, com.sas.entities.AttributeTypeInterface attrType) throws MdException, RemoteException
      Populate an OMR PropertyType from an Entity AttributeType
      Parameters:
      propType -
      attrType -
      Throws:
      MdException
      RemoteException
    • populateOMRObjectFromEntity

      public static void populateOMRObjectFromEntity(Root omrObject, com.sas.entities.RemoteEntityInterface entity) throws MdException, RemoteException
      Take an metadata object and populate it with the entity information.
      Parameters:
      omrObject - the object populate with the entity's information
      entity - The entity object get data from
      Throws:
      MdException - if any errors retrieveing or setting the data from OMR
      RemoteException
    • getEntityPropertyForOMRObject

      public static Property getEntityPropertyForOMRObject(Root omrObject) throws MdException, RemoteException
      Given an OMR Metadata object, retrieve the Property object that represents the Entity associated with the given OMR object.
      Parameters:
      omrObject - the object to get the entity information from, null if not found.
      Throws:
      MdException - if any errors retrieveing or setting the data from OMR
      RemoteException
    • removeEntityFromOMR

      public static void removeEntityFromOMR(Root omrObject) throws MdException, RemoteException
      Given an OMR Metadata object, remove the Property object(s) that represents the Entity associated with the given OMR object.
      Parameters:
      omrObject - the object to get the entity information from.
      Throws:
      MdException - if any errors retrieveing or removing the data from OMR
      RemoteException
    • removeEntityPropertyObjectFromOMR

      public static void removeEntityPropertyObjectFromOMR(Property omrProperty) throws MdException, RemoteException
      Remoe an entity property object and all connected objects from OMR.
      Parameters:
      omrProperty -
      Throws:
      MdException
      RemoteException
    • deleteObjectFromStore

      public static void deleteObjectFromStore(Property entityProp, String template) throws MdException, RemoteException
      Removes the entity from usage and delete it from OMR at next updateMetadataAll() call.
      Parameters:
      entityProp - The property object that represents the entity.
      Throws:
      MdException
      RemoteException
    • copyEntityToNewObject

      public static void copyEntityToNewObject(Root sourceObject, Root targetObject) throws MdException, RemoteException
      This method takes a source metadata object and creates the metadata for an entity from that object for a target object.
      Parameters:
      sourceObject - Object to get entity information from
      targetObject - object to populate with entity information.
      Throws:
      MdException
      RemoteException
    • clearPropertyTypesForObjectRepository

      public static void clearPropertyTypesForObjectRepository(Root sourceObject) throws RemoteException
      Throws:
      RemoteException
    • getPropertyTypesForObjectRepository

      public static List getPropertyTypesForObjectRepository(Root sourceObject) throws MdException, RemoteException
      Get the PropertyType objects for the repository sourceObject is in.
      Parameters:
      sourceObject -
      Returns:
      List
      Throws:
      MdException
      RemoteException
    • getPropertyTypesForObjectRepositoryIDList

      public static List getPropertyTypesForObjectRepositoryIDList(Root inObject) throws MdException, RemoteException
      Get the PropertyType object ids for the repository that inobject is in.
      Parameters:
      inObject -
      Returns:
      List
      Throws:
      MdException
      RemoteException
    • getGenericPropertyType

      public static PropertyType getGenericPropertyType(Root sourceObject) throws MdException, RemoteException
      Get the generic String PropertyType used for all Properties who have string values.
      Parameters:
      sourceObject -
      Returns:
      PropertyType
      Throws:
      MdException
      RemoteException