当前位置: 首页 > news >正文

汕头网站制作哪家好软件开发公司税收优惠政策

汕头网站制作哪家好,软件开发公司税收优惠政策,企业建网站的 程序,网络营销机构官方网站什么是POJO#xff0c;JavaBean#xff1f;总结#xff1a;POJO#xff1a;一个简单的Java类#xff0c;这个类没有实现/继承任何特殊的java接口或者类#xff0c;不遵循任何主要java模型#xff0c;约定或者框架的java对象。在理想情况下#xff0c;POJO不应该有注解。…什么是POJOJavaBean总结POJO一个简单的Java类这个类没有实现/继承任何特殊的java接口或者类不遵循任何主要java模型约定或者框架的java对象。在理想情况下POJO不应该有注解。JavaBeanJavaBean是可序列化的实现了serializable接口具有一个无参构造器有按照命名规范的set和gettis(可以用于访问布尔类型的属性)方法pojoPOJO的创始人(martinfowler)博客The term was coined while Rebecca Parsons, Josh MacKenzie and I were preparing for a talk at a conference in September 2000. In the talk we were pointing out the many benefits of encoding business logic into regular java objects rather than using Entity Beans. We wondered why people were so against using regular objects in their systems and concluded that it was because simple objects lacked a fancy name. So we gave them one, and its caught on very nicely....在谈话中我们指出编写业务逻辑的时候使用常规的java对象要比实体bean要好的多。我们怀疑为什么一些人极力反对在他们的代码中使用常规对象还辩解称因为这些常规对象没有一个花哨的名字所以我们给他们起了一个非常好听的名字。(Plain Old Java Object)维基百科原文————(以下代码和示例均来源于此)The term POJO initially denoted a Java object which does not follow any of the major Java object models, conventions, or frameworks; nowadays POJO may be used as an acronym for Plain Old JavaScript Object as well, in which case the term denotes a JavaScript object of similar pedigree.[2]术语POJO起初表示为不遵任何主要的java模型约定或者框架的java对象现在pojo也可以用作Plain Old JavaScript Object的缩写这样的话和javascript对象有着相似的渊源。理想状态下pojo应该是一个不受Java语言规范限制的java对象。换句话说pojo不应该1.继承预先设定的类如public class Foo extends javax.servlet.http.HttpServlet {// ...}2.实现预先设定的接口如public class Bar implements javax.ejb.EntityBean {// ...}3.包含预先指定的注解如javax.persistence.Entitypublic class Baz {// ...}However, due to technical difficulties and other reasons, many software products or frameworks described as POJO-compliant actually still require the use of prespecified annotations for features such as persistence to work properly. The idea is that if the object (actually class) was a POJO before any annotations were added, and would return to POJO status if the annotations are removed then it can still be considered a POJO. Then the basic object remains a POJO in that it has no special characteristics (such as an implemented interface) that makes it a Specialized Java Object (SJO or (sic) SoJO).然而由于技术和其他原因很多被称之为POJO标准的软件产品或框架仍然需要使用特定的注解来保证持久化等功能。这个想法是如果对象(类)在任何注解添加之前是一个pojo的话并且注解移除之后仍然是pojo。所以最基础的pojo解释是没有特别的特征(尤其是实现接口之类的)使其称之为“专用java对象”JavaBeanA JavaBean is a POJO that is serializable, has a no-argument constructor, and allows access to properties using getter and setter methods that follow a simple naming convention. Because of this convention, simple declarative references can be made to the properties of arbitrary JavaBeans. Code using such a declarative reference does not have to know anything about the type of the bean, and the bean can be used with many frameworks without these frameworks having to know the exact type of the bean. The JavaBeans specification, if fully implemented, slightly breaks the POJO model as the class must implement the Serializable interface to be a true JavaBean. Many POJO classes still called JavaBeans do not meet this requirement. Since Serializable is a marker (method-less) interface, this is not much of a burden.JavaBean是一个可序列化的POJO具有一个无参构造器并且允许使用遵循简单命名约定的getter和setter方法来访问属性。由于这个惯例可以对任意JavaBean属性进行简单的声明引用。使用这种声明引用的代码不需要知道bean的具体类型。并且这个bean还可以被很多框架使用这些java框架也不需要知道bean的类型。由于java.io.Serializable是一个标记接口(无方法)所以这并不是一个多大的负担。如果JavaBean完全实现的话稍微打破了一些POJO模型。很多被称之为JavaBean的POJO类并不符合这个要求因为JavaBean必须实现Serializable接口才能成为真正的JavaBean。JavaBean的优点The properties, events, and methods of a bean can be exposed to another application.A bean may register to receive events from other objects and can generate events that are sent to those other objects.Auxiliary software can be provided to help configure a bean.The configuration settings of a bean can be saved to persistent storage and restored.bean中的属性事件和方法可以暴露给另一个应用程序一个bean可以注册来自于其他对象的事件也可以产生事件并发送给其他对象辅助代码可以提供javabean的配置一个bean的配置设置可以永远被存储和恢复一些疑问什么是事件有什么作用bean如何注册来自于其他对象的事件配置设置如何被存储和恢复serializable接口是做什么的
http://www.zqtcl.cn/news/106845/

相关文章:

  • 潍坊品牌网站建设公司旅游类作业网站
  • 建设谷歌公司网站费用求职seo推荐
  • 企业网站建设规划ppt企业网站前端模板下载
  • 补习吧 一家专门做家教的网站百度云搜索引擎入口网盘搜索神器
  • 网站建设与制作企业嘉鱼网站建设哪家专业
  • 电脑怎么做网站赚钱柳州柳北建设局网站
  • 农村服务建设有限公司网站设计基础网站推荐
  • 做网站的编程语言组合ppt模板免费的网站推荐
  • 泰安企业建站公司流程上海营销型网站报价
  • 网站承载量怎么做福州公交集团网站建设
  • 新吴区住房和建设交通局网站小程序商城哪家好排行榜
  • 中小学网站建站模板长春火车站咨询电话
  • c2c网站特点公司网站建设亚运村
  • 邢台wap网站建设费用黑帽seo之搜索引擎
  • 如何用阿里云做网站刷题网站怎么做
  • 织梦制作手机网站上海猎头公司名单
  • 免费生成图片的网站wordpress 购物
  • 江西建设部网站国际新闻最新消息今天2023
  • 怎么做网站啊wordpress英文显示改中文
  • 建筑专业网站有哪些网站标题seo外包优化
  • 浙江建设厅网站施工员报名中国建设协会官网站
  • 网站建设优化是干嘛上海今天最新的新闻
  • 网站大全浏览器软文的概念
  • 盐山做网站价格莱芜征婚吧
  • 具有品牌的微网站建设网站设计培训班前台
  • 网站推广工具推荐html网站地图在线生成
  • 成都本地网站建设青岛电子商务的网站建设
  • 北京网站开发培训河南省百城建设提质工程网站
  • 郑州专业建网站南通网站建设技术支持
  • 简约网站程序网络营销方式较为单一