public class JDBCAssociationDAO extends Object implements AssociationDAO
AssociationDAO to store associations on a JDBC-based database.| Constructor and Description |
|---|
JDBCAssociationDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAssociation(String sourcePath,
String targetPath,
String associationType)
Method to persist an association.
|
void |
copyAssociations(String fromPath,
String toPath)
Method to copy associations for a given path to a new path.
|
Association[] |
getAllAssociations(String resourcePath)
Method to get all association.
|
Association[] |
getAllAssociationsForType(String resourcePath,
String associationType)
Method to get all association of a given type.
|
void |
removeAllAssociations(String resourcePath)
Method to remove all associations for a given path.
|
void |
removeAssociation(String sourcePath,
String targetPath,
String associationType)
Method to remove an association.
|
void |
replaceAssociations(String oldPath,
String newPath)
Method to replace all associations, when moving or renaming a resource.
|
public void addAssociation(String sourcePath, String targetPath, String associationType) throws RegistryException
AssociationDAOaddAssociation in interface AssociationDAOsourcePath - the source pathtargetPath - the target pathassociationType - the type of the associationRegistryException - if some error occurs while adding associationspublic void removeAssociation(String sourcePath, String targetPath, String associationType) throws RegistryException
AssociationDAOremoveAssociation in interface AssociationDAOsourcePath - the source pathtargetPath - the target pathassociationType - the type of the associationRegistryException - if some error occurs while removing associationspublic Association[] getAllAssociations(String resourcePath) throws RegistryException
AssociationDAOgetAllAssociations in interface AssociationDAOresourcePath - the source pathRegistryException - if some error occurs while getting all associationspublic Association[] getAllAssociationsForType(String resourcePath, String associationType) throws RegistryException
AssociationDAOgetAllAssociationsForType in interface AssociationDAOresourcePath - the source pathassociationType - the type of the associationRegistryException - if some error occurs while getting associations of a given typepublic void replaceAssociations(String oldPath, String newPath) throws RegistryException
AssociationDAOreplaceAssociations in interface AssociationDAOoldPath - the old resource pathnewPath - the new resource pathRegistryException - if an error occurs whilepublic void removeAllAssociations(String resourcePath) throws RegistryException
AssociationDAOremoveAllAssociations in interface AssociationDAOresourcePath - the source pathRegistryException - if an error occurs whilepublic void copyAssociations(String fromPath, String toPath) throws RegistryException
AssociationDAOcopyAssociations in interface AssociationDAOfromPath - the source pathtoPath - the destination pathRegistryException - if an error occurs whileCopyright © 2016 WSO2 Inc. All Rights Reserved.