|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectthinkmap.datasource.relational.Binding<T>
public abstract class Binding<T>
Binding binds a value between a datasource and its input or output.
| Constructor Summary | |
|---|---|
Binding()
|
|
| Method Summary | |
|---|---|
abstract T |
bind(Message message,
SourceEntity entity,
EntityId id,
Object context)
|
protected T |
convertType(Object obj)
|
Class<T> |
getOutputType()
Get the type of object this binding will return, or null if no conversion will be performed. |
String |
getProperty()
Get the name of the property for this binding. |
String |
getProperty(Message message,
SourceEntity entity,
EntityId id,
Object context)
Get the name of the property for this binding. |
void |
setOutputType(Class<T> outputType)
Set the type of object this binding will return. |
void |
setProperty(String name)
Set the name of the property for this binding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Binding()
| Method Detail |
|---|
public abstract T bind(Message message,
SourceEntity entity,
EntityId id,
Object context)
throws BindingException
message - incoming messageentity - the entity being bound (may be null)id - the id of the entity being boundcontext - context object; datasource-specific
BindingException
public String getProperty(Message message,
SourceEntity entity,
EntityId id,
Object context)
throws BindingException
message - incoming messageentity - the entity being bound (may be null)id - the id of the entity being boundcontext - context object; datasource-specific
BindingExceptionpublic String getProperty()
public void setProperty(String name)
name - property namepublic Class<T> getOutputType()
public void setOutputType(Class<T> outputType)
outputType - output type
IllegalArgumentException - if outputType is unsupported
protected T convertType(Object obj)
throws BindingException
BindingException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||