T
- the remote view typepublic final class EntityEJBLocator<T extends EJBObject> extends EJBLocator<T>
Constructor and Description |
---|
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(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(EntityEJBLocator<T> original,
Affinity newAffinity)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
static <T extends EJBObject> |
create(Class<T> viewType,
EJBIdentifier identifier,
Object primaryKey,
Affinity affinity)
Construct a new instance.
|
boolean |
equals(EJBLocator<?> other)
Determine whether this object is equal to another.
|
boolean |
equals(EntityEJBLocator<?> other)
Determine whether this object is equal to another.
|
boolean |
equals(Object other)
Determine whether this object is equal to another.
|
Object |
getPrimaryKey()
Get the primary key for the referenced entity.
|
boolean |
isEntity()
Determine if this is an entity locator.
|
<S extends EJBObject> |
narrowAsEntity(Class<S> type)
Narrow this locator to the target type as a entity locator.
|
<S> EntityEJBLocator<? extends S> |
narrowTo(Class<S> type)
Narrow this locator to the target type.
|
String |
toString() |
EntityEJBLocator<T> |
withNewAffinity(Affinity affinity)
Create a copy of this locator, but with the new given affinity.
|
asStateful, asStateless, canNarrowTo, createProxyInstance, getAffinity, getAppName, getBeanName, getDistinctName, getIdentifier, getModuleName, getProxyClass, getProxyConstructor, getViewType, hashCode, isHome, isStateful, isStateless, narrowAsHome, narrowAsStateful, narrowAsStateless, withSession, withSessionAndAffinity
public EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, Object primaryKey)
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the bean nameprimaryKey
- the entity primary keypublic EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, Object primaryKey, Affinity affinity)
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the bean nameprimaryKey
- the entity primary keyaffinity
- the affinitypublic EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Object primaryKey)
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the bean namedistinctName
- the distinct nameprimaryKey
- the entity primary keypublic EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, String distinctName, Object primaryKey, Affinity affinity)
viewType
- the view typeappName
- the application namemoduleName
- the module namebeanName
- the bean namedistinctName
- the distinct nameprimaryKey
- the entity primary keyaffinity
- the affinitypublic EntityEJBLocator(Class<T> viewType, EJBIdentifier identifier, Object primaryKey, Affinity affinity)
viewType
- the view typeidentifier
- the EJB identifierprimaryKey
- the entity primary keyaffinity
- the affinitypublic EntityEJBLocator(Class<T> viewType, EJBIdentifier identifier, Object primaryKey)
viewType
- the view typeidentifier
- the EJB identifierprimaryKey
- the entity primary keypublic EntityEJBLocator(EntityEJBLocator<T> original, Affinity newAffinity)
original
- the original locatornewAffinity
- the new affinitypublic static <T extends EJBObject> EntityEJBLocator<T> create(Class<T> viewType, EJBIdentifier identifier, Object primaryKey, Affinity affinity)
T
- the remote view typeviewType
- the view type (must not be null
)identifier
- the EJB identifier (must not be null
)primaryKey
- the entity primary key (must not be null
)affinity
- the affinitynull
)public EntityEJBLocator<T> withNewAffinity(Affinity affinity)
EJBLocator
withNewAffinity
in class EJBLocator<T extends EJBObject>
affinity
- the new affinitypublic <S> EntityEJBLocator<? extends S> narrowTo(Class<S> type)
EJBLocator
narrowTo
in class EJBLocator<T extends EJBObject>
S
- the target typetype
- the target type classpublic <S extends EJBObject> EntityEJBLocator<? extends S> narrowAsEntity(Class<S> type)
EJBLocator
narrowAsEntity
in class EJBLocator<T extends EJBObject>
S
- the target typetype
- the target type classpublic boolean isEntity()
EJBLocator
EJBLocator.narrowAsEntity(Class)
will generally succeed.isEntity
in class EJBLocator<T extends EJBObject>
true
if this locator is an entity, false
otherwisepublic Object getPrimaryKey()
public boolean equals(Object other)
equals
in class EJBLocator<T extends EJBObject>
other
- the other objecttrue
if they are equal, false
otherwisepublic boolean equals(EJBLocator<?> other)
equals
in class EJBLocator<T extends EJBObject>
other
- the other objecttrue
if they are equal, false
otherwisepublic boolean equals(EntityEJBLocator<?> other)
other
- the other objecttrue
if they are equal, false
otherwisepublic String toString()
toString
in class EJBLocator<T extends EJBObject>
Copyright © 2017 JBoss by Red Hat. All rights reserved.