public abstract class AbstractJDBCResourceProvider<E extends Enum<E>> extends AbstractResourceProvider
AbstractResourceProvider.Command<T>keyPropertyIds, LOG, PROPERTIES_ATTRIBUTES_REGEX| Modifier | Constructor and Description |
|---|---|
protected |
AbstractJDBCResourceProvider(Set<String> propertyIds,
Map<Resource.Type,String> keyPropertyIds)
Create a new resource provider.
|
| Modifier and Type | Method and Description |
|---|---|
protected E |
getDBField(String propertyId)
Gets a db field corresponding to a property id.
|
protected abstract Map<String,E> |
getDBFieldMap()
Gets a map from property ids to db fields.
|
protected String |
getDBFieldString(Set<String> requestedIds)
Gets a comma-separated list of db fields corresponding to set of requested
ids.
|
protected void |
setInt(Resource resource,
String propertyId,
ResultSet rs,
Set<String> requestedIds)
Retrieves the db field corresponding to a property id from a result set as
an int and sets the resulting int as a resource property.
|
protected void |
setLong(Resource resource,
String propertyId,
ResultSet rs,
Set<String> requestedIds)
Retrieves the db field corresponding to a property id from a result set as
a long and sets the resulting long as a resource property.
|
protected void |
setString(Resource resource,
String propertyId,
ResultSet rs,
Set<String> requestedIds)
Retrieves the db field corresponding to a property id from a result set as
a string and sets the resulting string as a resource property.
|
addObserver, createResources, getConfigurationRequests, getKeyPropertyIds, getPKPropertyIds, getPropertyMaps, getPropertyMaps, getQueryParameterValue, getRequestStatus, getRequestStatus, getRequestStatus, getResources, modifyResources, notifyCreate, notifyDelete, notifyUpdate, parseProperties, updateObserverscheckCategory, checkConfigPropertyIds, checkPropertyIds, containsArguments, getCategoryIds, getPropertyIds, getRegexEntry, getRegexGroups, getRequestPropertyIds, isPatternKey, isPropertyCategoryRequested, isPropertyEntryRequested, isPropertyRequested, setResourcePropertyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckPropertyIds, createResources, deleteResources, getResources, updateResourcesprotected AbstractJDBCResourceProvider(Set<String> propertyIds, Map<Resource.Type,String> keyPropertyIds)
propertyIds - the property idskeyPropertyIds - the key property idsprotected abstract Map<String,E> getDBFieldMap()
protected void setString(Resource resource, String propertyId, ResultSet rs, Set<String> requestedIds) throws SQLException
resource - resource object to set the property onpropertyId - the property id to retrieve from the result setrs - the result setrequestedIds - the requested idsSQLException - if property id cannot be retrieved from the result setprotected void setInt(Resource resource, String propertyId, ResultSet rs, Set<String> requestedIds) throws SQLException
resource - resource object to set the property onpropertyId - the property id to retrieve from the result setrs - the result setrequestedIds - the requested idsSQLException - if property id cannot be retrieved from the result setprotected void setLong(Resource resource, String propertyId, ResultSet rs, Set<String> requestedIds) throws SQLException
resource - resource object to set the property onpropertyId - the property id to retrieve from the result setrs - the result setrequestedIds - the requested idsSQLException - if property id cannot be retrieved from the result setprotected String getDBFieldString(Set<String> requestedIds)
requestedIds - the requested idsCopyright © 2022 Apache Software Foundation. All rights reserved.