public abstract class

IdFactory

extends Object
java.lang.Object
   ↳ com.google.gwt.requestfactory.shared.impl.IdFactory
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Handles common code for creating SimpleProxyIds.

Summary

Public Constructors
IdFactory()
Public Methods
<P extends BaseProxy> SimpleProxyId<P> allocateId(Class<P> clazz)
Allocates an ephemeral proxy id.
<P extends BaseProxy> SimpleProxyId<P> allocateSyntheticId(Class<P> clazz, int syntheticId)
Allocates a synthetic proxy id.
<P extends EntityProxy> Class<P> asEntityProxy(Class<? extends BaseProxy> clazz)
A utility function to handle generic type conversion.
<P extends ValueProxy> Class<P> asValueProxy(Class<? extends BaseProxy> clazz)
A utility function to handle generic type conversion.
<P extends BaseProxy> SimpleProxyId<P> getBaseProxyId(String historyToken)
String getHistoryToken(SimpleProxyId<?> proxy)
<P extends BaseProxy> SimpleProxyId<P> getId(String typeToken, String serverId)
Create or retrieve a SimpleProxyId.
<P extends BaseProxy> SimpleProxyId<P> getId(Class<P> clazz, String serverId, int clientId)
Create or retrieve a SimpleProxyId.
<P extends BaseProxy> SimpleProxyId<P> getId(String typeToken, String serverId, int clientId)
Create or retrieve a SimpleEntityProxyId.
abstract boolean isEntityType(Class<?> clazz)
abstract boolean isValueType(Class<?> clazz)
Protected Methods
abstract <P extends BaseProxy> Class<P> getTypeFromToken(String typeToken)
abstract String getTypeToken(Class<? extends BaseProxy> clazz)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public IdFactory ()

Public Methods

public SimpleProxyId<P> allocateId (Class<P> clazz)

Allocates an ephemeral proxy id. This object is only valid for the lifetime of the RequestFactory.

public SimpleProxyId<P> allocateSyntheticId (Class<P> clazz, int syntheticId)

Allocates a synthetic proxy id. This object is only valid for the lifetime of a request.

public Class<P> asEntityProxy (Class<? extends BaseProxy> clazz)

A utility function to handle generic type conversion. This method will also assert that clazz is actually an EntityProxy type.

public Class<P> asValueProxy (Class<? extends BaseProxy> clazz)

A utility function to handle generic type conversion. This method will also assert that clazz is actually a ValueProxy type.

public SimpleProxyId<P> getBaseProxyId (String historyToken)

public String getHistoryToken (SimpleProxyId<?> proxy)

public SimpleProxyId<P> getId (String typeToken, String serverId)

Create or retrieve a SimpleProxyId.

public SimpleProxyId<P> getId (Class<P> clazz, String serverId, int clientId)

Create or retrieve a SimpleProxyId. If both the serverId and clientId are specified and the id is ephemeral, it will be updated with the server id.

public SimpleProxyId<P> getId (String typeToken, String serverId, int clientId)

Create or retrieve a SimpleEntityProxyId. If both the serverId and clientId are specified and the id is ephemeral, it will be updated with the server id.

public abstract boolean isEntityType (Class<?> clazz)

public abstract boolean isValueType (Class<?> clazz)

Protected Methods

protected abstract Class<P> getTypeFromToken (String typeToken)

protected abstract String getTypeToken (Class<? extends BaseProxy> clazz)