Package com.sas.metadata.remote.entities
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThis is to get all the attribute descriptor related objects from OMR, given an attribute descriptor Property object.static final StringThis is to get all the attribute group related objects from OMR, given an attribute group PropertyGroup object.static final StringThis is to get all the attribute type related objects from OMR, given an attribute type PropertyType object.static final StringThis template is used to get all the entity related objects, given the entity property object.static final StringThis is to get all the entity directly related objects from OMR, given an entity Property object.static final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearPropertyTypesForObjectRepository(Root sourceObject) static voidcopyEntityToNewObject(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 voiddeleteObjectFromStore(Property entityProp, String template) Removes the entity from usage and delete it from OMR at next updateMetadataAll() call.static PropertygetEntityPropertyForOMRObject(Root omrObject) Given an OMR Metadata object, retrieve the Property object that represents the Entity associated with the given OMR object.static PropertyTypegetGenericPropertyType(Root sourceObject) Get the generic String PropertyType used for all Properties who have string values.static ListgetPropertyTypesForObjectRepository(Root sourceObject) Get the PropertyType objects for the repositorysourceObjectis in.static ListGet the PropertyType object ids for the repository thatinobjectis in.static voidpopulateEntityAttributeDescriptorfromOMRProperty(com.sas.entities.AttributeDescriptorInterface attrDesc, Property propObject) Populate an Entity AttributeDescriptor from an OMR Propertyprotected static voidpopulateEntityAttributeDescriptorfromOMRProperty(com.sas.entities.AttributeDescriptorInterface attrDesc, Property propObject, boolean goToServer) Populate an Entity AttributeDescriptor from an OMR Propertystatic voidpopulateEntityAttributeTypeFromOMRPropertyType(com.sas.entities.AttributeTypeInterface attrType, PropertyType propType) Populate an Entity AttributeType from an OMR PropertyTypeprotected static voidpopulateEntityAttributeTypeFromOMRPropertyType(com.sas.entities.AttributeTypeInterface attrType, PropertyType propType, boolean goToServer) Populate an Entity AttributeType from an OMR PropertyTypestatic voidpopulateEntityFromOMRObject(com.sas.entities.RemoteEntityInterface entity, Root omrObject) Take an existing entity object and populate it from metadata object.static voidpopulateEntityFromOMRProperty(com.sas.entities.RemoteEntityInterface entity, Property propObject) populate an entity from the omr Property object that represents that entity.static voidpopulateEntityGroupfromOMRGroup(com.sas.entities.AttributeGroupInterface group, PropertyGroup omrGroup) Populate an Entity AttributeGroup from an OMR PropertyGroupprotected static voidpopulateEntityGroupfromOMRGroup(com.sas.entities.AttributeGroupInterface group, PropertyGroup omrGroup, boolean goToServer) Populate an Entity AttributeGroup from an OMR PropertyGroupstatic voidpopulateOMRObjectFromEntity(Root omrObject, com.sas.entities.RemoteEntityInterface entity) Take an metadata object and populate it with the entity information.static voidpopulateOMRPropertyFromAttributeDescriptor(Property propAttr, com.sas.entities.AttributeDescriptorInterface attrDesc) Populate an OMR Property from and Entity Attribute Descriptorstatic voidpopulateOMRPropertyFromEntity(Property entityProp, com.sas.entities.RemoteEntityInterface entity) Take an metadata object and populate it with the entity information.static voidpopulateOMRPropertyGroupFromAttributeGroup(PropertyGroup propGroup, com.sas.entities.AttributeGroupInterface attrGroup) Populate an OMR PropertyGroup from an Entity Attribute Group.static voidpopulateOMRPropertyTypeFromAttributeType(PropertyType propType, com.sas.entities.AttributeTypeInterface attrType) Populate an OMR PropertyType from an Entity AttributeTypestatic voidremoveEntityFromOMR(Root omrObject) Given an OMR Metadata object, remove the Property object(s) that represents the Entity associated with the given OMR object.static voidremoveEntityPropertyObjectFromOMR(Property omrProperty) Remoe an entity property object and all connected objects from OMR.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
EntityAllGetTemplate
public static final String EntityAllGetTemplateThis 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 AttributeDescriptorGetTemplateThis is to get all the attribute descriptor related objects from OMR, given an attribute descriptor Property object.- See Also:
-
AttributeGroupGetTemplate
public static final String AttributeGroupGetTemplateThis is to get all the attribute group related objects from OMR, given an attribute group PropertyGroup object.- See Also:
-
AttributeTypeGetTemplate
public static final String AttributeTypeGetTemplateThis is to get all the attribute type related objects from OMR, given an attribute type PropertyType object.- See Also:
-
EntityObjectGetTemplate
public static final String EntityObjectGetTemplateThis 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 populateomrObject- the object to get the entity information from.- Throws:
MdException- if any errors retrieveing or setting the data from OMRRemoteException
-
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:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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 fromomrObject- the object populate with the entity's information- Throws:
MdException- if any errors retrieveing or setting the data from ORRemoteException
-
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:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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 informationentity- The entity object get data from- Throws:
MdException- if any errors retrieveing or setting the data from OMRRemoteException
-
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 OMRRemoteException
-
removeEntityFromOMR
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 OMRRemoteException
-
removeEntityPropertyObjectFromOMR
public static void removeEntityPropertyObjectFromOMR(Property omrProperty) throws MdException, RemoteException Remoe an entity property object and all connected objects from OMR.- Parameters:
omrProperty-- Throws:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-
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 fromtargetObject- object to populate with entity information.- Throws:
MdExceptionRemoteException
-
clearPropertyTypesForObjectRepository
- Throws:
RemoteException
-
getPropertyTypesForObjectRepository
public static List getPropertyTypesForObjectRepository(Root sourceObject) throws MdException, RemoteException Get the PropertyType objects for the repositorysourceObjectis in.- Parameters:
sourceObject-- Returns:
- List
- Throws:
MdExceptionRemoteException
-
getPropertyTypesForObjectRepositoryIDList
public static List getPropertyTypesForObjectRepositoryIDList(Root inObject) throws MdException, RemoteException Get the PropertyType object ids for the repository thatinobjectis in.- Parameters:
inObject-- Returns:
- List
- Throws:
MdExceptionRemoteException
-
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:
MdExceptionRemoteException
-