com.sas.metadata.remote.entities
Class MdOMAEntityUtility

com.sas.metadata.remote.entities.MdOMAEntityUtility

public class MdOMAEntityUtility

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:
com.sas.metadata.remote.entities

Field Summary
static java.lang.String AttributeDescriptorGetTemplate
          This is to get all the attribute descriptor related objects from OMR, given an attribute descriptor Property object.
static java.lang.String AttributeGroupGetTemplate
          This is to get all the attribute group related objects from OMR, given an attribute group PropertyGroup object.
static java.lang.String AttributeTypeGetTemplate
          This is to get all the attribute type related objects from OMR, given an attribute type PropertyType object.
static java.lang.String EntityAllGetTemplate
          This template is used to get all the entity related objects, given the entity property object.
static java.lang.String EntityObjectGetTemplate
          This is to get all the entity directly related objects from OMR, given an entity Property object.
static java.lang.String EntityStoreAllDeleteTemplate
           
static java.lang.String EntityStoreAllDeleteTemplate2
           
 
Constructor Summary
MdOMAEntityUtility()
           
 
Method Summary
static void clearPropertyTypesForObjectRepository(Root sourceObject)
           
static void copyEntityToNewObject(Root sourceObject, Root targetObject)
          This method takes a source metadata object and creates the metadata for an entity from that object for a target object.
static void deleteObjectFromStore(Property entityProp, java.lang.String template)
          Removes the entity from usage and delete it from OMR at next updateMetadataAll() call.
static Property getEntityPropertyForOMRObject(Root omrObject)
          Given an OMR Metadata object, retrieve the Property object that represents the Entity associated with the given OMR object.
static PropertyType getGenericPropertyType(Root sourceObject)
          Get the generic String PropertyType used for all Properties who have string values.
static java.util.List getPropertyTypesForObjectRepository(Root sourceObject)
          Get the PropertyType objects for the repository sourceObject is in.
static java.util.List getPropertyTypesForObjectRepositoryIDList(Root inObject)
          Get the PropertyType object ids for the repository that inobject is in.
static void populateEntityAttributeDescriptorfromOMRProperty(com.sas.entities.AttributeDescriptorInterface attrDesc, Property propObject)
          Populate an Entity AttributeDescriptor from an OMR Property
protected static void populateEntityAttributeDescriptorfromOMRProperty(com.sas.entities.AttributeDescriptorInterface attrDesc, Property propObject, boolean goToServer)
          Populate an Entity AttributeDescriptor from an OMR Property
static void populateEntityAttributeTypeFromOMRPropertyType(com.sas.entities.AttributeTypeInterface attrType, PropertyType propType)
          Populate an Entity AttributeType from an OMR PropertyType
protected static void populateEntityAttributeTypeFromOMRPropertyType(com.sas.entities.AttributeTypeInterface attrType, PropertyType propType, boolean goToServer)
          Populate an Entity AttributeType from an OMR PropertyType
static void populateEntityFromOMRObject(com.sas.entities.RemoteEntityInterface entity, Root omrObject)
          Take an existing entity object and populate it from metadata object.
static void populateEntityFromOMRProperty(com.sas.entities.RemoteEntityInterface entity, Property propObject)
          populate an entity from the omr Property object that represents that entity.
static void populateEntityGroupfromOMRGroup(com.sas.entities.AttributeGroupInterface group, PropertyGroup omrGroup)
          Populate an Entity AttributeGroup from an OMR PropertyGroup
protected static void populateEntityGroupfromOMRGroup(com.sas.entities.AttributeGroupInterface group, PropertyGroup omrGroup, boolean goToServer)
          Populate an Entity AttributeGroup from an OMR PropertyGroup
static void populateOMRObjectFromEntity(Root omrObject, com.sas.entities.RemoteEntityInterface entity)
          Take an metadata object and populate it with the entity information.
static void populateOMRPropertyFromAttributeDescriptor(Property propAttr, com.sas.entities.AttributeDescriptorInterface attrDesc)
          Populate an OMR Property from and Entity Attribute Descriptor
static void populateOMRPropertyFromEntity(Property entityProp, com.sas.entities.RemoteEntityInterface entity)
          Take an metadata object and populate it with the entity information.
static void populateOMRPropertyGroupFromAttributeGroup(PropertyGroup propGroup, com.sas.entities.AttributeGroupInterface attrGroup)
          Populate an OMR PropertyGroup from an Entity Attribute Group.
