Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.property
Class AbstractHierarchicalEntity

    java.lang.Object
      com.bea.p13n.property.AbstractConfigurableEntity
          com.bea.p13n.property.AbstractHierarchicalEntity

All Implemented Interfaces:
  ConfigurableEntity, HierarchicalEntity, Serializable

public abstract class AbstractHierarchicalEntity
extends AbstractConfigurableEntity
implements HierarchicalEntity

Lightweight implementation of HierarchicalEntity. Like AbstractConfigurableEntity, this does not provide any persistence for property values, and does not use property sets to validate property values or retrieve default property values. It provides successor functionality by storing references to its successor objects, rather than using the id's like the EJB implementation does. Any lightweight objects that require HierarchicalEntity functionality should extend this class.

See Also:
  Serialized Form

Field Summary

Fields inherited from class com.bea.p13n.property.AbstractConfigurableEntity
`CE_METHOD_CACHE, instanceClass, PREFIX_GET, PREFIX_SET, propertyCache, textFormatter`

Fields inherited from interface com.bea.p13n.property.HierarchicalEntity
`SUCCESSOR`

Fields inherited from interface com.bea.p13n.property.ConfigurableEntity
`RESERVED_PROPERTY_SET`

Constructor Summary
`AbstractHierarchicalEntity()`

Method Summary
`protected Object` | `getImplicitProperty(String propertySet, String propertyName)` Override ConfigurableEntity.getImplicitProperty to do a successor search if the property was not found in this entity
`protected Object` | `getImplicitProperty(String propertySet, String propertyName, ConfigurableEntity explicitSuccessor)`
`Object` | `getProperty(String propertySet, String propertyName, ConfigurableEntity successor)` Retrieve the value associated with the named key in the specified property set.
`String` | `getPropertyAsString(String propertySet, String propertyName, ConfigurableEntity successor)` Convenience method to return the property as a String.
`Object` | `getPropertyNoDefault(String propertySet, String propertyName, ConfigurableEntity successor)` Retrieve the value associated with the property in the specified property set, but does not return a default value from the property's PropertyDefinition if the property does not exist for the entity or in the hierarchy of successors.
`ConfigurableEntity` | `getSuccessor(String propertySet)` Retrieve the successor for the specified property set.
`void` | `removeSuccessor(String propertySet)` Remove the successor for the specified propertySet.
`void` | `setSuccessor(String propertySet, ConfigurableEntity successor)` This sets the successor for this object.

Methods inherited from class com.bea.p13n.property.AbstractConfigurableEntity
`createMapKey, getCachedProperty, getExplicitProperty, getExplicitSetter, getJndiName, getPkString, getProperty, getPropertyAsString, getPropertyCache, getPropertyNoDefault, getUniqueId, hasExplicitGetter, hasExplicitSetter, removeExplicitProperty, removeProperty, setExplicitProperty, setProperty, upcaseFirst`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.bea.p13n.property.ConfigurableEntity
`getJndiName, getPkString, getProperty, getPropertyAsString, getPropertyNoDefault, getUniqueId, removeProperty, setProperty`

Constructor Detail

### AbstractHierarchicalEntity

    public AbstractHierarchicalEntity()

Method Detail

### getImplicitProperty

    protected Object getImplicitProperty(String propertySet,
                                         String propertyName)
                                  throws RemoteException

  Override ConfigurableEntity.getImplicitProperty to do a successor search if the property was not found in this entity

  Overrides:
    `getImplicitProperty` in class `AbstractConfigurableEntity`
  Parameters:
    `propertySet` - The name of the property set
    `propertyName` - The name of the property to retrieve.
  Returns:
    the property value, or null if it was not found
  Throws:
    `RemoteException`

### getImplicitProperty

    protected Object getImplicitProperty(String propertySet,
                                         String propertyName,
                                         ConfigurableEntity explicitSuccessor)
                                  throws RemoteException

  Throws:
    `RemoteException`

### getProperty

    public Object getProperty(String propertySet,
                              String propertyName,
                              ConfigurableEntity successor)
                       throws RemoteException

  Retrieve the value associated with the named key in the specified property set. If the entity does not have a value defined for that property, the property will be searched * in the successor hiearchy using the explicit successor first and then the successor for the specified scope, and finally the entity's default successor. If this search does not return a value, the default value from the property set will be returned.

  Specified by:
    `getProperty` in interface `HierarchicalEntity`
  Parameters:
    `propertySet` - The name of the property set
    `propertyName` - The name of the property to retrieve.
    `successor` - The explicit successor to use for sucessor hiearchy search if the entity does not have the property defined.
  Throws:
    `RemoteException`

### getPropertyAsString

    public String getPropertyAsString(String propertySet,
                                      String propertyName,
                                      ConfigurableEntity successor)
                               throws RemoteException

  Convenience method to return the property as a String. Follows the same search order as the getProperty method.

  Specified by:
    `getPropertyAsString` in interface `HierarchicalEntity`
  Parameters:
    `propertySet` - The name of the property set
    `propertyName` - The name of the property to retrieve.
    `successor` - The explicit successor to use for sucessor hiearchy search if the entity does not have the property defined.
  Throws:
    `RemoteException`

### getPropertyNoDefault

    public Object getPropertyNoDefault(String propertySet,
                                       String propertyName,
                                       ConfigurableEntity successor)
                                throws RemoteException

  Retrieve the value associated with the property in the specified property set, but does not return a default value from the property's PropertyDefinition if the property does not exist for the entity or in the hierarchy of successors. This method is used by the implementation of the getProperty methods so that the search in the successor hierarchy does not return a default value from the PropertySet.

  Specified by:
    `getPropertyNoDefault` in interface `HierarchicalEntity`
  Parameters:
    `propertySet` - The name of the property set
    `propertyName` - The name of the property to retrieve.
    `successor` - The explicit successor to use for sucessor hiearchy search if the entity does not have the property defined.
  Throws:
    `RemoteException`

### getSuccessor

    public ConfigurableEntity getSuccessor(String propertySet)
                                    throws RemoteException

  Retrieve the successor for the specified property set.

  Specified by:
    `getSuccessor` in interface `HierarchicalEntity`
  Parameters:
    `propertySet` - The name of the property set
  Throws:
    `RemoteException`

### removeSuccessor

    public void removeSuccessor(String propertySet)
                         throws RemoteException

  Remove the successor for the specified propertySet.

  Specified by:
    `removeSuccessor` in interface `HierarchicalEntity`
  Parameters:
    `propertySet` - The name of the property set
  Throws:
    `RemoteException`

### setSuccessor

    public void setSuccessor(String propertySet,
                             ConfigurableEntity successor)
                      throws RemoteException

  This sets the successor for this object. This is used when resolving the getProperty.

  Specified by:
    `setSuccessor` in interface `HierarchicalEntity`
  Parameters:
    `successor` -
    `propertySet` - The name of the property set
  Throws:
    `RemoteException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| © 2004 BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved