|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derbyTesting.functionTests.tests.jdbcapi.DataSourceReferenceTest.DataSourceDescriptor
private static class DataSourceReferenceTest.DataSourceDescriptor
A class describing the bean properties of a data source.
A data source is a class implementing
javax.sql.CommonDataSource.
The data source description consists of the following:
| Field Summary | |
|---|---|
private java.lang.String |
dsName
Name of the description. |
private java.util.Properties |
propertyDefaults
Default values for bean properties having a default. |
private java.util.Properties |
propertyValues
Set values for the data source being described. |
| Constructor Summary | |
|---|---|
DataSourceReferenceTest.DataSourceDescriptor(java.lang.String dsName)
Creates a new data source description. |
|
DataSourceReferenceTest.DataSourceDescriptor(java.lang.String dsName,
DataSourceReferenceTest.DataSourceDescriptor copyFrom)
Creates a new data source description, based off an existing description. |
|
| Method Summary | |
|---|---|
(package private) void |
addProperty(java.lang.String name,
java.lang.String value)
Adds a property to the description, with a value and no associated default value. |
(package private) void |
addProperty(java.lang.String name,
java.lang.String value,
java.lang.String defaultValue)
Adds a property to the description, with a value and an associated default value. |
(package private) java.lang.String |
getName()
Returns the convenience name of this descriptor. |
(package private) int |
getPropertyCount()
Returns the number of bean properties defined by this descriptor. |
(package private) java.lang.String |
getPropertyDefault(java.lang.String name)
Returns the default value for the specified property. |
(package private) java.util.Iterator |
getPropertyIterator()
Returns an iterator over all bean property names. |
(package private) java.lang.String |
getPropertyValue(java.lang.String name)
Returns the value of the specified property. |
(package private) boolean |
hasProperty(java.lang.String name)
Tells if the specified property is defined by this descriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final java.lang.String dsName
private final java.util.Properties propertyValues
Note that the keys of this property object describe which bean properties exist for the data source.
private final java.util.Properties propertyDefaults
Note that not all properties have a default, and the data source may therefore have more properties than there entries in this list of properties.
| Constructor Detail |
|---|
DataSourceReferenceTest.DataSourceDescriptor(java.lang.String dsName)
dsName - convenience name for the description/source
DataSourceReferenceTest.DataSourceDescriptor(java.lang.String dsName,
DataSourceReferenceTest.DataSourceDescriptor copyFrom)
All properties and values defined in the existing descriptor will also be defined in the new descriptor.
dsName - convenience name for the description/sourcecopyFrom - existing descriptor to copy properties/values from| Method Detail |
|---|
java.lang.String getName()
void addProperty(java.lang.String name,
java.lang.String value)
name - property namevalue - property value
java.lang.NullPointerException - if name or
value is null
void addProperty(java.lang.String name,
java.lang.String value,
java.lang.String defaultValue)
name - property namevalue - property valuedefaultValue - default property value
java.lang.NullPointerException - if name, value
or defaultValue is nulljava.lang.String getPropertyValue(java.lang.String name)
name - property name
java.lang.NullPointerException - if name is
null
AssertionFailedError - if the property name is not defined by
this descriptorjava.lang.String getPropertyDefault(java.lang.String name)
name - property name
null if a default
value is not specified.
- Throws:
java.lang.NullPointerException - if name is
null
AssertionFailedError - if the property name is not defined by
this descriptorjava.util.Iterator getPropertyIterator()
boolean hasProperty(java.lang.String name)
name - property name
true if defined, false if not.int getPropertyCount()
|
Built on Sat 2009-11-28 18:44:18-0800, from revision 885187 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||