Package org.jboss.ejb.client
Class EntityEJBLocator<T extends jakarta.ejb.EJBObject>
java.lang.Object
org.jboss.ejb.client.EJBLocator<T>
org.jboss.ejb.client.EntityEJBLocator<T>
- Type Parameters:
T- the remote view type
- All Implemented Interfaces:
Serializable
A locator for an entity Enterprise Bean.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, Object primaryKey) Construct a new instance.EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, Object primaryKey, Affinity affinity) Construct a new instance.EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Object primaryKey) Construct a new instance.EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Object primaryKey, Affinity affinity) Construct a new instance.EntityEJBLocator(Class<T> viewType, EJBIdentifier identifier, Object primaryKey) Construct a new instance.EntityEJBLocator(Class<T> viewType, EJBIdentifier identifier, Object primaryKey, Affinity affinity) Construct a new instance.EntityEJBLocator(EntityEJBLocator<T> original, Affinity newAffinity) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends jakarta.ejb.EJBObject>
EntityEJBLocator<T>create(Class<T> viewType, EJBIdentifier identifier, Object primaryKey, Affinity affinity) Construct a new instance.booleanDetermine whether this object is equal to another.booleanequals(EJBLocator<?> other) Determine whether this object is equal to another.booleanequals(EntityEJBLocator<?> other) Determine whether this object is equal to another.Get the primary key for the referenced entity.booleanisEntity()Determine if this is an entity locator.<S extends jakarta.ejb.EJBObject>
EntityEJBLocator<? extends S>narrowAsEntity(Class<S> type) Narrow this locator to the target type as a entity locator.<S> EntityEJBLocator<? extends S>Narrow this locator to the target type.toString()withNewAffinity(Affinity affinity) Create a copy of this locator, but with the new given affinity.Methods inherited from class org.jboss.ejb.client.EJBLocator
asStateful, asStateless, canNarrowTo, createProxyInstance, getAffinity, getAppName, getBeanName, getDistinctName, getIdentifier, getModuleName, getProxyClass, getProxyConstructor, getViewType, hashCode, isHome, isStateful, isStateless, narrowAsHome, narrowAsStateful, narrowAsStateless, withSession, withSessionAndAffinity
-
Constructor Details
-
EntityEJBLocator
public EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, Object primaryKey) Construct a new instance.- Parameters:
viewType- the view typeappName- the application namemoduleName- the module namebeanName- the bean nameprimaryKey- the entity primary key
-
EntityEJBLocator
public EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, Object primaryKey, Affinity affinity) Construct a new instance.- Parameters:
viewType- the view typeappName- the application namemoduleName- the module namebeanName- the bean nameprimaryKey- the entity primary keyaffinity- the affinity
-
EntityEJBLocator
public EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Object primaryKey) Construct a new instance.- Parameters:
viewType- the view typeappName- the application namemoduleName- the module namebeanName- the bean namedistinctName- the distinct nameprimaryKey- the entity primary key
-
EntityEJBLocator
public EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Object primaryKey, Affinity affinity) Construct a new instance.- Parameters:
viewType- the view typeappName- the application namemoduleName- the module namebeanName- the bean namedistinctName- the distinct nameprimaryKey- the entity primary keyaffinity- the affinity
-
EntityEJBLocator
public EntityEJBLocator(Class<T> viewType, EJBIdentifier identifier, Object primaryKey, Affinity affinity) Construct a new instance.- Parameters:
viewType- the view typeidentifier- the Enterprise Beans identifierprimaryKey- the entity primary keyaffinity- the affinity
-
EntityEJBLocator
Construct a new instance.- Parameters:
viewType- the view typeidentifier- the Enterprise Beans identifierprimaryKey- the entity primary key
-
EntityEJBLocator
Construct a new instance. This constructor creates a copy of the original locator, but with a new affinity.- Parameters:
original- the original locatornewAffinity- the new affinity
-
-
Method Details
-
create
public static <T extends jakarta.ejb.EJBObject> EntityEJBLocator<T> create(Class<T> viewType, EJBIdentifier identifier, Object primaryKey, Affinity affinity) Construct a new instance.- Type Parameters:
T- the remote view type- Parameters:
viewType- the view type (must not benull)identifier- the Enterprise Beans identifier (must not benull)primaryKey- the entity primary key (must not benull)affinity- the affinity- Returns:
- the new instance (not
null)
-
withNewAffinity
Description copied from class:EJBLocatorCreate a copy of this locator, but with the new given affinity.- Specified by:
withNewAffinityin classEJBLocator<T extends jakarta.ejb.EJBObject>- Parameters:
affinity- the new affinity- Returns:
- the new locator
-
narrowTo
Description copied from class:EJBLocatorNarrow this locator to the target type.- Overrides:
narrowToin classEJBLocator<T extends jakarta.ejb.EJBObject>- Type Parameters:
S- the target type- Parameters:
type- the target type class- Returns:
- this instance, narrowed to the given type
-
narrowAsEntity
public <S extends jakarta.ejb.EJBObject> EntityEJBLocator<? extends S> narrowAsEntity(Class<S> type) Description copied from class:EJBLocatorNarrow this locator to the target type as a entity locator.- Overrides:
narrowAsEntityin classEJBLocator<T extends jakarta.ejb.EJBObject>- Type Parameters:
S- the target type- Parameters:
type- the target type class- Returns:
- this instance, narrowed to the given type and cast as a entity locator
-
isEntity
public boolean isEntity()Description copied from class:EJBLocatorDetermine if this is an entity locator. If so, calls toEJBLocator.narrowAsEntity(Class)will generally succeed.- Overrides:
isEntityin classEJBLocator<T extends jakarta.ejb.EJBObject>- Returns:
trueif this locator is an entity,falseotherwise
-
getPrimaryKey
Get the primary key for the referenced entity.- Returns:
- the primary key for the referenced entity
-
equals
Determine whether this object is equal to another.- Overrides:
equalsin classEJBLocator<T extends jakarta.ejb.EJBObject>- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
Determine whether this object is equal to another.- Overrides:
equalsin classEJBLocator<T extends jakarta.ejb.EJBObject>- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
equals
Determine whether this object is equal to another.- Parameters:
other- the other object- Returns:
trueif they are equal,falseotherwise
-
toString
- Overrides:
toStringin classEJBLocator<T extends jakarta.ejb.EJBObject>
-