java中的DAO模式什么是业务对象 [英] DAO pattern in java what is a Business Object

查看:388
本文介绍了java中的DAO模式什么是业务对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直接来自这篇关于J2EE DAO模式的oracle文章:



一切都非常清楚,但商业对象参与者(他们称之为)。



这里我引用我想要更多见解的位(特别是有用的实际例子(一个简单的例子))。


BusinessObject



BusinessObject代表数据客户端。
需要访问数据源以获取和存储数据。除了
访问数据源的servlet或辅助bean之外,
BusinessObject可以实现为会话bean,实体bean或
其他Java对象。


我正在尝试将此模式用作练习(作为OCPJP的学生,它需要了解DAO模式)。到目前为止,我有我的DataSource(mysql数据库),我的传输对象(JavaBean,名为Person)和我的DAO对象在数据库和JavaBean(Person)之间正确连接。



那又一个商业对象是什么?



提前致谢

解决方案

< blockquote>

业务对象是集中
应用程序所有逻辑的对象。使用Business Objects使用对象模型分离业务数据和逻辑。


在这里查看


Directly from this oracle article about the J2EE DAO Pattern:

Everything is very clear indeed but the Business Object "participant" (as they call it).

Here I quote the bit I would like more insights about (especially would be useful a real life example (an easy one)).

BusinessObject

The BusinessObject represents the data client. It is the object that requires access to the data source to obtain and store data. A BusinessObject may be implemented as a session bean, entity bean, or some other Java object, in addition to a servlet or helper bean that accesses the data source.

I am trying to use this pattern as an exercise (as a student for the exam OCPJP it requires to understand the DAO Pattern). So far I have my DataSource (mysql database), my transfer object (JavaBean called Person) and my DAO object interfacing properly between the database and the JavaBean (Person).

So again What exactly a Business Object is?

Thanks in advance

解决方案

Business objects are objects that concentrate all the logic of your application. Use Business Objects to separate business data and logic using an object model.

SEE HERE

这篇关于java中的DAO模式什么是业务对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