java.lang.Object | |
↳ | com.google.gwt.requestfactory.shared.Locator<T, I> |
A Locator allows entity types that do not conform to the RequestFactory
entity protocol to be used. Instead of attempting to use a findFoo()
,
getId()
, and getVersion()
declared in the domain entity type,
an instance of a Locator will be created to provide implementations of these
methods.
Locator subtypes must be default instantiable (i.e. public static types with a no-arg constructor). Instances of Locators may be retained and reused by the RequestFactory service layer.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new instance of the requested type.
| |||||||||||
Retrieve an object.
| |||||||||||
Returns the
T type. | |||||||||||
Returns a domain object to be used as the id for the given object.
| |||||||||||
Returns the
I type. | |||||||||||
Returns a domain object to be used as the version for the given object.
| |||||||||||
Returns a value indicating if the domain object should no longer be
considered accessible.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a new instance of the requested type.
clazz | the type of object to create |
---|
Retrieve an object. May return null
to indicate that the requested
object could not be found.
clazz | the type of object to retrieve |
---|---|
id | an id previously returned from getId(Object) |
null
if it could not be found
Returns a domain object to be used as the id for the given object. This
method may return null
if the object has not been persisted or
should be treated as irretrievable.
domainObject | the object to obtain an id for |
---|
null
Returns a domain object to be used as the version for the given object.
This method may return null
if the object has not been persisted or
should be treated as irretrievable.
domainObject | the object to obtain an id for |
---|
null
Returns a value indicating if the domain object should no longer be considered accessible. This method might return false if the record underlying the domain object had been deleted as a side-effect of processing a request.
The default implementation of this method uses getId(Object)
and
find(Class, Object)
to determine if an object can be retrieved.