这个实体类如何与数据库联系起来?
创建一个Customer实体类。
每一个业务实体都将变成一个实体类。
然后可以将该对象定义为实体类上的一个字段。
You can then define that object as a field on an entity class.
为生成的代码中的实体类指定基类。
Specifies the base class of the entity classes in the generated code.
由此强类型的属性将被加到实体类中。
Strongly-typed properties will be added to the entity classes based on this.
在设计时,您可以选择使实体类可序列化。
At design time, you have the option to make the entity classes serializable.
Employee实体类包含了表格与它包含的列。
The Employee entity class contains the representation of the table and its column as fields.
每一个实体类的实例代表数据库表中的一行。
Each instance of a class entity represents a row within the database table.
由于明显的并发性需求,您应该首先在实体类上启用乐观锁。
Due to the obvious concurrency requirement, you would first enable optimistic locking on entity classes.
下面是如何定义命名查询,并将其与实体类关联的一个示例?
Below is an example of how you can define a named query and associate it with an entity class.
正如你所看到的,我们只是绑定到实体类的用户属性。
As you can see, we simply bind to the User property of the entity class.
向导生成的实体类名称与对应的数据库表名完全一样。
The wizard generates an entity class with the same name as the corresponding database table.
我们刚刚找到了8个实体类,我们认为这些都是我们系统中的类。
We have just identified eight entities that we believe are classes in our Auto Rental system.
图1显示出了整个的department表,以及相应的实体类。
Figure 1 shows the entire Department table, along with the corresponding entity class.
下面的过程演示在尝试更新完整实体类时如何进行验证。
The following procedure shows how to validate when an attempt is made to update a complete entity class.
RUP过程中的实体类大致上相当于前面提到的,业务级别的分析类。
RUP's entity classes are roughly equivalent to the business-level analysis classes above.
您可以通过功能包提供扩展抽象实体类并创建适当的映射。
This can be done by extending the abstract entities provided by the bundle and creating the appropriate mappings.
您的实体类必须在类上具有匹配字段,或者它可以作为可嵌入键嵌入该键
Your entity class must have matching fields on the class or it can embed the key as an embeddable key
演示如何创建一个实体类以及一个用于筛选实体类的简单查询。
Demonstrates how to create an entity class and a simple query to filter the entity class.
清单1展示了一个简单的EJB3实体类,称为GreetingCard。
Listing 1 shows a simple EJB3 entity class called GreetingCard.
在系统中记录实体类的创建者、修改者和相关日期等信息是一个很常见的需求。
It's a very common requirement to track creator, modifier and the according dates for entities.
您可以使用编辑器,属性视图以及可视化建模图表,来创建并编辑JPA实体类。
You can use editors, property views, and visual modeling diagrams to create and edit JPA entity classes.
在我们做下一步之前,我们需要给这8个实体类增加一些内容,来确认他们是类。
Before we do anything else, we need to add content to these eight entities to be sure they are classes.
如果系统中的一个实体类,有一个很清楚的名字,你可能想为它的对象起一个名字。
If you have a special entity in your system that has a well-known name, you might want to use a named object to represent it.
为了提高可读性,通过在实体类文件中直接指定的对象或关系元数据表达场景中的关系。
For better readability, the relationships in our scenario are expressed through object or relational metadata specified directly in the entity class files.
要想使用领域设计方法,你就需要为实体类定义和构建资源库来实现领域对象的持久化。
Using a domain driven design approach you will need to define and build repositories for the entities that make up your domain.
任何作为那些请求一部分的交换的信息(例如,参数)都由一个IO实体类的实例表示。
Any information exchanged as part of those requests (e.g., parameters) is represented by an instance of an IO Entity class.
当提及类的打开关闭原则,它可以通过抽象类和实体类实现行为的方式来确保。
When referring to the classes Open Close Principle can be ensured by use of Abstract classes and concrete classes for implementing their behavior.
当提及类的打开关闭原则,它可以通过抽象类和实体类实现行为的方式来确保。
When referring to the classes Open Close Principle can be ensured by use of Abstract classes and concrete classes for implementing their behavior.
应用推荐