Package org.openmetadata.service
Class Entity
- java.lang.Object
-
- org.openmetadata.service.Entity
-
public final class Entity extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntity.EntityListClass for getting validated entity list from a queryParam with list of entities.
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddeleteEntity(String updatedBy, String entityType, UUID entityId, boolean recursive, boolean hardDelete)static <T> TgetEntity(String entityType, UUID id, String fields, Include include)static <T> TgetEntity(String entityType, UUID id, String fields, Include include, boolean fromCache)Retrieve the entity using id from given entity reference and fieldsstatic <T> TgetEntity(EntityReference ref, String fields, Include include)static <T> TgetEntity(MessageParser.EntityLink link, String fields, Include include)static <T> TgetEntityByName(String entityType, String fqn, String fields, Include include)static <T> TgetEntityByName(String entityType, String fqn, String fields, Include include, boolean fromCache)Retrieve the entity using id from given entity reference and fieldsstatic Class<? extends EntityInterface>getEntityClassFromType(String entityType)static <T> Set<String>getEntityFields(Class<T> clz)Get list of all the entity field names from JsonPropertyOrder annotation from generated java class from entity.jsonstatic List<String>getEntityList()static EntityReferencegetEntityReference(EntityReference ref, Include include)static EntityReferencegetEntityReferenceById(@NonNull String entityType, @NonNull UUID id, Include include)static EntityReferencegetEntityReferenceByName(@NonNull String entityType, String fqn, Include include)static EntityRepository<? extends EntityInterface>getEntityRepository(@NonNull String entityType)Retrieve the corresponding entity repository for a given entity name.static List<TagLabel>getEntityTags(String entityType, EntityInterface entity)static <T> StringgetEntityTypeFromClass(Class<T> clz)static StringgetEntityTypeFromObject(Object object)static EntityUtil.FieldsgetFields(String entityType, List<String> fields)static EntityReferencegetOwner(@NonNull EntityReference reference)static EntityRepository<? extends EntityInterface>getServiceEntityRepository(@NonNull ServiceType serviceType)Retrieve the corresponding entity repository for a given entity name.static <T extends EntityInterface>
voidregisterEntity(Class<T> clazz, String entity, EntityRepository<T> entityRepository, List<MetadataOperation> entitySpecificOperations)static voidrestoreEntity(String updatedBy, String entityType, UUID entityId)static booleanshouldDisplayEntityChangeOnFeed(@NonNull String entityType)Returns true if the change events of the given entity type should be published to the activity feed.static booleansupportsFeed(String entityType)Returns true if the entity supports activity feeds, announcement, and tasksstatic voidwithHref(javax.ws.rs.core.UriInfo uriInfo, List<EntityReference> list)static voidwithHref(javax.ws.rs.core.UriInfo uriInfo, EntityReference ref)
-
-
-
Field Detail
-
SEPARATOR
public static final String SEPARATOR
- See Also:
- Constant Field Values
-
FIELD_OWNER
public static final String FIELD_OWNER
- See Also:
- Constant Field Values
-
FIELD_NAME
public static final String FIELD_NAME
- See Also:
- Constant Field Values
-
FIELD_DESCRIPTION
public static final String FIELD_DESCRIPTION
- See Also:
- Constant Field Values
-
FIELD_FOLLOWERS
public static final String FIELD_FOLLOWERS
- See Also:
- Constant Field Values
-
FIELD_VOTES
public static final String FIELD_VOTES
- See Also:
- Constant Field Values
-
FIELD_TAGS
public static final String FIELD_TAGS
- See Also:
- Constant Field Values
-
FIELD_DELETED
public static final String FIELD_DELETED
- See Also:
- Constant Field Values
-
FIELD_PIPELINE_STATUS
public static final String FIELD_PIPELINE_STATUS
- See Also:
- Constant Field Values
-
FIELD_DISPLAY_NAME
public static final String FIELD_DISPLAY_NAME
- See Also:
- Constant Field Values
-
FIELD_EXTENSION
public static final String FIELD_EXTENSION
- See Also:
- Constant Field Values
-
FIELD_USAGE_SUMMARY
public static final String FIELD_USAGE_SUMMARY
- See Also:
- Constant Field Values
-
FIELD_REVIEWERS
public static final String FIELD_REVIEWERS
- See Also:
- Constant Field Values
-
DATABASE_SERVICE
public static final String DATABASE_SERVICE
- See Also:
- Constant Field Values
-
MESSAGING_SERVICE
public static final String MESSAGING_SERVICE
- See Also:
- Constant Field Values
-
DASHBOARD_SERVICE
public static final String DASHBOARD_SERVICE
- See Also:
- Constant Field Values
-
PIPELINE_SERVICE
public static final String PIPELINE_SERVICE
- See Also:
- Constant Field Values
-
STORAGE_SERVICE
public static final String STORAGE_SERVICE
- See Also:
- Constant Field Values
-
MLMODEL_SERVICE
public static final String MLMODEL_SERVICE
- See Also:
- Constant Field Values
-
METADATA_SERVICE
public static final String METADATA_SERVICE
- See Also:
- Constant Field Values
-
TABLE
public static final String TABLE
- See Also:
- Constant Field Values
-
DATABASE
public static final String DATABASE
- See Also:
- Constant Field Values
-
DATABASE_SCHEMA
public static final String DATABASE_SCHEMA
- See Also:
- Constant Field Values
-
METRICS
public static final String METRICS
- See Also:
- Constant Field Values
-
DASHBOARD
public static final String DASHBOARD
- See Also:
- Constant Field Values
-
DASHBOARD_DATA_MODEL
public static final String DASHBOARD_DATA_MODEL
- See Also:
- Constant Field Values
-
PIPELINE
public static final String PIPELINE
- See Also:
- Constant Field Values
-
CHART
public static final String CHART
- See Also:
- Constant Field Values
-
REPORT
public static final String REPORT
- See Also:
- Constant Field Values
-
TOPIC
public static final String TOPIC
- See Also:
- Constant Field Values
-
MLMODEL
public static final String MLMODEL
- See Also:
- Constant Field Values
-
CONTAINER
public static final String CONTAINER
- See Also:
- Constant Field Values
-
QUERY
public static final String QUERY
- See Also:
- Constant Field Values
-
GLOSSARY
public static final String GLOSSARY
- See Also:
- Constant Field Values
-
GLOSSARY_TERM
public static final String GLOSSARY_TERM
- See Also:
- Constant Field Values
-
TAG
public static final String TAG
- See Also:
- Constant Field Values
-
CLASSIFICATION
public static final String CLASSIFICATION
- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
TEST_DEFINITION
public static final String TEST_DEFINITION
- See Also:
- Constant Field Values
-
TEST_CONNECTION_DEFINITION
public static final String TEST_CONNECTION_DEFINITION
- See Also:
- Constant Field Values
-
TEST_SUITE
public static final String TEST_SUITE
- See Also:
- Constant Field Values
-
KPI
public static final String KPI
- See Also:
- Constant Field Values
-
TEST_CASE
public static final String TEST_CASE
- See Also:
- Constant Field Values
-
WEB_ANALYTIC_EVENT
public static final String WEB_ANALYTIC_EVENT
- See Also:
- Constant Field Values
-
DATA_INSIGHT_CHART
public static final String DATA_INSIGHT_CHART
- See Also:
- Constant Field Values
-
POLICY
public static final String POLICY
- See Also:
- Constant Field Values
-
POLICIES
public static final String POLICIES
- See Also:
- Constant Field Values
-
ROLE
public static final String ROLE
- See Also:
- Constant Field Values
-
USER
public static final String USER
- See Also:
- Constant Field Values
-
TEAM
public static final String TEAM
- See Also:
- Constant Field Values
-
BOT
public static final String BOT
- See Also:
- Constant Field Values
-
INGESTION_PIPELINE
public static final String INGESTION_PIPELINE
- See Also:
- Constant Field Values
-
EVENT_SUBSCRIPTION
public static final String EVENT_SUBSCRIPTION
- See Also:
- Constant Field Values
-
THREAD
public static final String THREAD
- See Also:
- Constant Field Values
-
WORKFLOW
public static final String WORKFLOW
- See Also:
- Constant Field Values
-
ADMIN_USER_NAME
public static final String ADMIN_USER_NAME
- See Also:
- Constant Field Values
-
ORGANIZATION_NAME
public static final String ORGANIZATION_NAME
- See Also:
- Constant Field Values
-
ORGANIZATION_POLICY_NAME
public static final String ORGANIZATION_POLICY_NAME
- See Also:
- Constant Field Values
-
INGESTION_BOT_NAME
public static final String INGESTION_BOT_NAME
- See Also:
- Constant Field Values
-
INGESTION_BOT_ROLE
public static final String INGESTION_BOT_ROLE
- See Also:
- Constant Field Values
-
PROFILER_BOT_NAME
public static final String PROFILER_BOT_NAME
- See Also:
- Constant Field Values
-
PROFILER_BOT_ROLE
public static final String PROFILER_BOT_ROLE
- See Also:
- Constant Field Values
-
QUALITY_BOT_NAME
public static final String QUALITY_BOT_NAME
- See Also:
- Constant Field Values
-
QUALITY_BOT_ROLE
public static final String QUALITY_BOT_ROLE
- See Also:
- Constant Field Values
-
ALL_RESOURCES
public static final String ALL_RESOURCES
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerEntity
public static <T extends EntityInterface> void registerEntity(Class<T> clazz, String entity, EntityRepository<T> entityRepository, List<MetadataOperation> entitySpecificOperations)
-
getEntityReference
public static EntityReference getEntityReference(EntityReference ref, Include include)
-
getEntityReferenceById
public static EntityReference getEntityReferenceById(@NonNull @NonNull String entityType, @NonNull @NonNull UUID id, Include include)
-
getEntityReferenceByName
public static EntityReference getEntityReferenceByName(@NonNull @NonNull String entityType, String fqn, Include include)
-
getOwner
public static EntityReference getOwner(@NonNull @NonNull EntityReference reference)
-
withHref
public static void withHref(javax.ws.rs.core.UriInfo uriInfo, List<EntityReference> list)
-
withHref
public static void withHref(javax.ws.rs.core.UriInfo uriInfo, EntityReference ref)
-
shouldDisplayEntityChangeOnFeed
public static boolean shouldDisplayEntityChangeOnFeed(@NonNull @NonNull String entityType)Returns true if the change events of the given entity type should be published to the activity feed.
-
getFields
public static EntityUtil.Fields getFields(String entityType, List<String> fields)
-
getEntity
public static <T> T getEntity(EntityReference ref, String fields, Include include)
-
getEntity
public static <T> T getEntity(MessageParser.EntityLink link, String fields, Include include)
-
getEntity
public static <T> T getEntity(String entityType, UUID id, String fields, Include include, boolean fromCache)
Retrieve the entity using id from given entity reference and fields
-
getEntity
public static <T> T getEntity(String entityType, UUID id, String fields, Include include)
-
getEntityByName
public static <T> T getEntityByName(String entityType, String fqn, String fields, Include include, boolean fromCache)
Retrieve the entity using id from given entity reference and fields
-
getEntityByName
public static <T> T getEntityByName(String entityType, String fqn, String fields, Include include)
-
getEntityRepository
public static EntityRepository<? extends EntityInterface> getEntityRepository(@NonNull @NonNull String entityType)
Retrieve the corresponding entity repository for a given entity name.
-
getServiceEntityRepository
public static EntityRepository<? extends EntityInterface> getServiceEntityRepository(@NonNull @NonNull ServiceType serviceType)
Retrieve the corresponding entity repository for a given entity name.
-
getEntityTags
public static List<TagLabel> getEntityTags(String entityType, EntityInterface entity)
-
deleteEntity
public static void deleteEntity(String updatedBy, String entityType, UUID entityId, boolean recursive, boolean hardDelete)
-
getEntityClassFromType
public static Class<? extends EntityInterface> getEntityClassFromType(String entityType)
-
getEntityFields
public static <T> Set<String> getEntityFields(Class<T> clz)
Get list of all the entity field names from JsonPropertyOrder annotation from generated java class from entity.json
-
supportsFeed
public static boolean supportsFeed(String entityType)
Returns true if the entity supports activity feeds, announcement, and tasks
-
-