Joda System API

org.joda.property.type
Interface LinkProperty

All Superinterfaces:
LinkingProperty, ModelElement, Property, java.io.Serializable
All Known Implementing Classes:
DefaultLinkProperty

public interface LinkProperty
extends LinkingProperty

Interface for a LinkProperty that expresses a link between one Bean and another.

Author:
Stephen Colebourne

Nested Class Summary
 
Nested classes inherited from class org.joda.property.Property
Property.Internal
 
Method Summary
 Bean getBean()
          Get the Bean that is currently linked, or null.
 Bean getBean(boolean createIfNull)
          Get the Bean that is currently linked, optionally creating it.
 void set(java.lang.Object object)
          Set the Bean that is currently linked, or null to break the link.
 Bean setNew()
          Create a new Bean of the correct type replacing the current underlying node in the node tree.
 Bean setNew(java.lang.Class intface)
          Create a new Bean of a specific type replacing the the current underlying node in the node tree.
 
Methods inherited from interface org.joda.property.type.LinkingProperty
getBeanList
 
Methods inherited from interface org.joda.property.Property
addPropertyChangeListener, bean, equals, equalsValue, firePropertyChange, getContentName, getContentType, getPropertyName, getPropertyType, hashCode, isModifiable, isNull, isReadOnly, removePropertyChangeListener, setModifiable, setReadOnly, toObject, toString
 
Methods inherited from interface org.joda.property.ModelElement
getAttribute, getAttributeCount, getAttributeMap, setAttribute
 

Method Detail

getBean

public Bean getBean()
Get the Bean that is currently linked, or null.

Returns:
the linked bean

getBean

public Bean getBean(boolean createIfNull)
Get the Bean that is currently linked, optionally creating it.

Parameters:
createIfNull - create a new bean if one does not exist
Returns:
the linked bean

set

public void set(java.lang.Object object)
Set the Bean that is currently linked, or null to break the link.

This method only accepts objects of the correct type.

Specified by:
set in interface Property
Parameters:
object - an Object to set the property's value to

setNew

public Bean setNew()
Create a new Bean of the correct type replacing the current underlying node in the node tree.

Returns:
the object created

setNew

public Bean setNew(java.lang.Class intface)
Create a new Bean of a specific type replacing the the current underlying node in the node tree. The interface must be the same or a subinterface of the type of the Bean.

Parameters:
intface - the interface to create a Bean for
Returns:
the object created

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.