static void populateOMRPropertyTypeFromAttributeType(PropertyType propType, com.sas.entities.AttributeTypeInterface attrType)
          Populate an OMR PropertyType from an Entity AttributeType
static void removeEntityFromOMR(Root omrObject)
          Given an OMR Metadata object, remove the Property object(s) that represents the Entity associated with the given OMR object.
static void removeEntityPropertyObjectFromOMR(Property omrProperty)
          Remoe an entity property object and all connected objects from OMR.
 

Field Detail

EntityAllGetTemplate

public static final java.lang.String EntityAllGetTemplate
This template is used to get all the entity related objects, given the entity property object.

See Also:
Constant Field Values

EntityStoreAllDeleteTemplate

public static final java.lang.String EntityStoreAllDeleteTemplate
See Also:
Constant Field Values

EntityStoreAllDeleteTemplate2

public static final java.lang.String EntityStoreAllDeleteTemplate2
See Also:
Constant Field Values

AttributeDescriptorGetTemplate

public static final java.lang.String AttributeDescriptorGetTemplate
This is to get all the attribute descriptor related objects from OMR, given an attribute descriptor Property object.

See Also:
Constant Field Values

AttributeGroupGetTemplate

public static final java.lang.String AttributeGroupGetTemplate
This is to get all the attribute group related objects from OMR, given an attribute group PropertyGroup object.

See Also:
Constant Field Values

AttributeTypeGetTemplate

public static final java.lang.String AttributeTypeGetTemplate
This is to get all the attribute type related objects from OMR, given an attribute type PropertyType object.

See Also:
Constant Field Values

EntityObjectGetTemplate

public static final java.lang.String EntityObjectGetTemplate
This is to get all the entity directly related objects from OMR, given an entity Property object.

See Also:
Constant Field Values
Constructor Detail

MdOMAEntityUtility

public MdOMAEntityUtility()
Method Detail

populateEntityFromOMRObject

public static void populateEntityFromOMRObject(com.sas.entities.RemoteEntityInterface entity,
                                               Root omrObject)
                                        throws MdException,
                                               java.rmi.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
java.rmi.RemoteException

populateEntityFromOMRProperty

public static void populateEntityFromOMRProperty(com.sas.entities.RemoteEntityInterface entity,
                                                 Property propObject)
                                          throws MdException,
                                                 java.rmi.RemoteException
populate an entity from the omr Property object that represents that entity.

Parameters:
entity -
propObject -
Throws:
MdException
java.rmi.RemoteException

populateEntityGroupfromOMRGroup

public static void populateEntityGroupfromOMRGroup(com.sas.entities.AttributeGroupInterface group,
                                                   PropertyGroup omrGroup)
                                            throws MdException,
                                                   java.rmi.RemoteException
Populate an Entity AttributeGroup from an OMR PropertyGroup

Parameters:
group -
omrGroup -
Throws:
MdException
java.rmi.RemoteException

populateEntityGroupfromOMRGroup

protected static void populateEntityGroupfromOMRGroup(com.sas.entities.AttributeGroupInterface group,
                                                      PropertyGroup omrGroup,
                                                      boolean goToServer)
                                               throws MdException,
                                                      java.rmi.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
java.rmi.RemoteException

populateEntityAttributeDescriptorfromOMRProperty

public static void populateEntityAttributeDescriptorfromOMRProperty(com.sas.entities.AttributeDescriptorInterface attrDesc,
                                                                    Property propObject)
                                                             throws MdException,
                                                                    java.rmi.RemoteException
Populate an Entity AttributeDescriptor from an OMR Property

Parameters:
attrDesc -
propObject -
Throws:
MdException
java.rmi.RemoteException

populateEntityAttributeDescriptorfromOMRProperty

protected static void populateEntityAttributeDescriptorfromOMRProperty(com.sas.entities.AttributeDescriptorInterface attrDesc,
                                                                       Property propObject,
                                                                       boolean goToServer)
                                                                throws MdException,
                                                                       java.rmi.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
java.rmi.RemoteException

populateEntityAttributeTypeFromOMRPropertyType

public static void populateEntityAttributeTypeFromOMRPropertyType(com.sas.entities.AttributeTypeInterface attrType,
                                                                  PropertyType propType)
                                                           throws MdException,
                                                                  java.rmi.RemoteException
Populate an Entity AttributeType from an OMR PropertyType

Parameters:
attrType -
propType -
Throws:
MdException
java.rmi.RemoteException

