thinkmap.datasource.relational
Class AttributeBinding<T>

java.lang.Object
  extended by thinkmap.datasource.relational.Binding<T>
      extended by thinkmap.datasource.relational.AttributeBinding<T>
All Implemented Interfaces:
Serializable

public class AttributeBinding<T>
extends Binding<T>

A binding of a request attribute to a value.

Version:
$Revision: 1.11 $
See Also:
Serialized Form

Field Summary
protected  String attributeName
           
 
Constructor Summary
AttributeBinding()
          Creates a new AttributeBinding object.
AttributeBinding(String name)
          Creates a new AttributeBinding object that bind to the value of the specified request attribute.
 
Method Summary
 T bind(Message message, SourceEntity entity, EntityId id, Object context)
           
 String getAttribute()
          Get the name of the request attribute that this binds to.
 void setAttribute(String name)
          Set the name of the request attribute that this binds to.
 
Methods inherited from class thinkmap.datasource.relational.Binding
convertType, getOutputType, getProperty, getProperty, setOutputType, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributeName

protected String attributeName
Constructor Detail

AttributeBinding

public AttributeBinding()
Creates a new AttributeBinding object.


AttributeBinding

public AttributeBinding(String name)
Creates a new AttributeBinding object that bind to the value of the specified request attribute.

Parameters:
name - attribute name
Method Detail

setAttribute

public void setAttribute(String name)
Set the name of the request attribute that this binds to.

Parameters:
name - attribute name

getAttribute

public String getAttribute()
Get the name of the request attribute that this binds to.

Returns:
attribute name

bind

public T bind(Message message,
              SourceEntity entity,
              EntityId id,
              Object context)
       throws BindingException
Specified by:
bind in class Binding<T>
Parameters:
message - incoming message
entity - the entity being bound (may be null)
id - the id of the entity being bound
context - context object; datasource-specific
Returns:
value
Throws:
BindingException


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.