private static class TemporaryBuffer.ReferenceProxy
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Modifier and Type | Field and Description |
---|---|
private Temporary |
bound
The bound DMO proxy.
|
private TemporaryBuffer |
boundBuffer
The bound DMO buffer.
|
private java.util.Map<java.lang.String,java.lang.reflect.Method> |
boundGetterByProp
The bound DMO property getters.
|
private java.lang.String[] |
boundProperties
The bound DMO property names.
|
private java.util.Map<java.lang.String,java.lang.reflect.Method> |
boundSetterByProp
The bound DMO property setters.
|
private Temporary |
def
The definition-time DMO proxy.
|
private static java.util.Map<java.lang.String,java.lang.String> |
defaultProps
The default properties - PK and any other properties in
TempRecord . |
private TemporaryBuffer |
defBuffer
The buffer instance created at the definition time.
|
private java.util.Map<java.lang.reflect.Method,java.lang.String> |
defPropsByGetter
The DMO property getters to their property name.
|
private java.util.Map<java.lang.reflect.Method,java.lang.String> |
defPropsBySetter
The DMO property setters to their property name.
|
private boolean |
forceDefinition
Force the BUFFER and TEMP-TABLE to be returned from the definition, and not the bound buffer.
|
private java.util.Map<java.lang.String,java.lang.String> |
properties
A map of conversion-time (original) DMO property names to their runtime correspondents.
|
private java.util.Map<java.lang.String,java.lang.Integer> |
propertyIndexes
A map between the definition-time DMO properties and their indexes.
|
Constructor and Description |
---|
ReferenceProxy(Temporary def)
Create a new mutable proxy for the given definition-time DMO proxy.
|
Modifier and Type | Method and Description |
---|---|
Temporary |
bind(Temporary table)
Bind to the specified DMO proxy.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Proxy handler.
|
void |
unbind()
Unbind this mutable proxy.
|
private static final java.util.Map<java.lang.String,java.lang.String> defaultProps
TempRecord
.private final Temporary def
private final java.util.Map<java.lang.String,java.lang.Integer> propertyIndexes
private final TemporaryBuffer defBuffer
def
proxies.private java.util.Map<java.lang.reflect.Method,java.lang.String> defPropsBySetter
private java.util.Map<java.lang.reflect.Method,java.lang.String> defPropsByGetter
private Temporary bound
private java.lang.String[] boundProperties
private java.util.Map<java.lang.String,java.lang.reflect.Method> boundGetterByProp
private java.util.Map<java.lang.String,java.lang.reflect.Method> boundSetterByProp
private TemporaryBuffer boundBuffer
bound
proxies.private java.util.Map<java.lang.String,java.lang.String> properties
private boolean forceDefinition
public ReferenceProxy(Temporary def)
def
- The definition-type DMO proxy.public Temporary bind(Temporary table)
table
- The new DMO proxy to bound to.bound
DMO proxy.public void unbind()
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
bound
buffer and takes care of
translating bound buffer's properties to the definition properties (which exist in the
converted code).
Some method has special routing:
BufferReference.definition()
will always return the def
buffer.
BufferImpl.ref()
will always return the runtime instance for this
mutable proxy (bound
if set, otherwise def
).invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable