T - the type of EntityK - the primary key typepublic class ReadOnlyEntityProxy<T extends RawEntity<K>,K>
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
A read-only representation of a database row proxy, mapped to the specified Entity type.
This implementation is used for streaming and intended to be as lightweight as possible. It only supports getters
or designated Accessor methods. Calling setters or save will result in an exception. Other method calls will
be ignored.
As much as possible, reflection calls should be kept out of this implementation. If there is information needed about
the implemented type, please use EntityInfo to cache them.
TODO There is currently some overlap with EntityProxy. As soon as this is battle-hardened, these can be refactored
into an abstract superclass, for example.
| Constructor and Description |
|---|
ReadOnlyEntityProxy(EntityManager manager,
EntityInfo<T,K> entityInfo,
K key) |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(java.lang.String fieldName,
java.sql.ResultSet res) |
boolean |
equals(java.lang.Object obj) |
boolean |
equalsImpl(RawEntity<K> proxy,
java.lang.Object obj) |
K |
getKey() |
int |
hashCode() |
int |
hashCodeImpl() |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
java.lang.String |
toStringImpl() |
public ReadOnlyEntityProxy(EntityManager manager, EntityInfo<T,K> entityInfo, K key)
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerjava.lang.Throwablepublic void addValue(java.lang.String fieldName,
java.sql.ResultSet res)
throws java.sql.SQLException
java.sql.SQLExceptionpublic K getKey()
public int hashCodeImpl()
public java.lang.String toStringImpl()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2007-2018. All Rights Reserved.