net.java.ao
Class EntityProxy<T extends RawEntity<K>,K>

java.lang.Object
  extended by net.java.ao.EntityProxy<T,K>
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class EntityProxy<T extends RawEntity<K>,K>
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Author:
Daniel Spiewak

Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 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)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void save(RawEntity entity)
           
 java.lang.String toStringImpl()
           
protected  void updateValues(java.util.Map<java.lang.String,java.lang.Object> updatedValues)
          Thread safely update the values with those provided.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

getKey

public K getKey()

save

public void save(RawEntity entity)
          throws java.sql.SQLException
Throws:
java.sql.SQLException

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

hashCodeImpl

public int hashCodeImpl()

equalsImpl

public boolean equalsImpl(RawEntity<K> proxy,
                          java.lang.Object obj)

toStringImpl

public java.lang.String toStringImpl()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

updateValues

protected void updateValues(java.util.Map<java.lang.String,java.lang.Object> updatedValues)
Thread safely update the values with those provided. This is only used by EntityManager.find(Class, String, Query), which should really move the leave the population of this class to itself.

Parameters:
updatedValues - mandatory


Copyright © 2007-2014. All Rights Reserved.