站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

JDBCLoadEntityCommand (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.ejb.plugins.cmp.jdbc
Class JDBCLoadEntityCommand

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand

public final class JDBCLoadEntityCommand
extends Object

JDBCLoadEntityCommand loads the data for an instance from the table. This command implements specified eager loading. For CMP 2.x, the entity can be configured to only load some of the fields, which is helpful for entitys with lots of data.

Version:
$Revision: 1.36.2.1 $
Author:
Dain Sundstrom, Oleg Nitz, Rickard 锟絙erg, Marc Fleury, Joe Shevland, Justin Forder, Dirk Zimmermann, danch (Dan Christopherson), Alexey Loubyansky

Constructor Summary
JDBCLoadEntityCommand(JDBCStoreManager manager)
           
 
Method Summary
 boolean execute(EntityEnterpriseContext ctx, boolean failIfNotFound)
          Loads entity.
 void execute(JDBCCMPFieldBridge requiredField, EntityEnterpriseContext ctx)
          Loads entity or required field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCLoadEntityCommand

public JDBCLoadEntityCommand(JDBCStoreManager manager)
                      throws org.jboss.deployment.DeploymentException
Method Detail

execute

public boolean execute(EntityEnterpriseContext ctx,
                       boolean failIfNotFound)
Loads entity. If failIfNotFound is true and entity wasn't found then NoSuchEntityException is thrown. Otherwise, if entity wasn't found, returns false. If entity was loaded successfully return true.

Parameters:
ctx - - entity context;
failIfNotFound - - whether to fail if entity wasn't found;
Returns:
true if entity was loaded, false - otherwise.

execute

public void execute(JDBCCMPFieldBridge requiredField,
                    EntityEnterpriseContext ctx)
Loads entity or required field. If entity not found throws NoSuchEntityException.

Parameters:
requiredField - - required field or null;
ctx - - the corresponding context;


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.