Class EntityEJBLocator<T extends javax.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

public final class EntityEJBLocator<T extends javax.ejb.EJBObject> extends EJBLocator<T>
A locator for an entity Enterprise Bean.
See Also:
  • Constructor Details

    • EntityEJBLocator

      public EntityEJBLocator(Class<T> viewType, String appName, String moduleName, String beanName, Object primaryKey)
      Construct a new instance.
      Parameters:
      viewType - the view type
      appName - the application name
      moduleName - the module name
      beanName - the bean name
      primaryKey - 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 type
      appName - the application name
      moduleName - the module name
      beanName - the bean name
      primaryKey - the entity primary key
      affinity - 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 type
      appName - the application name
      moduleName - the module name
      beanName - the bean name
      distinctName - the distinct name
      primaryKey - 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 type
      appName - the application name
      moduleName - the module name
      beanName - the bean name
      distinctName - the distinct name
      primaryKey - the entity primary key
      affinity - the affinity
    • EntityEJBLocator

      public EntityEJBLocator(Class<T> viewType, EJBIdentifier identifier, Object primaryKey, Affinity affinity)
      Construct a new instance.
      Parameters:
      viewType - the view type
      identifier - the Enterprise Beans identifier
      primaryKey - the entity primary key
      affinity - the affinity
    • EntityEJBLocator

      public EntityEJBLocator(Class<T> viewType, EJBIdentifier identifier, Object primaryKey)
      Construct a new instance.
      Parameters:
      viewType - the view type
      identifier - the Enterprise Beans identifier
      primaryKey - the entity primary key
    • EntityEJBLocator

      public EntityEJBLocator(EntityEJBLocator<T> original, Affinity newAffinity)
      Construct a new instance. This constructor creates a copy of the original locator, but with a new affinity.
      Parameters:
      original - the original locator
      newAffinity - the new affinity
  • Method Details

    • create

      public static <T extends javax.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 be null)
      identifier - the Enterprise Beans identifier (must not be null)
      primaryKey - the entity primary key (must not be null)
      affinity - the affinity
      Returns:
      the new instance (not null)
    • withNewAffinity

      public EntityEJBLocator<T> withNewAffinity(Affinity affinity)
      Description copied from class: EJBLocator
      Create a copy of this locator, but with the new given affinity.
      Specified by:
      withNewAffinity in class EJBLocator<T extends javax.ejb.EJBObject>
      Parameters:
      affinity - the new affinity
      Returns:
      the new locator
    • narrowTo

      public <S> EntityEJBLocator<? extends S> narrowTo(Class<S> type)
      Description copied from class: EJBLocator
      Narrow this locator to the target type.
      Overrides:
      narrowTo in class EJBLocator<T extends javax.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 javax.ejb.EJBObject> EntityEJBLocator<? extends S> narrowAsEntity(Class<S> type)
      Description copied from class: EJBLocator
      Narrow this locator to the target type as a entity locator.
      Overrides:
      narrowAsEntity in class EJBLocator<T extends javax.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: EJBLocator
      Determine if this is an entity locator. If so, calls to EJBLocator.narrowAsEntity(Class) will generally succeed.
      Overrides:
      isEntity in class EJBLocator<T extends javax.ejb.EJBObject>
      Returns:
      true if this locator is an entity, false otherwise
    • getPrimaryKey

      public Object getPrimaryKey()
      Get the primary key for the referenced entity.
      Returns:
      the primary key for the referenced entity
    • equals

      public boolean equals(Object other)
      Determine whether this object is equal to another.
      Overrides:
      equals in class EJBLocator<T extends javax.ejb.EJBObject>
      Parameters:
      other - the other object
      Returns:
      true if they are equal, false otherwise
    • equals

      public boolean equals(EJBLocator<?> other)
      Determine whether this object is equal to another.
      Overrides:
      equals in class EJBLocator<T extends javax.ejb.EJBObject>
      Parameters:
      other - the other object
      Returns:
      true if they are equal, false otherwise
    • equals

      public boolean equals(EntityEJBLocator<?> other)
      Determine whether this object is equal to another.
      Parameters:
      other - the other object
      Returns:
      true if they are equal, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class EJBLocator<T extends javax.ejb.EJBObject>