Using one data entity per concrete class.
每个具体类使用一个数据实体。
A concrete class that implements the DAO interface.
一个实现了dao接口的具体类。
What if the code we have uses a concrete class in its implementation?
如果我们拥有的代码在执行中使用一个具体的类该怎么办?
Scenario 3: Use jMock and RMock to mock a concrete class with a nondefault constructor
场景3:使用jMock和RMock 模拟带有非默认构造函数的具体类
First, much of the work done by a concrete class is specified in the docstrings of methods.
首先,具体类所完成的大部分工作都在方法的文档字符串(docstring)中指定。
If you want to add more subtypes, simply create a new concrete class and use it.
如果你想添加更多子类型,只需创建一个新的具体类,并使用它。
Figure 7 presents the persistence model when each concrete class is mapped to a data entity.
图7显示了将每个具体类映射成数据实体时的持久性模型。
The instance variables were declared as part of the bean implementation, which was a concrete class.
它将实例变量声明为Bean实现(一个实际的类)的一部分。
The value object in Listing 2 looks almost identical to our remote interface, but it's actually a concrete class.
清单2中的值对象看起来和我们的远程接口几乎相同,但它实际上是具体类。
Instead of accepting an ICollaborator interface, it now accepts a concrete class implementation (the Collaborator class).
它现在不接受ICollaborator接口,而接受具体类实现(collaborator类)。
For DI to work, you must have an interface whose concrete class you can inject into the consumer of the behavior you desire.
为了让DI工作,必须拥有一个接口,可以把这个接口的具体类注入到需要的行为的消费者中。
ScriptEngineManager is probably the only concrete class in the scripting package you'll use regularly; most of the rest are interfaces.
ScriptEngineManager可能是脚本包中惟一一个经常使用的具体类;其他大多数都是接口。
Our third and last strategy is probably the most imaginative of all: having one table per concrete class and none for the Estate abstract superclass.
我们的第三个,也是最后一个策略可能是三个策略当中最有想象力的:每个具体类一个表,抽象超类estate没有表。
In this way, you can change the concrete class later without changing the library code, which relies solely on the definition you created in the interface.
这样,日后就可以在不改变库代码的情况下修改具体的类,因为库只依赖接口中创建的定义。
Client classes can be coded to require only the abstract type, leaving the strategies and outcomes of implementation to the concrete class instances passed to them at run time.
客户机类可被编码为只需要抽象类型,而把实现策略和结果留给在运行时传递给它们的具体类实例。
The powerful as operator in Groovy takes a code block and generates a new class that implements the interface, which you can then call as if it were a concrete class implementing the interface.
Groovy中强大的as操作符接收一个代码块并生成一个新类来实现该接口,您可以像调用实现该接口的具体类一样调用它。
Table per Concrete Class using Implicit polymorphism.
4使用隐式多态实现每个具体类一张表。
"Table per Concrete Class using implicit Polymorphism" is not recommended due to its verbose configurations, complex association syntax using "any" element and potentially dangerous implicit queries.
“使用隐式多态实现每个具体类一张表”这种做法并不推荐,因为其配置过于繁缛、使用“any”元素的复杂关联语法和隐式查询的潜在危险性。
"Table per Concrete Class using implicit Polymorphism" is not recommended due to its verbose configurations, complex association syntax using "any" element and potentially dangerous implicit queries.
“使用隐式多态实现每个具体类一张表”这种做法并不推荐,因为其配置过于繁缛、使用“any”元素的复杂关联语法和隐式查询的潜在危险性。
应用推荐