public class OMEntityDao extends Object
| Modifier and Type | Field and Description |
|---|---|
protected OMRSRepositoryConnector |
enterpriseConnector |
protected List<String> |
supportedZones |
| Constructor and Description |
|---|
OMEntityDao(OMRSRepositoryConnector enterpriseConnector,
List<String> supportedZones,
AuditLog auditLog) |
| Modifier and Type | Method and Description |
|---|---|
InstanceProperties |
buildMatchingInstanceProperties(Map<String,String> properties,
boolean zoneRestricted)
Returns the properties object for the given pair of key - value that can be used for retrieving
|
List<EntityDetail> |
findEntities(InstanceProperties matchProperties,
String typeName,
int fromElement,
int pageSize)
Find entities matching criteria.
|
Boolean |
getEntityBooleanProperty(EntityDetail entity,
String name)
Get entity property of type boolean.
|
EntityDetail |
getEntityByGuid(String guid)
Helper function to fetch entity by GUID from repository.
|
int |
getEntityIntProperty(EntityDetail entity,
String name)
Get entity property of type integer.
|
String |
getEntityQName(EntityDetail entity)
Get qualified name property for the entity.
|
String |
getEntityStringProperty(EntityDetail entity,
String name)
Get entity property of type string.
|
InstanceProperties |
getMapProperty(InstanceProperties properties,
String name)
Get map of property from collection of instance properties.
|
List<Relationship> |
getRelationshipsByGUIDForEntity(EntityDetail entity,
String relationshipTypeGUID)
Get relationships of certain GUID for the entity.
|
List<Relationship> |
getRelationshipsForEntity(EntityDetail entity,
String relationshipType)
Get relationships of certain type for the entity.
|
String |
getStringProperty(String name,
InstanceProperties properties)
Get property of type string from collection of instance properties.
|
void |
setContext(String value)
Set context of the execution for logging.
|
protected final OMRSRepositoryConnector enterpriseConnector
public OMEntityDao(OMRSRepositoryConnector enterpriseConnector, List<String> supportedZones, AuditLog auditLog)
public void setContext(String value)
value - high level method/operation requested by user.public List<EntityDetail> findEntities(InstanceProperties matchProperties, String typeName, int fromElement, int pageSize) throws AnalyticsModelingCheckedException
matchProperties - filter.typeName - of the requested entity.fromElement - index of the first entity.pageSize - number of entities to return.AnalyticsModelingCheckedException - in case repository fails.public InstanceProperties buildMatchingInstanceProperties(Map<String,String> properties, boolean zoneRestricted)
properties - - all properties to use for matchingzoneRestricted - to take into account zones.public EntityDetail getEntityByGuid(String guid) throws AnalyticsModelingCheckedException
guid - of the entity to fetch.AnalyticsModelingCheckedException - if entity cannot be fetched: failed request to repository or entity not found.public List<Relationship> getRelationshipsForEntity(EntityDetail entity, String relationshipType) throws AnalyticsModelingCheckedException
entity - whose relationships are requested.relationshipType - only relationship of the type are requested. All relationships are returned if null.AnalyticsModelingCheckedException - in case of repository fails.public List<Relationship> getRelationshipsByGUIDForEntity(EntityDetail entity, String relationshipTypeGUID) throws AnalyticsModelingCheckedException
entity - whose relationships are requested.relationshipTypeGUID - only relationship of the type are requested. All relationships are returned if null.AnalyticsModelingCheckedException - in case of repository fails.public String getEntityQName(EntityDetail entity)
entity - whose qualified name is requested.public String getEntityStringProperty(EntityDetail entity, String name)
entity - whose property is requested.name - if the requested property.public Boolean getEntityBooleanProperty(EntityDetail entity, String name)
entity - whose property is requested.name - if the requested property.public int getEntityIntProperty(EntityDetail entity, String name)
entity - whose property is requested.name - if the requested property.public String getStringProperty(String name, InstanceProperties properties)
name - if the requested property.properties - collection of instance propertiespublic InstanceProperties getMapProperty(InstanceProperties properties, String name)
name - if the requested property.properties - collection of instance propertiesCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.