com.avaje.ebean
Class LookupEntry

java.lang.Object
  extended by com.avaje.ebean.LookupEntry
All Implemented Interfaces:
java.io.Serializable

public final class LookupEntry
extends java.lang.Object

    
implements java.io.Serializable

    

Holds the key value pair in a Lookup. Can additionally hold the source object/bean that was used to create the entry.

See Also:
Serialized Form

Constructor Summary
LookupEntry(java.lang.Object key, java.lang.Object value)
          Create an entry.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Return true if the object is a LookupEntry with the same key.
 java.lang.Object getKey()
          Return the key.
 java.lang.Object getSource()
          You can choose to keep the source of the lookup key and value.
 java.lang.Object getValue()
          Return the value.
 int hashCode()
          Return a hashCode of the entry.
 void setSource(java.lang.Object source)
          Set the source object used to create this entry.
 java.lang.String toString()
          A description of this entry.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LookupEntry

public LookupEntry(java.lang.Object key,
                   java.lang.Object value)
Create an entry.

Method Detail

getKey

public java.lang.Object getKey()
Return the key.


getValue

public java.lang.Object getValue()
Return the value.


getSource

public java.lang.Object getSource()
You can choose to keep the source of the lookup key and value. For example, the source can contain the bean used to create this entry.

Refer to the protected DbLookup.isKeepBeanList field.


setSource

public void setSource(java.lang.Object source)
Set the source object used to create this entry. If you set DbLookup.isKeepBeanList the beans are put in here.


equals

public boolean equals(java.lang.Object obj)
Return true if the object is a LookupEntry with the same key.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Return a hashCode of the entry.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
A description of this entry.

Overrides:
toString in class java.lang.Object