dpHibernate - Hibernate lazy loading with Adobe BlazeDS
源码地址:
http://code.google.com/p/dphibernate/
GettingStarted
dpHibernate is designed to quietly work behind the scenes and make everything as seamless as possible. However in order for us to do this we do need to know which objects we need to manage. This is done with the Managed metadata and a simple extends added to every value object/pojo class.
Before you start make sure you have followed the setup and configuration instructions defined here:
In order for dpHibernate to be able to monitor the state of your objects and trigger the lazy loading as objects are touched. Two things need to be done to every value object in Action Script.
- Add the Managed meta data flag to each class
- Every value object, returned from Hibernate, that needs to be monitored and managed by dpHibernate needs to extend the HibernateBean (net.digitalprimates.persistence.hibernate.HibernateBean) class
- Alternativly every value object can implement the IHibernateBean interface instead. (net.digitalprimates.persistence.hibernate.HibernateBean)
package model.beans
{
import mx.collections.ArrayCollection;
import net.digitalprimates.persistence.hibernate.HibernateBean;
[RemoteClass(alias="net.digitalprimates.samples.sample1.beans.User")]
[Managed]
public class User extends HibernateBean
{
public var id:String;
public var firstName:String;
public var lastName:String;
public var addresses:ArrayCollection;
public var connectInfo:UserConnectInfo;
}
}
dpHibernate works by passing either the real object or a proxy back and forth with flex. For this reason the POJO's on the Java side, which will be returned by hibernate, need to be able to live as both a proxy and the full object.
- Extend the POJO classes with the: HibernateProxy (net.digitalprimates.persistence.hibernate.proxy.HibernateProxy)
- Alternatively you can implement the interface: IHibernateProxy (net.digitalprimates.persistence.hibernate.proxy.IHibernateProxy)
分享到:
相关推荐
前端开源库-markdown-it-lazy-headersMarkdown it Lazy Headers,Lazy ATX Headers插件用于Markdown it
前端开源库-lazy-dependable懒惰可靠,通过懒惰依赖解析实现可靠
这是react-lazy-load-image-component NPM 包的演示。 它既不打算在现实生活中使用,也不是好的编程实践的一个例子,而是要给出一个如何使用包react-lazy-load-image-component及其道具的例子。 观看现场演示: : ...
基于lazy-snapping的图片分割代码
懒人画家 用于SVG路径动画的现代JS库 | 入门 根据快速入门说明,可以轻松完成Lazy Line Painter的设置。 但是,如果您更需要GUI,请确保使用 。 专为SVG路径动画开发的免费...import LazyLinePainter from 'lazy-l
react-lazy-load, 当子元素进入viewport时,响应它们呈现子元素 延迟加载 组件反应 延迟加载 很容易使用响应组件,它帮助你以可以预测的方式延迟加载内容。 速度快,工作在 IE8+,6KB 缩小,在默认情况下使用去抖...
这是适用于浙高中信息教学的python版本,python版本是3.7.12,安装了教材教学需要的package,安装thonny和spyder两个ide,开箱即用,很方便,喜欢的话给个好评哦!谢谢!
跟着例子在3分钟内玩转Generator Lazy。 Useage 向导模式创建 在任意目录中执行yo lazy,然后一路NEXT即可。 在包含配置文件的项目中使用 命令: yo lazy cd build-with-config-exist yo lazy 在未包含任何配置文件的...
ng2-image-lazy-load, Angular2图像迟缓加载程序库 当前未维护现在,你可以尝试使用这个伟大的延迟加载 库来实现。 上面的库唯一没有的是Web工作支持- 我希望在未来的某个时候循环,或者者为tjoskar提供辅助。 ng2-...
注:LazyImg 必须定义lazy-data属性,属性值是src的图片路径 引入JS文件:<script type="text/javascript" src="js/lazyImg.v1.0.js"> 默认情况下: 在IMG中满足以任何一个条件,都会加载图片; 1、没有class属性 2...
安装npm install vue-lazy-container或者yarn add vue-lazy-container用法在mian.js中编写以下内容: import VueLazyContainer from "vue-lazy-container" ;Vue . use ( VueLazyContainer ) ; 例子: < template> &...
cortex-m4f-lazy-stacking-and-context-switching.pdf
Laravel开发-laravel-lazy-mysql Laravel基于懒惰MySQL的雄辩模型和查询生成器
懒惰的图像用于延迟加载图像的轻量级 javascript 插件用安装模块: npm install lazy-images需要模块: var lazy = require('lazy-images')([IMAGE_SELECTOR]);IMAGE_SELECTOR 默认为“.lazy”笔记为了让这个模块...
vue-lazy-hydration是一个无渲染的Vue.js组件,用于改善服务器端渲染的Vue.js应用程序的估计输入延迟和交互时间。 这可以通过使用惰性水合延迟预渲染HTML的水合来实现。 安装 npm install vue-lazy-hydration ...
懒惰模块 lazy-modules 实现了一种简单的方法来批量延迟加载 Node.js/io.js 模块,非常适合在具有许多导入(例如或的构建系统中实现。为什么? v8 的Script::Compile ,在使用require()时调用,通常需要比较长的时间...
延迟编译Webpack插件...安装# npmnpm i -D lazy-compile-webpack-plugin# yarnyarn add -D lazy-compile-webpack-plugin用法const LazyCompilePlugin = require ( 'lazy-compile-webpack-plugin' ) ;module . export
下面小编就为大家带来一篇浅谈spring中的default-lazy-init参数和lazy-init。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
npm install --save react-lazy-load 例子 用法 import React from 'react' ; import LazyLoad from 'react-lazy-load' ; const MyComponent = ( ) => ( Scroll to load images. < La
资源分类:Python库 所属语言:Python 资源全名:i_lazy-0.1.1-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059