public class OMEntityDao extends Object
| Constructor and Description |
|---|
OMEntityDao(OMRSRepositoryConnector enterpriseConnector,
List<String> supportedZones,
OMRSAuditLog auditLog) |
| Modifier and Type | Method and Description |
|---|---|
EntityDetail |
addEntity(String typeName,
String qualifiedName,
InstanceProperties properties,
boolean zoneRestricted)
Returns the entity of the given type with the specified qualified name; if it doesn't already exists, it is created with the provided instance properties
|
EntityDetail |
addEntity(String typeName,
String qualifiedName,
InstanceProperties properties,
List<Classification> classifications,
boolean zoneRestricted)
Returns the entity of the given type with the specified qualified name; if it doesn't already exists, it is created with the provided instance properties
|
Relationship |
addRelationship(String relationshipType,
String guid1,
String guid2,
InstanceProperties instanceProperties)
Returns the relationship of the given type with the specified qualified name; if it doesn't already exists, it is created with the provided instance properties
|
Classification |
buildClassification(String classificationTypeName,
String entityTypeName,
InstanceProperties classificationProperties) |
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
|
OMEntityWrapper |
createOrUpdateEntity(String typeName,
String qualifiedName,
InstanceProperties properties,
List<Classification> classifications,
boolean update,
boolean zoneRestricted) |
List<EntityDetail> |
findEntities(InstanceProperties matchProperties,
String typeName,
int fromElement,
int pageSize) |
EntityDetail |
getEntity(String typeName,
String qualifiedName,
boolean zoneRestricted)
Returns the entity of the specified type retrieved based on qualified name
|
EntityDetail |
getEntityByGuid(String guid) |
List<Relationship> |
getRelationships(String relationshipType,
String guid2) |
void |
purgeEntity(EntitySummary entitySummary) |
void |
purgeRelationship(Relationship relationship) |
public OMEntityDao(OMRSRepositoryConnector enterpriseConnector, List<String> supportedZones, OMRSAuditLog auditLog)
public EntityDetail getEntity(String typeName, String qualifiedName, boolean zoneRestricted) throws PagingErrorException, UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException
typeName - name of the type def for the entity to be retrievedqualifiedName - qualified name property of the entity to be retrievedzoneRestricted - PagingErrorExceptionUserNotAuthorizedExceptionFunctionNotSupportedExceptionInvalidParameterExceptionRepositoryErrorExceptionPropertyErrorExceptionTypeErrorExceptionpublic List<EntityDetail> findEntities(InstanceProperties matchProperties, String typeName, int fromElement, int pageSize) throws PagingErrorException, UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException
public EntityDetail getEntityByGuid(String guid) throws RepositoryErrorException, UserNotAuthorizedException, EntityProxyOnlyException, InvalidParameterException, EntityNotKnownException
public List<Relationship> getRelationships(String relationshipType, String guid2)
public EntityDetail addEntity(String typeName, String qualifiedName, InstanceProperties properties, boolean zoneRestricted) throws InvalidParameterException, PropertyErrorException, RepositoryErrorException, EntityNotKnownException, FunctionNotSupportedException, PagingErrorException, ClassificationErrorException, UserNotAuthorizedException, TypeErrorException, StatusNotSupportedException
typeName - is the entity typequalifiedName - - qualified name property of the entity, unique for the same entity typeproperties - specific to the entity typeInvalidParameterExceptionPropertyErrorExceptionRepositoryErrorExceptionEntityNotKnownExceptionFunctionNotSupportedExceptionPagingErrorExceptionClassificationErrorExceptionUserNotAuthorizedExceptionTypeErrorExceptionStatusNotSupportedExceptionpublic EntityDetail addEntity(String typeName, String qualifiedName, InstanceProperties properties, List<Classification> classifications, boolean zoneRestricted) throws InvalidParameterException, StatusNotSupportedException, PropertyErrorException, EntityNotKnownException, TypeErrorException, FunctionNotSupportedException, PagingErrorException, ClassificationErrorException, UserNotAuthorizedException, RepositoryErrorException
typeName - is the entity typequalifiedName - - qualified name property of the entity, unique for the same entity typeproperties - specific to the entity typeclassifications - classifications to be added to entityzoneRestricted - InvalidParameterExceptionStatusNotSupportedExceptionPropertyErrorExceptionEntityNotKnownExceptionTypeErrorExceptionFunctionNotSupportedExceptionPagingErrorExceptionClassificationErrorExceptionUserNotAuthorizedExceptionRepositoryErrorExceptionpublic OMEntityWrapper createOrUpdateEntity(String typeName, String qualifiedName, InstanceProperties properties, List<Classification> classifications, boolean update, boolean zoneRestricted) throws UserNotAuthorizedException, FunctionNotSupportedException, InvalidParameterException, RepositoryErrorException, PropertyErrorException, TypeErrorException, PagingErrorException, ClassificationErrorException, StatusNotSupportedException, EntityNotKnownException
public Relationship addRelationship(String relationshipType, String guid1, String guid2, InstanceProperties instanceProperties) throws InvalidParameterException, TypeErrorException, PropertyErrorException, EntityNotKnownException, FunctionNotSupportedException, PagingErrorException, UserNotAuthorizedException, RepositoryErrorException, StatusNotSupportedException
relationshipType - is the relationship type nameguid1 - first end of the relationshipguid2 - second end of the relationshipinstanceProperties - specific to the relationship typeInvalidParameterExceptionTypeErrorExceptionPropertyErrorExceptionEntityNotKnownExceptionFunctionNotSupportedExceptionPagingErrorExceptionUserNotAuthorizedExceptionRepositoryErrorExceptionStatusNotSupportedExceptionpublic InstanceProperties buildMatchingInstanceProperties(Map<String,String> properties, boolean zoneRestricted)
properties - - all properties to use for matchingzoneRestricted - public Classification buildClassification(String classificationTypeName, String entityTypeName, InstanceProperties classificationProperties) throws TypeErrorException
TypeErrorExceptionpublic void purgeRelationship(Relationship relationship) throws RepositoryErrorException, UserNotAuthorizedException, InvalidParameterException, RelationshipNotDeletedException, RelationshipNotKnownException, FunctionNotSupportedException
public void purgeEntity(EntitySummary entitySummary) throws RepositoryErrorException, UserNotAuthorizedException, InvalidParameterException, EntityNotKnownException, EntityNotDeletedException, FunctionNotSupportedException
Copyright © 2018–2020 ODPi. All rights reserved.