populateEntityAttributeTypeFromOMRPropertyType

protected static void populateEntityAttributeTypeFromOMRPropertyType(com.sas.entities.AttributeTypeInterface attrType,
                                                                     PropertyType propType,
                                                                     boolean goToServer)
                                                              throws MdException,
                                                                     java.rmi.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
java.rmi.RemoteException

populateOMRPropertyFromEntity

public static void populateOMRPropertyFromEntity(Property entityProp,
                                                 com.sas.entities.RemoteEntityInterface entity)
                                          throws MdException,
                                                 java.rmi.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
java.rmi.RemoteException

populateOMRPropertyGroupFromAttributeGroup

public static void populateOMRPropertyGroupFromAttributeGroup(PropertyGroup propGroup,
                                                              com.sas.entities.AttributeGroupInterface attrGroup)
                                                       throws MdException,
                                                              java.rmi.RemoteException
Populate an OMR PropertyGroup from an Entity Attribute Group.

Parameters:
propGroup -
attrGroup -
Throws:
MdException
java.rmi.RemoteException

populateOMRPropertyFromAttributeDescriptor

public static void populateOMRPropertyFromAttributeDescriptor(Property propAttr,
                                                              com.sas.entities.AttributeDescriptorInterface attrDesc)
                                                       throws MdException,
                                                              java.rmi.RemoteException
Populate an OMR Property from and Entity Attribute Descriptor

Parameters:
propAttr -
attrDesc -
Throws:
MdException
java.rmi.RemoteException

populateOMRPropertyTypeFromAttributeType

public static void populateOMRPropertyTypeFromAttributeType(PropertyType propType,
                                                            com.sas.entities.AttributeTypeInterface attrType)
                                                     throws MdException,
                                                            java.rmi.RemoteException
Populate an OMR PropertyType from an Entity AttributeType

Parameters:
propType -
attrType -
Throws:
MdException
java.rmi.RemoteException

populateOMRObjectFromEntity

public static void populateOMRObjectFromEntity(Root omrObject,
                                               com.sas.entities.RemoteEntityInterface entity)
                                        throws MdException,
                                               java.rmi.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 OMR
java.rmi.RemoteException

getEntityPropertyForOMRObject

public static Property getEntityPropertyForOMRObject(Root omrObject)
                                              throws MdException,
                                                     java.rmi.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
java.rmi.RemoteException

removeEntityFromOMR

public static void removeEntityFromOMR(Root omrObject)
                                throws MdException,
                                       java.rmi.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
java.rmi.RemoteException

removeEntityPropertyObjectFromOMR

public static void removeEntityPropertyObjectFromOMR(Property omrProperty)
                                              throws MdException,
                                                     java.rmi.RemoteException
Remoe an entity property object and all connected objects from OMR.

Parameters:
omrProperty -
Throws:
MdException
java.rmi.RemoteException

deleteObjectFromStore

public static void deleteObjectFromStore(Property entityProp,
                                         java.lang.String template)
                                  throws MdException,
                                         java.rmi.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
java.rmi.RemoteException

copyEntityToNewObject

public static void copyEntityToNewObject(Root sourceObject,
                                         Root targetObject)
                                  throws MdException,
                                         java.rmi.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
java.rmi.RemoteException

clearPropertyTypesForObjectRepository

public static void clearPropertyTypesForObjectRepository(Root sourceObject)
                                                  throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

getPropertyTypesForObjectRepository

public static java.util.List getPropertyTypesForObjectRepository(Root sourceObject)
                                                          throws MdException,
                                                                 java.rmi.RemoteException
Get the PropertyType objects for the repository sourceObject is in.

Parameters:
sourceObject -
Returns:
List
Throws:
MdException
java.rmi.RemoteException

getPropertyTypesForObjectRepositoryIDList

public static java.util.List getPropertyTypesForObjectRepositoryIDList(Root inObject)
                                                                throws MdException,
                                                                       java.rmi.RemoteException
Get the PropertyType object ids for the repository that inobject is in.

Parameters:
inObject -
Returns:
List
Throws:
MdException
java.rmi.RemoteException

getGenericPropertyType

public static PropertyType getGenericPropertyType(Root sourceObject)
                                           throws MdException,
                                                  java.rmi.RemoteException
Get the generic String PropertyType used for all Properties who have string values.

Parameters:
sourceObject -
Returns:
PropertyType
Throws:
MdException
java.rmi.RemoteException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.