现在,让我们回到查找器方法。
Dynamic finder methods and __callstatic.
动态finder方法和__ callstatic。
Finder methods can have any input parameters.
查找器方法可以拥有任意输入参数。
I refer to these as finder methods or finders.
我将之称为查找器方法或查找器。
All finder methods are handled by the container.
所有的查找器方法都由容器来处理。
SQL or EJB-QL that is needed to implement custom finder methods.
SQL或者EJB - QL,用来实现定制查找程序方法。
The data Access Object got several finder methods to query the database.
数据访问对象(Data Access Object)有一些搜索方法以查询数据库。
The example below shows two finder methods and the FinderHelper interface.
该示例显示了两个查找器方法以及FinderHelper接口。
It also offers dynamic finder methods and auto-generates the JUnit integration tests.
它还提供了动态查找方法并能自动产生JUnit集成测试。
Define an interface that extends GenericDao and contains any finder methods you need.
定义一个接口,它扩展GenericDao并包含所需的任何查找器方法。
A drawback is that you cannot have complex queries defined in your finder methods.
缺点是您不能使用在finder方法中定义的复杂查询。
Implementation of EJB finder methods in the bean class is not supported by this runtime.
这个运行时不支持bean类中的EJBfinder方法实现。
Finder methods return the bean's Remote interface or an enumeration of Remote interfaces.
查找器方法返回bean的Remote接口或一个Remote接口的枚举。
As a result the editor supports code completion of dynamic methods such as finder methods.
这样做带来的结果是:对诸如finder方法之类的动态方法,编辑器也能够实现代码自动完成功能。
The last mapping we need is between the finder methods and the result rows in the database.
最后我们需要在查找器方法与数据库中的结果行之间建立映射。
In WAS, this is handled by defining finder methods on the Home interface called custom finders.
在WAS 中,这是通过在Home接口上定义名为定制查找器的查找器方法实现的。
Now look at the FinderHelper interface that is used in conjunction with these two finder methods.
现在来看一下FinderHelper接口,该接口与这两个查找器方法一起联合使用。
A cool feature often provided in active record design pattern implementations is dynamic finder methods.
活动记录设计模式实现内经常提供的一个很棒的特性是动态finder方法。
I conclude my discussion with a look at the code (written just once!) that executes my finder methods.
查看执行查找器方法的代码(只编写了一次!)来结束我的讨论。
The concrete DAO for the Person entity class should add finder methods that are specific to the Person entity.
Person实体类的具体DAO应该增加一个特定于Person实体的finder方法。
In my DAO implementation, I use introductions to add a number of finder methods to my existing generic DAO class.
在我的DAO实现中,我使用introductions将许多查找器方法添加到现有泛型dao类中。
Each of these finder methods will accept different parameters, and each may return one errand or multiple errands.
这些查找器方法中的每一个都将接受不同的参数,每一个都可以返回一个或多个差事。
Finally, note that other custom finder methods (unrelated to a CMR) are handled in the same manner as the method shown below.
最后请注意,其他自定义查找程序方法(与CMR不相关)将按照处理以下方法的方式进行类似的处理。
Because the finder methods are specific to each domain object, they are applied to the typed interfaces of the generic DAO.
因为查找器方法是特定于每个域对象的,因此将其应用于泛型DAO的类型化接口。
Finder methods declared in the EJBHome interface of a bean must be associated with a query that is typically defined in another file.
在bean的EJBHome接口中声明的finder方法必须与一个查询相关联,查询通常在另一个文件中定义。
You see that it defines how to map each method to a particular table and column and specifies which columns are primary keys, finder methods, and so on.
从这段代码中可以看出,它定义了如何将一个方法映射到一个特定的表和列上,并指定哪些列是主键、查找方法,等等。
One such property is collection Increment, which allows you to define the size of the collection returned when calling EJB entity multi-finder methods.
其中一个属性是CollectionIncrement,它允许定义调用e JB实体multi - finder方法时返回的集合大小。
Enhydra requires that the XML deployment descriptor contains a finder-method-jdbc-mapping element matching the finder methods declared in the EJBHome etc.
Enhydra要求XML部署描述符包含与在EJBHome等中声明的finder方法一致的finder -方法- jdbc -映射元素。
Finally, the third and most interesting bean wraps the vanilla instance of GenericDaoHibernateImpl in a proxy, giving it the ability to execute finder methods.
最后,第三个也是最有趣的bean将GenericDaoHibernate Impl的vanilla实例包装在代理中,赋予其执行查找器方法的能力。
Active Record Query Interface 3.0 - Pratik Naik demonstrates ActiveRecord's finder methods and shows how a number of techniques are being deprecated in Rails 3.1.
Pratik Naik演示了ActiveRecord的finder方法,以及一些在Rails 3.1中将不再支持的技巧。
应用推荐