public class ExtensionLinkDAO extends Object
ExtensionLinkDAO class is used to manage the persistence and retrieval of
ExtensionLinkEntity instances.
An extension version is like a stack version but it contains custom services. Linking an extension
version to the current stack version allows the cluster to install the custom services contained in
the extension version.| Constructor and Description |
|---|
ExtensionLinkDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
create(ExtensionLinkEntity link)
Persists a new extension link instance.
|
void |
createOrUpdate(ExtensionLinkEntity link)
Creates or updates the specified entity.
|
List<ExtensionLinkEntity> |
find(ExtensionLinkRequest request)
Gets the extension links that match the specified stack name and version.
|
List<ExtensionLinkEntity> |
findAll()
Gets all of the defined extension links.
|
List<ExtensionLinkEntity> |
findByExtension(String extensionName,
String extensionVersion)
Gets the extension links that match the specified extension name and version.
|
ExtensionLinkEntity |
findById(long linkId)
Gets an extension link with the specified ID.
|
List<ExtensionLinkEntity> |
findByStack(String stackName,
String stackVersion)
Gets the extension links that match the specified stack name and version.
|
ExtensionLinkEntity |
findByStackAndExtension(String stackName,
String stackVersion,
String extensionName,
String extensionVersion)
Gets the extension link that match the specified stack name, stack version, extension name and extension version.
|
List<ExtensionLinkEntity> |
findByStackAndExtensionName(String stackName,
String stackVersion,
String extensionName)
Gets the extension link that match the specified stack name, stack version and extension name.
|
ExtensionLinkEntity |
merge(ExtensionLinkEntity link)
Merge the specified extension link with the existing extension link in the database.
|
void |
refresh(ExtensionLinkEntity link)
Refresh the state of the extension instance from the database.
|
void |
remove(ExtensionLinkEntity link)
Removes the specified extension link
|
public List<ExtensionLinkEntity> find(ExtensionLinkRequest request)
public ExtensionLinkEntity findById(long linkId)
linkId - the ID of the extension link to retrieve.null if none exists.public List<ExtensionLinkEntity> findAll()
null).public List<ExtensionLinkEntity> findByExtension(String extensionName, String extensionVersion)
public List<ExtensionLinkEntity> findByStack(String stackName, String stackVersion)
public List<ExtensionLinkEntity> findByStackAndExtensionName(String stackName, String stackVersion, String extensionName)
public ExtensionLinkEntity findByStackAndExtension(String stackName, String stackVersion, String extensionName, String extensionVersion)
public void create(ExtensionLinkEntity link) throws org.apache.ambari.server.AmbariException
link - the extension link to persist (not null).org.apache.ambari.server.AmbariExceptionpublic void refresh(ExtensionLinkEntity link)
link - the extension link to refresh (not null).public ExtensionLinkEntity merge(ExtensionLinkEntity link)
link - the extension link to merge (not null).null).public void createOrUpdate(ExtensionLinkEntity link) throws org.apache.ambari.server.AmbariException
ExtensionLinkEntity.getLinkId() in order to determine whether the entity
should be created or merged.link - the link to create or update (not null).org.apache.ambari.server.AmbariExceptionpublic void remove(ExtensionLinkEntity link)
link - the extension link to remove.Copyright © 2022 Apache Software Foundation. All rights reserved.