org.apache.ojb.broker.metadata
Class DescriptorBase

java.lang.Object
  extended byorg.apache.ojb.broker.metadata.DescriptorBase
All Implemented Interfaces:
AttributeContainer, java.io.Serializable
Direct Known Subclasses:
ArgumentDescriptor, AttributeDescriptorBase, ClassDescriptor, DescriptorRepository, JdbcConnectionDescriptor, ProcedureDescriptor

class DescriptorBase
extends java.lang.Object
implements AttributeContainer, java.io.Serializable

base class for all Descriptors. It is used to implement the AttributeContainer interface which provides mechanics for user defined attributes.

Author:
Thomas Mahler

Field Summary
(package private) static long serialVersionUID
           
 
Constructor Summary
DescriptorBase()
          Constructor for DescriptorBase.
 
Method Summary
 void addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
          Store the specified attribute and it's value.
 java.lang.String getAttribute(java.lang.String attributeName)
          Get the value of an attribute
 java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)
          Get the value of an attribute
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

DescriptorBase

public DescriptorBase()
Constructor for DescriptorBase.

Method Detail

addAttribute

public void addAttribute(java.lang.String attributeName,
                         java.lang.String attributeValue)
Description copied from interface: AttributeContainer
Store the specified attribute and it's value.

Specified by:
addAttribute in interface AttributeContainer
Parameters:
attributeName - the name of the attribute to retrieve
attributeValue - the attribute's value
See Also:
AttributeContainer.addAttribute(String, String)

getAttribute

public java.lang.String getAttribute(java.lang.String attributeName,
                                     java.lang.String defaultValue)
Description copied from interface: AttributeContainer
Get the value of an attribute

Specified by:
getAttribute in interface AttributeContainer
Parameters:
attributeName - the attribute to retrieve
defaultValue - the value to return if the attribute is not present
Returns:
the attribute value
See Also:
AttributeContainer.getAttribute(String, String)

getAttribute

public java.lang.String getAttribute(java.lang.String attributeName)
Description copied from interface: AttributeContainer
Get the value of an attribute

Specified by:
getAttribute in interface AttributeContainer
Parameters:
attributeName - the attribute to retrieve
Returns:
the attribute value
See Also:
AttributeContainer.getAttribute(String)

toString

public java.lang.String toString()


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14