Class CruxOMRSRepositoryConnector
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.Connector
-
- org.odpi.openmetadata.frameworks.connectors.ConnectorBase
-
- org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
-
- org.odpi.egeria.connectors.juxt.crux.repositoryconnector.CruxOMRSRepositoryConnector
-
- All Implemented Interfaces:
org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent,org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSMetadataCollectionManager
public class CruxOMRSRepositoryConnector extends org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnectorProvides all connectivity and API-based interaction with a Crux back-end.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
auditLog, maxPageSize, metadataCollection, metadataCollectionId, metadataCollectionName, organizationName, repositoryHelper, repositoryName, repositoryValidator, serverName, serverType, serverUserId
-
-
Constructor Summary
Constructors Constructor Description CruxOMRSRepositoryConnector()Default constructor used by the OCF Connector Provider.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCreateEntityProxyStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entity)Retrieve the statements that need to be executed against Crux to create (persist) the entity proxy provided.voidaddCreateEntityStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)Retrieve the statements that need to be executed against Crux to create (persist) the entity provided.voidaddCreateRelationshipStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Retrieve the statements that need to be executed against Crux to create (persist) the relationship provided.voidaddPurgeEntityStatements(crux.api.tx.Transaction.Builder tx, String guid)Retrieve the statements that need to be executed against Crux to permanently delete the entity (and all of its history) from the Crux repository.voidaddPurgeRelationshipStatements(crux.api.tx.Transaction.Builder tx, String guid)Retrieve the statements that need to be executed against Crux to permanently delete the relationship (and all of its history) from the Crux repository.voidaddSaveReferenceCopyStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Retrieve the statements that need to be executed against Crux to save the provided relationship as a reference copy.voidaddUpdateEntityStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)Retrieve the statements that need to be executed against Crux to update (persist) the entity provided.voidaddUpdateRelationshipStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Retrieve the statements that need to be executed against Crux to update the provided relationship instance in the Crux repository.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailcreateEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)Create the provided entity instance in the Crux repository.voidcreateEntityProxy(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entity)Create the provided entity instance in the Crux repository.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshipcreateRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Create the provided relationship instance in the Crux repository.voiddisconnect()booleanequals(Object o)Default equality comparison.static voidevict(crux.api.tx.Transaction.Builder tx, String docRef)Add eviction of the specified docRef to the transaction (applicable for permanently removing anything by its "primary key").List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship>findActiveRelationshipsForEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity, String userId)Find all active (non-deleted) relationships in this repository for the provided entity.Collection<List<?>>findDirectNeighbors(crux.api.ICruxDatasource db, String entityGUID, List<String> entityTypeGUIDs, List<String> relationshipTypeGUIDs, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification)Find the immediate neighbors (1-degree separated entities and the relationships between) using the provided criteria.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail>findEntities(String entityTypeGUID, List<String> entitySubtypeGUIDs, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties matchProperties, int fromEntityElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId)Search based on the provided parameters.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail>findEntitiesByText(String entityTypeGUID, String searchCriteria, int fromEntityElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId)Search based on the provided parameters.Collection<List<?>>findEntityRelationships(crux.api.ICruxDatasource db, String entityGUID, String userId, boolean includeDeleted)Find the relationships that match the provided parameters.Collection<List<?>>findEntityRelationships(crux.api.ICruxDatasource db, String entityGUID, String relationshipTypeGUID, int fromRelationshipElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId)Find the relationships that match the provided parameters.Collection<List<?>>findHomedEntityRelationships(crux.api.ICruxDatasource db, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity, String userId)Find the relationships that match the provided parameters.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship>findHomedRelationshipsForEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity, String userId)Find all relationships homed in this repository for the provided entity.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraphfindNeighborhood(String entityGUID, List<String> entityTypeGUIDs, List<String> relationshipTypeGUIDs, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, int level, boolean includeRelationships)Find the entities and relationships that radiate out from the supplied entity GUID.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship>findRelationships(String relationshipTypeGUID, List<String> relationshipSubtypeGUIDs, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties matchProperties, int fromRelationshipElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId)Search based on the provided parameters.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship>findRelationshipsByText(String relationshipTypeGUID, String searchCriteria, int fromRelationshipElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId)Search based on the provided parameters.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship>findRelationshipsForEntity(String entityGUID, String relationshipTypeGUID, int fromRelationshipElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId)Find the relationships, limited by the specified criteria, for the provided entity.crux.api.ICruxAPIgetCruxAPI()Retrieve the Crux API directly.crux.api.CruxDocumentgetCruxObjectByReference(crux.api.ICruxDatasource db, String reference)Retrieve the requested reference's details from an already-open Crux repository.crux.api.CruxDocumentgetCruxObjectByReference(String reference)Retrieve the current version of the requested reference's details from the Crux repository.crux.api.CruxDocumentgetCruxObjectByReference(String reference, Date asOfTime)Retrieve the requested reference's details from the Crux repository.crux.api.CruxDocumentgetCruxObjectByReference(String reference, Map<clojure.lang.Keyword,?> txnDetails)Retrieve the requested reference's details from the Crux repository at the precise version indicated by the provided transaction details (as returned by an entity history call, must include the valid-time and tx-time).org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailgetEntity(String guid, Date asOfTime, boolean acceptProxies)Retrieve the requested entity from the Crux repository.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailgetEntityByGuid(crux.api.ICruxDatasource db, String guid)Retrieve the requested entity from the Crux repository.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxygetEntityProxy(String guid)Retrieve the requested entity, as a proxy, from the Crux repository.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntitySummarygetEntitySummary(String guid)Retrieve the requested entity from the Crux repository.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail>getPreviousVersionsOfEntity(String guid, Date from, Date to, int offset, int pageSize, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.HistorySequencingOrder order)Retrieve previous versions of the entity between the provided dates, ordered as requested.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship>getPreviousVersionsOfRelationship(String guid, Date from, Date to, int offset, int pageSize, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.HistorySequencingOrder order)Retrieve previous versions of the relationship between the provided dates, ordered as requested.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshipgetRelationship(String guid, Date asOfTime)Retrieve the requested relationship from the Crux repository.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraphgetTraversalsBetweenEntities(String startEntityGUID, String endEntityGUID, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime)Find all of the traversals that exist between the provided entities, based on the other provided criteria.inthashCode()Default hash calculation.booleanisDataStoreEmpty()Checks whether the data store is currently empty.voidlogProblem(String className, String methodName, CruxOMRSAuditCode code, Throwable cause, String... params)Log a problem with the connector, preferring the audit log so long as it is available and only falling back to debug-level logging if it is not.voidpurgeEntity(String guid)Permanently delete the entity (and all of its history) from the Crux repository.voidpurgeRelationship(String guid)Permanently delete the relationship (and all of its history) from the Crux repository.static voidput(crux.api.tx.Transaction.Builder tx, crux.api.CruxDocument cruxDoc)Add a write operation to the transaction (applicable for any write operation, since it is append-only).org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailrestorePreviousVersionOfEntity(String userId, String guid)Restore the previous version of the provided entity, and return the restored version (or null if there was no previous version and hence no restoration).org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshiprestorePreviousVersionOfRelationship(String userId, String guid)Restore the previous version of the provided relationship, and return the restored version (or null if there was no previous version and hence no restoration).crux.api.TransactionInstantrunTx(crux.api.tx.Transaction statements)Run multiple statements through Crux as a single transaction.voidsaveReferenceCopy(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)Save the provided entity as a reference copy.Collection<List<?>>searchCrux(crux.api.ICruxDatasource db, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, List<String> subtypeGuids, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties matchProperties, int fromElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String namespace, String userId)Search Crux based on the provided parameters, using an already-opened point-in-time view of the database (should work across both Entities and Relationships).Collection<List<?>>searchCrux(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, List<String> subtypeGuids, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties matchProperties, int fromElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String namespace, String userId)Search Crux based on the provided parameters (should work across both Entities and Relationships).Collection<List<?>>searchCruxText(crux.api.ICruxDatasource db, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, String searchCriteria, int fromElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String namespace, String userId)Search all text properties in Crux based on the provided parameters, using an already-opened point-in-time view of the database (should work across both Entities and Relationships).Collection<List<?>>searchCruxText(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, String searchCriteria, int fromElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String namespace, String userId)Search all text properties in Crux based on the provided parameters (should work across both Entities and Relationships).voidsetMetadataCollectionId(String metadataCollectionId)voidstart()org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetailupdateEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)Update the provided entity instance in the Crux repository.org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.RelationshipupdateRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Update the provided relationship instance in the Crux repository.-
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
getMaxPageSize, getMetadataCollection, getMetadataCollectionId, getMetadataCollectionName, getOrganizationName, getRepositoryHelper, getRepositoryName, getRepositoryValidator, getServerName, getServerType, getServerUserId, setAuditLog, setMaxPageSize, setMetadataCollectionName, setOrganizationName, setRepositoryHelper, setRepositoryName, setRepositoryValidator, setServerName, setServerType, setServerUserId, validateRepositoryIsActive
-
-
-
-
Method Detail
-
setMetadataCollectionId
public void setMetadataCollectionId(String metadataCollectionId)
- Specified by:
setMetadataCollectionIdin interfaceorg.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSMetadataCollectionManager- Overrides:
setMetadataCollectionIdin classorg.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryConnector
-
start
public void start() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- Overrides:
startin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
-
disconnect
public void disconnect() throws org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException- Overrides:
disconnectin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException
-
logProblem
public void logProblem(String className, String methodName, CruxOMRSAuditCode code, Throwable cause, String... params)
Log a problem with the connector, preferring the audit log so long as it is available and only falling back to debug-level logging if it is not.- Parameters:
className- where the problem occurredmethodName- where the problem occurredcode- describing the problemcause- the exception that triggered the problem (if any)params- providing additional details about the problem
-
isDataStoreEmpty
public boolean isDataStoreEmpty()
Checks whether the data store is currently empty.- Returns:
- true of the data store is empty (has no metadata stored), otherwise false
-
createEntityProxy
public void createEntityProxy(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entity)
Create the provided entity instance in the Crux repository.- Parameters:
entity- to create
-
addCreateEntityProxyStatements
public void addCreateEntityProxyStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy entity)Retrieve the statements that need to be executed against Crux to create (persist) the entity proxy provided.- Parameters:
tx- the transaction through which to create the entity proxyentity- to create
-
createEntity
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail createEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)
Create the provided entity instance in the Crux repository.- Parameters:
entity- to create- Returns:
- EntityDetail that was created
-
addCreateEntityStatements
public void addCreateEntityStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)Retrieve the statements that need to be executed against Crux to create (persist) the entity provided.- Parameters:
tx- the transaction through which to create the entityentity- to be created
-
addUpdateEntityStatements
public void addUpdateEntityStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)Retrieve the statements that need to be executed against Crux to update (persist) the entity provided.- Parameters:
tx- the transaction through which to update the entityentity- to be updated
-
purgeEntity
public void purgeEntity(String guid)
Permanently delete the entity (and all of its history) from the Crux repository. Note that this operation is NOT reversible!- Parameters:
guid- of the entity to permanently delete
-
addPurgeEntityStatements
public void addPurgeEntityStatements(crux.api.tx.Transaction.Builder tx, String guid)Retrieve the statements that need to be executed against Crux to permanently delete the entity (and all of its history) from the Crux repository.- Parameters:
tx- the transaction through which to purge the entityguid- of the entity to permanently delete
-
updateEntity
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail updateEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity)
Update the provided entity instance in the Crux repository.- Parameters:
entity- to update- Returns:
- EntityDetail that was updated
-
getEntityProxy
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy getEntityProxy(String guid)
Retrieve the requested entity, as a proxy, from the Crux repository.- Parameters:
guid- of the entity to retrieve- Returns:
- EntityProxy of the current version of the entity
-
getEntitySummary
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntitySummary getEntitySummary(String guid)
Retrieve the requested entity from the Crux repository.- Parameters:
guid- of the entity to retrieve- Returns:
- EntitySummary of the current version of the entity
-
getEntity
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntity(String guid, Date asOfTime, boolean acceptProxies) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityProxyOnlyException
Retrieve the requested entity from the Crux repository.- Parameters:
guid- of the entity to retrieveasOfTime- view of the entity at this particular point in timeacceptProxies- if true, allow proxies to be returned as EntityDetails- Returns:
- EntityDetail as it existed at the specified point in time
- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityProxyOnlyException- if the entity requested is only an EntityProxy (and acceptProxies is false)
-
getEntityByGuid
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail getEntityByGuid(crux.api.ICruxDatasource db, String guid)Retrieve the requested entity from the Crux repository.- Parameters:
db- already opened point-in-time view of the databaseguid- of the entity to retrieve- Returns:
- EntityDetail as it existed at the specified database's point-in-time view
-
findEntities
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail> findEntities(String entityTypeGUID, List<String> entitySubtypeGUIDs, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties matchProperties, int fromEntityElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryTimeoutException
Search based on the provided parameters.- Parameters:
entityTypeGUID- see CruxOMRSMetadataCollection#findEntitiesentitySubtypeGUIDs- see CruxOMRSMetadataCollection#findEntitiesmatchProperties- see CruxOMRSMetadataCollection#findEntitiesfromEntityElement- see CruxOMRSMetadataCollection#findEntitieslimitResultsByStatus- see CruxOMRSMetadataCollection#findEntitiesmatchClassifications- see CruxOMRSMetadataCollection#findEntitiesasOfTime- see CruxOMRSMetadataCollection#findEntitiessequencingProperty- see CruxOMRSMetadataCollection#findEntitiessequencingOrder- see CruxOMRSMetadataCollection#findEntitiespageSize- see CruxOMRSMetadataCollection#findEntitiesuserId- of the user running the query- Returns:
List<EntityDetail>- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryTimeoutException- if the query runs longer than the defined threshold (default: 30s)- See Also:
CruxOMRSMetadataCollection.findEntities(String, String, List, SearchProperties, int, List, SearchClassifications, Date, String, SequencingOrder, int)
-
findEntitiesByText
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail> findEntitiesByText(String entityTypeGUID, String searchCriteria, int fromEntityElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryTimeoutException
Search based on the provided parameters.- Parameters:
entityTypeGUID- see CruxOMRSMetadataCollection#findEntitiesByPropertyValuesearchCriteria- see CruxOMRSMetadataCollection#findEntitiesByPropertyValuefromEntityElement- see CruxOMRSMetadataCollection#findEntitiesByPropertyValuelimitResultsByStatus- see CruxOMRSMetadataCollection#findEntitiesByPropertyValuematchClassifications- see CruxOMRSMetadataCollection#findEntitiesByPropertyValueasOfTime- see CruxOMRSMetadataCollection#findEntitiesByPropertyValuesequencingProperty- see CruxOMRSMetadataCollection#findEntitiesByPropertyValuesequencingOrder- see CruxOMRSMetadataCollection#findEntitiesByPropertyValuepageSize- see CruxOMRSMetadataCollection#findEntitiesByPropertyValueuserId- of the user running the query- Returns:
List<EntityDetail>- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryTimeoutException- if the query runs longer than the defined threshold (default: 30s)- See Also:
CruxOMRSMetadataCollection.findEntitiesByPropertyValue(String, String, String, int, List, List, Date, String, SequencingOrder, int)
-
findRelationshipsForEntity
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship> findRelationshipsForEntity(String entityGUID, String relationshipTypeGUID, int fromRelationshipElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Find the relationships, limited by the specified criteria, for the provided entity.- Parameters:
entityGUID- of the entity for which to find relationshipsrelationshipTypeGUID- to limit the relationship types to retrieve (optional)fromRelationshipElement- starting element for paginglimitResultsByStatus- by which to limit results (optional)asOfTime- view of the relationships at this particular point in timesequencingProperty- by which to order the results (required if sequencingOrder involves a property)sequencingOrder- by which to order results (optional, will default to GUID)pageSize- maximum number of results per pageuserId- of the user running the query- Returns:
List<Relationship>list of the matching relationships- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing open Crux resources, or if the query runs longer than the defined threshold (default: 30s)
-
findActiveRelationshipsForEntity
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship> findActiveRelationshipsForEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Find all active (non-deleted) relationships in this repository for the provided entity.- Parameters:
entity- for which to find relationshipsuserId- of the user running the query- Returns:
List<Relationship>list of the homed relationships- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing open Crux resources, or if the query runs longer than the defined threshold (default: 30s)
-
findHomedRelationshipsForEntity
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship> findHomedRelationshipsForEntity(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Find all relationships homed in this repository for the provided entity.- Parameters:
entity- for which to find relationshipsuserId- of the user running the query- Returns:
List<Relationship>list of the homed relationships- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing open Crux resources, or if the query runs longer than the defined threshold (default: 30s)
-
findNeighborhood
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph findNeighborhood(String entityGUID, List<String> entityTypeGUIDs, List<String> relationshipTypeGUIDs, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification, Date asOfTime, int level, boolean includeRelationships) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Find the entities and relationships that radiate out from the supplied entity GUID. The results are scoped by the provided type GUIDs, other limiters, and the level.- Parameters:
entityGUID- the starting point for the radiationentityTypeGUIDs- list of entity types to include in the query results (null means include all)relationshipTypeGUIDs- list of relationship types to include in the query results (null means include all)limitResultsByStatus- list of statuses to restrict results (null means include all)limitResultsByClassification- list of classifications that must be present on all returned entitiesasOfTime- historical query of the radiated relationships and entities (null means current values)level- the number of relationships out from the starting entity thatincludeRelationships- whether to include relationships in the resulting graph (true) or not (false)- Returns:
- InstanceGraph of the neighborhood
- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing open Crux resources, or if the query runs longer than the defined threshold (default: 30s)
-
getTraversalsBetweenEntities
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceGraph getTraversalsBetweenEntities(String startEntityGUID, String endEntityGUID, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Find all of the traversals that exist between the provided entities, based on the other provided criteria.- Parameters:
startEntityGUID- from which to start traversingendEntityGUID- at which to stop traversinglimitResultsByStatus- to limit the entities that are traversed based on their statusasOfTime- to find the traversals for a particular point-in-time- Returns:
- InstanceGraph containing all of the relationships and entities between the start and end
- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException- if the requested starting point is not known to the repositoryorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing an open Crux resource
-
findRelationships
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship> findRelationships(String relationshipTypeGUID, List<String> relationshipSubtypeGUIDs, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties matchProperties, int fromRelationshipElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Search based on the provided parameters.- Parameters:
relationshipTypeGUID- see CruxOMRSMetadataCollection#findRelationshipsrelationshipSubtypeGUIDs- see CruxOMRSMetadataCollection#findRelationshipsmatchProperties- see CruxOMRSMetadataCollection#findRelationshipsfromRelationshipElement- see CruxOMRSMetadataCollection#findRelationshipslimitResultsByStatus- see CruxOMRSMetadataCollection#findRelationshipsasOfTime- see CruxOMRSMetadataCollection#findRelationshipssequencingProperty- see CruxOMRSMetadataCollection#findRelationshipssequencingOrder- see CruxOMRSMetadataCollection#findRelationshipspageSize- see CruxOMRSMetadataCollection#findRelationshipsuserId- of the user running the query- Returns:
List<Relationship>- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing open Crux resources, or if the query runs longer than the defined threshold (default: 30s)- See Also:
CruxOMRSMetadataCollection.findRelationships(String, String, List, SearchProperties, int, List, Date, String, SequencingOrder, int)
-
findRelationshipsByText
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship> findRelationshipsByText(String relationshipTypeGUID, String searchCriteria, int fromRelationshipElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Search based on the provided parameters.- Parameters:
relationshipTypeGUID- see CruxOMRSMetadataCollection#findRelationshipsByPropertyValuesearchCriteria- see CruxOMRSMetadataCollection#findRelationshipsByPropertyValuefromRelationshipElement- see CruxOMRSMetadataCollection#findRelationshipsByPropertyValuelimitResultsByStatus- see CruxOMRSMetadataCollection#findRelationshipsByPropertyValueasOfTime- see CruxOMRSMetadataCollection#findRelationshipsByPropertyValuesequencingProperty- see CruxOMRSMetadataCollection#findRelationshipsByPropertyValuesequencingOrder- see CruxOMRSMetadataCollection#findRelationshipsByPropertyValuepageSize- see CruxOMRSMetadataCollection#findRelationshipsByPropertyValueuserId- of the user running the query- Returns:
List<Relationship>- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing open Crux resources, or if the query runs longer than the defined threshold (default: 30s)- See Also:
CruxOMRSMetadataCollection.findRelationshipsByPropertyValue(String, String, String, int, List, Date, String, SequencingOrder, int)
-
createRelationship
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship createRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
Create the provided relationship instance in the Crux repository.- Parameters:
relationship- to create- Returns:
- Relationship that was created
-
addCreateRelationshipStatements
public void addCreateRelationshipStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Retrieve the statements that need to be executed against Crux to create (persist) the relationship provided.- Parameters:
tx- the transaction through which to create the relationshiprelationship- to be created
-
purgeRelationship
public void purgeRelationship(String guid)
Permanently delete the relationship (and all of its history) from the Crux repository. Note that this operation is NOT reversible!- Parameters:
guid- of the relationship to permanently delete
-
addPurgeRelationshipStatements
public void addPurgeRelationshipStatements(crux.api.tx.Transaction.Builder tx, String guid)Retrieve the statements that need to be executed against Crux to permanently delete the relationship (and all of its history) from the Crux repository.- Parameters:
tx- the transaction through which to do the purgeguid- of the relationship to permanently delete
-
updateRelationship
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship updateRelationship(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)
Update the provided relationship instance in the Crux repository.- Parameters:
relationship- to update- Returns:
- Relationship that was updated
-
addUpdateRelationshipStatements
public void addUpdateRelationshipStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship)Retrieve the statements that need to be executed against Crux to update the provided relationship instance in the Crux repository.- Parameters:
tx- the transaction through which to do the relationship updaterelationship- to update
-
getRelationship
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship getRelationship(String guid, Date asOfTime) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Retrieve the requested relationship from the Crux repository.- Parameters:
guid- of the relationship to retrieveasOfTime- view of the relationship at this particular point in time- Returns:
- Relationship as it existed at the specified point in time
- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing an open Crux resource
-
restorePreviousVersionOfEntity
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail restorePreviousVersionOfEntity(String userId, String guid) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Restore the previous version of the provided entity, and return the restored version (or null if there was no previous version and hence no restoration).- Parameters:
userId- of the user requesting the restorationguid- of the entity for which to restore the previous version- Returns:
- EntityDetail giving the restored version (or null if there was no previous version to restore)
- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing the lazy-evaluating cursor
-
restorePreviousVersionOfRelationship
public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship restorePreviousVersionOfRelationship(String userId, String guid) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Restore the previous version of the provided relationship, and return the restored version (or null if there was no previous version and hence no restoration).- Parameters:
userId- of the user requesting the restorationguid- of the relationship for which to restore the previous version- Returns:
- Relationship giving the restored version (or null if there was no previous version to restore)
- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing an open Crux resource
-
getPreviousVersionsOfEntity
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail> getPreviousVersionsOfEntity(String guid, Date from, Date to, int offset, int pageSize, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.HistorySequencingOrder order) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Retrieve previous versions of the entity between the provided dates, ordered as requested.- Parameters:
guid- of the entity for which to retrieve previous versionsfrom- earliest date and time for which the versions to include were valid (inclusive)to- latest date and time for which the versions to include were valid (exclusive)offset- element from which to start (paging)pageSize- maximum number of results to include (paging)order- whether to order the results in reverse-chronological order (backwards) or chronologically (forwards)- Returns:
List<EntityDetail>giving all versions of the entity within the range requested- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException- if the requested entity was not known to the repository during the specified time rangeorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing the lazy-evaluating cursor
-
getPreviousVersionsOfRelationship
public List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship> getPreviousVersionsOfRelationship(String guid, Date from, Date to, int offset, int pageSize, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.HistorySequencingOrder order) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException
Retrieve previous versions of the relationship between the provided dates, ordered as requested.- Parameters:
guid- of the relationship for which to retrieve previous versionsfrom- earliest date and time for which the versions to include were valid (inclusive)to- latest date and time for which the versions to include were valid (exclusive)offset- element from which to start (paging)pageSize- maximum number of results to include (paging)order- whether to order the results in reverse-chronological order (backwards) or chronologically (forwards)- Returns:
List<Relationship>giving all versions of the relationship within the range requested- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipNotKnownException- if the requested relationship was not known to the repository during the specified time rangeorg.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing the lazy-evaluating cursor
-
saveReferenceCopy
public void saveReferenceCopy(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityConflictExceptionSave the provided entity as a reference copy. This is only possible if there is no existing entity with the same GUID, or if there is an existing entity with this GUID and its metadataCollectionId matches. Any other scenario is an error for a reference copy.- Parameters:
entity- to save as a reference copy- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityConflictException- the entity conflicts with an existing entity (different metadata collection IDs)
-
addSaveReferenceCopyStatements
public void addSaveReferenceCopyStatements(crux.api.tx.Transaction.Builder tx, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship relationship) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipConflictException, org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorExceptionRetrieve the statements that need to be executed against Crux to save the provided relationship as a reference copy. This is only possible if there is no existing relationship with the same GUID, or if there is an existing relationship with this GUID and its metadataCollectionId matches. Any other scenario is an error for a reference copy.- Parameters:
tx- the transaction through which to save the reference copyrelationship- to save as a reference copy- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.RelationshipConflictException- the relationship conflicts with an existing relationship (different metadata collection IDs)org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException- if any issue closing an open Crux resource
-
getCruxObjectByReference
public crux.api.CruxDocument getCruxObjectByReference(String reference)
Retrieve the current version of the requested reference's details from the Crux repository.- Parameters:
reference- indicating the primary key of the Crux object to retrieve- Returns:
- CruxDocument of the object's properties
-
getCruxObjectByReference
public crux.api.CruxDocument getCruxObjectByReference(String reference, Date asOfTime)
Retrieve the requested reference's details from the Crux repository.- Parameters:
reference- indicating the primary key of the Crux object to retrieveasOfTime- view of the object at this particular point in time (or null for current)- Returns:
- CruxDocument of the object's properties
-
getCruxObjectByReference
public crux.api.CruxDocument getCruxObjectByReference(crux.api.ICruxDatasource db, String reference)Retrieve the requested reference's details from an already-open Crux repository.- Parameters:
db- from which to retrieve the detailsreference- indicating the primary key of the Crux object to retrieve- Returns:
- CruxDocument of the object's properties
-
getCruxObjectByReference
public crux.api.CruxDocument getCruxObjectByReference(String reference, Map<clojure.lang.Keyword,?> txnDetails)
Retrieve the requested reference's details from the Crux repository at the precise version indicated by the provided transaction details (as returned by an entity history call, must include the valid-time and tx-time).- Parameters:
reference- indicating the primary key of the Crux object to retrievetxnDetails- containing the valid-time and tx-time of the precise version of the document to retrieve- Returns:
- CruxDocument of the object's properties
-
searchCrux
public Collection<List<?>> searchCrux(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, List<String> subtypeGuids, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties matchProperties, int fromElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String namespace, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, TimeoutException
Search Crux based on the provided parameters (should work across both Entities and Relationships).- Parameters:
category- to limit the search to either entities or relationships (required)typeGuid- to limit the search by type (optional)subtypeGuids- to limit the search to a set of subtypes (optional)matchProperties- by which to limit the results (optional)fromElement- starting element for paginglimitResultsByStatus- by which to limit results (optional)matchClassifications- by which to limit entity results (must be null for relationships) (optional)asOfTime- for a historical search (optional, null will give current results)sequencingProperty- by which to order the results (required if sequencingOrder involves a property)sequencingOrder- by which to order results (optional, will default to GUID)pageSize- maximum number of results per pagenamespace- by which to qualify the matchPropertiesuserId- of the user running the query- Returns:
Collection<List<?>>list of the Crux document references that match- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryTimeoutException- if the query runs longer than the defined threshold (default: 30s)
-
searchCrux
public Collection<List<?>> searchCrux(crux.api.ICruxDatasource db, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, List<String> subtypeGuids, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchProperties matchProperties, int fromElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String namespace, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, TimeoutException
Search Crux based on the provided parameters, using an already-opened point-in-time view of the database (should work across both Entities and Relationships).- Parameters:
db- already opened point-in-time view of the databasecategory- to limit the search to either entities or relationships (required)typeGuid- to limit the search by type (optional)subtypeGuids- to limit the search to a set of subtypes (optional)matchProperties- by which to limit the results (optional)fromElement- starting element for paginglimitResultsByStatus- by which to limit results (optional)matchClassifications- by which to limit entity results (must be null for relationships) (optional)sequencingProperty- by which to order the results (required if sequencingOrder involves a property)sequencingOrder- by which to order results (optional, will default to GUID)pageSize- maximum number of results per pagenamespace- by which to qualify the matchPropertiesuserId- of the user running the query- Returns:
Collection<List<?>>list of the Crux document references that match- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryTimeoutException- if the query runs longer than the defined threshold (default: 30s)
-
searchCruxText
public Collection<List<?>> searchCruxText(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, String searchCriteria, int fromElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, Date asOfTime, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String namespace, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, TimeoutException
Search all text properties in Crux based on the provided parameters (should work across both Entities and Relationships).- Parameters:
category- to limit the search to either entities or relationships (required)typeGuid- to limit the search by type (optional)searchCriteria- by which to limit the results (required, must be a Java regular expression)fromElement- starting element for paginglimitResultsByStatus- by which to limit results (optional)matchClassifications- by which to limit entity results (must be null for relationships) (optional)asOfTime- for a historical search (optional, null will give current results)sequencingProperty- by which to order the results (required if sequencingOrder involves a property)sequencingOrder- by which to order results (optional, will default to GUID)pageSize- maximum number of results per pagenamespace- by which to qualify the matchPropertiesuserId- of the user running the query- Returns:
Collection<List<?>>list of the Crux document references that match- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryTimeoutException- if the query runs longer than the defined threshold (default: 30s)
-
searchCruxText
public Collection<List<?>> searchCruxText(crux.api.ICruxDatasource db, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefCategory category, String typeGuid, String searchCriteria, int fromElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.search.SearchClassifications matchClassifications, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String namespace, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, TimeoutException
Search all text properties in Crux based on the provided parameters, using an already-opened point-in-time view of the database (should work across both Entities and Relationships).- Parameters:
db- already opened point-in-time view of the databasecategory- to limit the search to either entities or relationships (required)typeGuid- to limit the search by type (optional)searchCriteria- by which to limit the results (required, must be a Java regular expression)fromElement- starting element for paginglimitResultsByStatus- by which to limit results (optional)matchClassifications- by which to limit entity results (must be null for relationships) (optional)sequencingProperty- by which to order the results (required if sequencingOrder involves a property)sequencingOrder- by which to order results (optional, will default to GUID)pageSize- maximum number of results per pagenamespace- by which to qualify the matchPropertiesuserId- of the user running the query- Returns:
Collection<List<?>>list of the Crux document references that match- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryTimeoutException- if the query runs longer than the defined threshold (default: 30s)
-
findEntityRelationships
public Collection<List<?>> findEntityRelationships(crux.api.ICruxDatasource db, String entityGUID, String relationshipTypeGUID, int fromRelationshipElement, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, String sequencingProperty, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder sequencingOrder, int pageSize, String userId) throws org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException, TimeoutException
Find the relationships that match the provided parameters.- Parameters:
db- already opened point-in-time view of the databaseentityGUID- of the entity for which to find relationshipsrelationshipTypeGUID- to limit the relationship types to retrieve (optional)fromRelationshipElement- starting element for paginglimitResultsByStatus- by which to limit results (optional)sequencingProperty- by which to order the results (required if sequencingOrder involves a property)sequencingOrder- by which to order results (optional, will default to GUID)pageSize- maximum number of results per pageuserId- of the user running the query- Returns:
Collection<List<?>>list of the Crux document references that match- Throws:
org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeErrorException- if a requested type for searching is not known to the repositoryTimeoutException- if the query runs longer than the defined threshold (default: 30s)
-
findEntityRelationships
public Collection<List<?>> findEntityRelationships(crux.api.ICruxDatasource db, String entityGUID, String userId, boolean includeDeleted) throws TimeoutException
Find the relationships that match the provided parameters.- Parameters:
db- already opened point-in-time view of the databaseentityGUID- for which to find relationshipsuserId- of the user running the queryincludeDeleted- if true, include deleted relationships in the results (otherwise exclude them)- Returns:
Collection<List<?>>list of the Crux document references that match- Throws:
TimeoutException- if the query runs longer than the defined threshold (default: 30s)
-
findHomedEntityRelationships
public Collection<List<?>> findHomedEntityRelationships(crux.api.ICruxDatasource db, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail entity, String userId) throws TimeoutException
Find the relationships that match the provided parameters.- Parameters:
db- already opened point-in-time view of the databaseentity- for which to find relationshipsuserId- of the user running the query- Returns:
Collection<List<?>>list of the Crux document references that match- Throws:
TimeoutException- if the query runs longer than the defined threshold (default: 30s)
-
findDirectNeighbors
public Collection<List<?>> findDirectNeighbors(crux.api.ICruxDatasource db, String entityGUID, List<String> entityTypeGUIDs, List<String> relationshipTypeGUIDs, List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus> limitResultsByStatus, List<String> limitResultsByClassification) throws TimeoutException
Find the immediate neighbors (1-degree separated entities and the relationships between) using the provided criteria.- Parameters:
db- already opened point-in-view of the databaseentityGUID- of the entity for which to find immediate relationshipsentityTypeGUIDs- of the entity type definitions by which to restrict entities in the resultsrelationshipTypeGUIDs- of the relationship type definitions by which to restrict relationships in the resultslimitResultsByStatus- by which to limit relationshipslimitResultsByClassification- by which to limit the entities in the results- Returns:
Collection<List<?>>of tuples of relationships and entities found in the results- Throws:
TimeoutException- if the query runs longer than the defined threshold (default: 30s)
-
runTx
public crux.api.TransactionInstant runTx(crux.api.tx.Transaction statements)
Run multiple statements through Crux as a single transaction.- Parameters:
statements- the transaction to submit- Returns:
- TransactionInstant transaction details
-
getCruxAPI
public crux.api.ICruxAPI getCruxAPI()
Retrieve the Crux API directly. NOTE: This should only be used in very exceptional circumstances where direct access to the API is needed (e.g. for testing purposes). Use any other method where possible.- Returns:
- ICruxAPI
-
put
public static void put(crux.api.tx.Transaction.Builder tx, crux.api.CruxDocument cruxDoc)Add a write operation to the transaction (applicable for any write operation, since it is append-only). Note: this should be used rather than calling '.put' directly against the transaction builder, as this method will set the historical date based on the information within the document itself (if any), allowing us to have a historical view for things like reference copies.- Parameters:
tx- the transaction through which to do the write operationcruxDoc- the document to write to the repository
-
evict
public static void evict(crux.api.tx.Transaction.Builder tx, String docRef)Add eviction of the specified docRef to the transaction (applicable for permanently removing anything by its "primary key").- Parameters:
tx- the transaction through which to do the evictiondocRef- giving the "primary key" of the record to be permanently removed
-
equals
public boolean equals(Object o)
Default equality comparison.- Overrides:
equalsin classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Parameters:
o- object to compare against- Returns:
- boolean
-
hashCode
public int hashCode()
Default hash calculation.- Overrides:
hashCodein classorg.odpi.openmetadata.frameworks.connectors.ConnectorBase- Returns:
- int
-
-