public abstract class AbstractDAO<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected org.wso2.carbon.registry.core.Registry |
registry |
Constructor and Description |
---|
AbstractDAO() |
Modifier and Type | Method and Description |
---|---|
List<T> |
getAllObjects(String path)
Returns all objects for a given registry path.
|
List<T> |
getAllObjectsWithPropertyValue(String path,
String propName,
String value)
Returns all the objects in a given registry path with a given property values.
|
T |
getFirstObjectWithPropertyValue(String path,
String propName,
String value)
Returns the first object in a registry path with a given property value.
|
protected abstract T |
resourceToObject(org.wso2.carbon.registry.core.Resource resource)
Converts a registry resource to an object.
|
public List<T> getAllObjects(String path) throws org.wso2.carbon.identity.base.IdentityException
path
- registry pathorg.wso2.carbon.identity.base.IdentityException
- if an error occurs while reading the registrypublic List<T> getAllObjectsWithPropertyValue(String path, String propName, String value) throws org.wso2.carbon.identity.base.IdentityException
path
- registry pathpropName
- name of the property to be matchedvalue
- value of the property to be matchedorg.wso2.carbon.identity.base.IdentityException
- if an error occurs while reading the registrypublic T getFirstObjectWithPropertyValue(String path, String propName, String value) throws org.wso2.carbon.identity.base.IdentityException
path
- registry pathpropName
- name of the property to be matchedvalue
- value of the property to be matchedorg.wso2.carbon.identity.base.IdentityException
- if an error occurs while reading the registryprotected abstract T resourceToObject(org.wso2.carbon.registry.core.Resource resource)
resource
- registry resourceCopyright © 2019 WSO2. All rights reserved.