thinkmap.datasource.relational
Class EntityIdBinding<T>

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

public class EntityIdBinding<T>
extends Binding<T>

A binding to a value that is in an Entity's id.

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

Field Summary
protected  int keyIndex
           
 
Constructor Summary
EntityIdBinding()
          Creates a new EntityIdArgumentBinding object.
EntityIdBinding(int keyIndex)
          Creates a new EntityIdArgumentBinding object that will bind to the value of the specified key.
 
Method Summary
 T bind(Message message, SourceEntity entity, EntityId id, Object ctx)
           
 int getKeyIndex()
          Get the index of the key this binds to.
 void setKeyIndex(int i)
          Set the index of this key 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

keyIndex

protected int keyIndex
Constructor Detail

EntityIdBinding

public EntityIdBinding()
Creates a new EntityIdArgumentBinding object.


EntityIdBinding

public EntityIdBinding(int keyIndex)
Creates a new EntityIdArgumentBinding object that will bind to the value of the specified key.

Parameters:
keyIndex - index of desired key
Method Detail

getKeyIndex

public int getKeyIndex()
Get the index of the key this binds to.

Returns:
key index

setKeyIndex

public void setKeyIndex(int i)
Set the index of this key this binds to.

Parameters:
i - key index

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.