jxl.vague
Class VagueContext<V extends VagueObject>

java.lang.Object
  extended by jxl.vague.VagueContext<V>
All Implemented Interfaces:
Searchable<V>

public final class VagueContext<V extends VagueObject>
extends java.lang.Object
implements Searchable<V>

VagueContext provides a means of peristing simple or nested bean property data, without creating a bean implementation.

All VagueContexts are paramaterized with a sub-interface of VagueObject. VagueContext uses this type to create and return implementation proxies to serve as a mediator between java bean property pattersn and persistent storage.

Author:
Alex Lynch
See Also:
VagueObject

Method Summary
static
<T extends VagueObject>
void
checkVagueType(java.lang.Class<T> type)
          Checks if type is a correctly formed VagueObject.
 boolean equals(java.lang.Object o)
           
 java.util.Collection<V> findAllObjects()
           
 V findObject(Search<V> s)
           
 java.util.Collection<V> findObjects(Search<V> s)
           
 java.util.Collection<V> findSomeObjects(LimitedSearch<V> ls)
           
static
<T extends VagueObject>
VagueContext<T>
getContext(javax.naming.Name context, java.lang.Class<T> vagueType, java.security.Permission check)
           
 int hashCode()
           
protected  V makeProxy(java.lang.String binding)
           
protected  java.lang.String netUniqueBinding()
           
 V newObject()
           
 int removeObjects(Search<V> s)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

checkVagueType

public static <T extends VagueObject> void checkVagueType(java.lang.Class<T> type)
                           throws java.lang.IllegalArgumentException,
                                  java.beans.IntrospectionException
Checks if type is a correctly formed VagueObject.

Parameters:
type - the VagueObject to check.
Throws:
java.lang.IllegalArgumentException - if type is not correctly formed. The exception will contain information about the problem.
java.beans.IntrospectionException - if a problem occurs during bean introspection.
See Also:
VagueObject

getContext

public static <T extends VagueObject> VagueContext<T> getContext(javax.naming.Name context,
                                                                 java.lang.Class<T> vagueType,
                                                                 java.security.Permission check)
                                                      throws VagueException
Throws:
VagueException

newObject

public V newObject()

makeProxy

protected V makeProxy(java.lang.String binding)

netUniqueBinding

protected java.lang.String netUniqueBinding()

findObject

public V findObject(Search<V> s)
Specified by:
findObject in interface Searchable<V extends VagueObject>

findAllObjects

public java.util.Collection<V> findAllObjects()

findObjects

public java.util.Collection<V> findObjects(Search<V> s)
Specified by:
findObjects in interface Searchable<V extends VagueObject>

findSomeObjects

public java.util.Collection<V> findSomeObjects(LimitedSearch<V> ls)
Specified by:
findSomeObjects in interface Searchable<V extends VagueObject>

removeObjects

public int removeObjects(Search<V> s)

hashCode

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

equals

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