thinkmap.datasource.relational
Class ConstantBinding<T>

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

public class ConstantBinding<T>
extends Binding<T>

A binding that returns a constant value.

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

Constructor Summary
ConstantBinding()
           
ConstantBinding(T value)
           
 
Method Summary
 T bind(Message message, SourceEntity entity, EntityId id, Object ctx)
           
 String getValue()
          Get the value
 void setValue(String value)
          Set the value.
 
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
 

Constructor Detail

ConstantBinding

public ConstantBinding()

ConstantBinding

public ConstantBinding(T value)
Method Detail

setValue

public void setValue(String value)
              throws BindingException
Set the value.

Parameters:
value�value -
Throws:
BindingException

getValue

public String getValue()
Get the value


bind

public T bind(Message message,
              SourceEntity entity,
              EntityId id,
              Object ctx)
       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
ctx - context object; datasource-specific
Returns:
value
Throws:
BindingException


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.