public class ExtensionDAO extends Object
ExtensionDAO class is used to manage the persistence and retrieval of
ExtensionEntity 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 |
|---|
ExtensionDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
create(ExtensionEntity extension)
Persists a new extension instance.
|
void |
createOrUpdate(ExtensionEntity extension)
Creates or updates the specified entity.
|
ExtensionEntity |
find(String extensionName,
String extensionVersion)
Gets the extension that matches the specified name and version.
|
List<ExtensionEntity> |
findAll()
Gets all of the defined extensions.
|
ExtensionEntity |
findById(long extensionId)
Gets a extension with the specified ID.
|
ExtensionEntity |
merge(ExtensionEntity extension)
Merge the specified extension with the existing extension in the database.
|
void |
refresh(ExtensionEntity extension)
Refresh the state of the extension instance from the database.
|
void |
remove(ExtensionEntity extension)
Removes the specified extension and all related clusters, services and
components.
|
public ExtensionEntity findById(long extensionId)
extensionId - the ID of the extension to retrieve.null if none exists.public List<ExtensionEntity> findAll()
null).public ExtensionEntity find(String extensionName, String extensionVersion)
null
if none.public void create(ExtensionEntity extension) throws org.apache.ambari.server.AmbariException
extension - the extension to persist (not null).org.apache.ambari.server.AmbariExceptionpublic void refresh(ExtensionEntity extension)
extension - the extension to refresh (not null).public ExtensionEntity merge(ExtensionEntity extension)
extension - the extension to merge (not null).null).public void createOrUpdate(ExtensionEntity extension) throws org.apache.ambari.server.AmbariException
ExtensionEntity.getExtensionId() in order to determine whether the entity
should be created or merged.extension - the extension to create or update (not null).org.apache.ambari.server.AmbariExceptionpublic void remove(ExtensionEntity extension)
extension - the extension to remove.Copyright © 2022 Apache Software Foundation. All rights reserved.