[38 total ]
Hibernate is a powerful, high performance object/relational persistence and query service for Java. It lets you develop persistent objects following common Java idiom, including composition, association, inheritance, polymorphism, and the Java
... [More]
collections framework. To allow a rapid build procedure, Hibernate rejects the use of code generation or bytecode processing. Instead, runtime reflection is used and SQL generation occurs at system startup time. It supports Oracle, DB2, MySQL, PostgreSQL, Sybase, Interbase, Microsoft SQL Server, Mckoi SQL, Progress, SAP DB, and HypersonicSQL. [Less]
Hibernate, like all other object/relational mapping tools, requires metadata that governs the transformation of data from one representation to the other (and vice versa). As an option, you can now use JDK 5.0 annotations for object/relational
... [More]
mapping with Hibernate 3.2. You can use annotations in addition to or as a replacement of XML mapping metadata. [Less]
Hibernate EntityManager implements:
* The standard Java Persistence management API
* The standard Java Persistence Query Language
* The standard Java Persistence object lifecycle rules
* The standard Java Persistence
... [More]
configuration and packaging
Hibernate EntityManager wraps the powerful and mature Hibernate Core. You can fall back to Hibernate native APIs, native SQL, and native JDBC whenever necessary.
The Hibernate Java Persistence provider is the default persistence provider of the JBoss EJB 3.0 implementation and bundled with the JBoss Application Server. [Less]
JPOX provides transparent persistence of Java objects. It is a compliant implementation of the JDO1.0, JDO2.0, JDO2.1 and JPA1.0 specifications. It supports persistence to all of the major RDBMS on the market today, as well as to DB4O datastores. It
... [More]
allows querying using either JDOQL, SQL or JPQL. JPOX 1.1.0 is the Reference Implementation(RI) for JDO 2, and JPOX 1.2.0 is the RI for JDO2.1. It uses OSGi technology for its plugin framework [Less]
A Java EE persistence project. It aims to be a feature-rich implementation of the persistence part of Java Community Process JSR-220 (Enterprise JavaBeans 3.0), which is known as the Java Persistence API (JPA). OpenJPA can be used as a stand-alone
... [More]
POJO persistence layer, or it can be integrated into any EJB3.0 compliant container and many lightweight frameworks. [Less]
The Envers project makes it simple to version entities. The only thing required is annotating them with @Versioned. Storing historical data (versions) is completely transparent to the developer. He/she may interact with the entities as always.
Not
... [More]
only basic properties of an entity can be versioned, but also relations, making it possible to view parts of the database as they were at a given revision (each revision has an associated timestamp, one revision = one transaction, in which versioned data has changed).
Moreover, Envers provides a straightforward interface for retrieving historical data, a criteria-like query interface, and the possibility to store additional information alongside each revision.
Envers works with Hibernate and Hibernate Entity Manager. [Less]
Apache Cayenne is an open source persistence framework licensed under the Apache License, providing object-relational mapping (ORM) and remoting services. With a wealth of unique and powerful features, Cayenne can address a wide range of persistence
... [More]
needs. Cayenne seamlessly binds one or more database schemas directly to Java objects, managing atomic commit and rollbacks, SQL generation, joins, sequences, and more. With Cayenne's Remote Object Persistence, those Java objects can even be persisted out to clients via Web Services. Or, with native XML serialization, objects can be even further persisted to non-Java clients - such as an Ajax-capable browser. [Less]
The DataNucleus project provides products for the management of application data in a Java environment. Our aim is to provide good quality open source products to handle data in all of its forms, wherever it is stored. This goes from persistence of
... [More]
data into heterogeneous datastores, to providing methods of retrieval using a range of query languages, and eventually on to the analysis of data and tools for managing data quality.
DataNucleus Access Platform is the baseline product providing persistence of Java objects to a range of datastores using JDO and JPA APIs and permitting various query languages. [Less]
Tudu Lists is an on-line application for managing todo lists. With Tudu Lists, todo lists can be easily accessed, edited and shared on the Web. It is a simple but effective project management tool.
CDO Model Repository
=====================
CDO is both a technology for distributed shared EMF models and a fast server-based O/R mapping solution. With CDO you can easily enhance your existing models in such a way that saving a resource
... [More]
transparently commits the applied changes to a relational database. Optionally other connected clients are actively notified about these changes so that their model copies get partially invalidated and all user interfaces reflect the current state at once. Stored resources are demand-loaded from the database only as needed. CDO uses the Net4j technology as a flexible and scalable signalling backbone. [Less]
Collection of frameworks for java development.
- Persistence
- Web
- Utils
BeanShield is a powerful Java library, that makes it easy to directly use your complex entity model in your UI (Web based and Client) without the need to copy or clone data to be able to rollback changes when a user clicks "Cancel".
EasyGloss is a framework for simplifying unit testing of annotated classes that require injection in order to function.
Utility library to implement domain objects and DAOs based on JPA and Spring.
hypersphere follows a model-driven approach to migrate EJB 2.1 applications to a vendor-neutral EJB 3.0 platform.
Aiming to provide a suite of generators in the future, hypersphere provides only one generator for the automatic migration of WebSphere-based EJB 2.1 applications so far.
XUI is a Rich Internet Application Framework built using Java and XML. XUI comes with plugins for NetBeans and Eclipse that provide WYSIWYG design environments, including drag and drop form generation from Hibernate/JPA POJOs.
A simple persistence API inspired by Java Persistence API(JPA). But instead of trying to emulate JPA features on top of SimpleDB, like transactions and other relational database stuff, SimplyAnnotate takes the good stuff from JPA to simplify persisting POJO's to SimpleDB.
The project contains several little projects for testing new technologies as JPA, EJB3, JEE 5, Spring, hibernate, Flex, GWT, Android...
Point this tool at your database to map from your relations to JPA and JAXB classes. However, it is designed specifically to work well with databases where a certain number of best practices are adhered to:
Every table should have a primary key
... [More]
named 'id' that auto-increments on insert Foreign key columns must be named tablename_id Many to Many join tables must be named tablename1_tablename2 All foreign keys should be declared in the database If you can live by these rules you will never have to write JPA classes again. Here is the usage message:
Usage: com.moonspider.dbmap.GenerateConfig
-type (-t) [String] The type to generate, either 'jpa' or 'gorm' (experimental) (jpa)
-destinationDirectory (-d) [String] Destination directory
-url [String] The url of the database
-pkg (-package) [String] The target package ()
-user (-u) [String] Database user (sa)
-password (-p) [String] Database password ()
-globalExtends (-extends) [String] Class for all Java classes to extend
-globalImplements (-implements) [String] Class for all Java classes to implement
-driver [String] Database drive class
-extension (-ext) [String] File extension for the generated code (java)
-hibernate [String] Generate hibernate.cfg.xml to this directory
-jaxb [flag] Enable xml binding generation
-schema [String] Specify the non-default schema to useThe Grails GORM support is very experimental and doesn't work well for complex relationships yet. The JPA support is very solid and has been used in commercial products. There are lots of things that you can override using a special XML configuration file that will allow you to break some of the rules above, but I don't recommend it, you can find an example in the tests. [Less]
Metawidget takes your domain objects and automatically creates, at runtime, native User Interface components for them - saving you handcoding your UIs. Supports Swing, Java Server Faces (JSF), Spring (Spring Web MVC), Struts, Android, Hibernate...
This is Ochomo's online repository of java application and others.
Demo project based on Spring's Petclinic that aims to integrate various frameworks: Spring MVC, Spring Webflow, Freemarker, Sitemesh, Hibernate, Acegi, DWR.here There will be three subprojects that differ in complexity and should cover most web
... [More]
application requirements.
Integration statusSubproject sample-spring-ftl-jsecurity Framework Status Spring MVC Done Freemarker Done Sitemesh Done JPA(mapped) Done Container Security Done
Subproject sample-spring-ftl-acegi-dwr Framework Status Spring MVC Done Freemarker Done Sitemesh Done JPA(annotated) Done Acegi Security Done DWR Done
Other libraries: Sitemesh, Script.aculo.us, JSCalendar, Prototype
Subproject sample-spring-ftl-acegi-dwr-swf Framework Status Spring MVC Open Spring Webflow Open Freemarker Open Sitemesh Open JPA(annotated) Open Acegi Security Open DWR Open [Less]
LIQUidFORM stands for Language Integrated QUeries For Object Relational Mapping and is a Java library that provides a Java Domain Specific Language for building type-safe and refactoring proof JPA queries.
GenusThe tool that generates a persistence descriptor file (e.g. persistence.xml). Data that is used for descriptor generation is stored in another file, albeit in a simpler, more readable form.
The leading idea is to generate a descriptor file
... [More]
swiftly and easily, without the need to remember the intricacies of the descriptor format, or to search, copy & paste the file every time it is needed.
NoteThis project is in its initial stage, more content in a few days. [Less]
Este projeto consiste de uma análise de 3 ferramentas de persistência objeto/relacional.
- Hibernate
- Ruby on Rails
- JPA
Acacia Business Ace is ERP+CRM like system which is designed to support small and medium size Enterprises. For base of this project will be used an existing DOS project written on Magic 4GL. Also I would like to include here all of my 18 years
... [More]
experience in many areas like Business Management, Design and Software Development, System Integration, Security and other. The core technologies and products which are used are Swing/SwingX, Java EE 5 (GlassFish), EJB3, JPA, Java Web Start (JNLP), Enterprise Service Bus (ESB) and others. Some of the main modules which the system will include are: - Business Management; - Logistics; - Trade; - Warehouse; - Accounting; - Human Resources (HR, Recruiters); - etc. [Less]
Warp-persist is a lightweight library that provides persistence and transactions for applications using Google Guice.
You can use warp-persist inside web and servlet applications as well as EJB and simple desktop applications. All with a few simple
... [More]
configuration steps.
Quick HitsInject DAOs & Repositories Flexible units-of-work Declarative transaction management Using @Transactional Or your own custom AOP Dynamic Finders (reduce boilerplate query code) Warp-persist fully supports: Hibernate Java Persistence API (JPA) db4objects
...and is easily extensible to any persistence system of your choice! [Less]
This project contains the source code snippets and sample application for the book Seam in Action, authored by Dan Allen and published by Manning Publications.
The sample application for Seam in Action is named Open 18. The application serves as
... [More]
a golf course directory and golfer community site. For instructions on how to get the application and development environment setup, see the GettingStarted page.
The application is progressively improved and expanded throughout the course of the book. Accordingly, the source code is partitioned in stages such that you can get a snapshot of the application as it stands at the end of each chapter. By following this strategy, it allows you to either work incrementally as you progress through the book or it gives you a convenient starting point if you pickup somewhere in the middle.
The first cut of the application is done using the seam-gen project creation and reverse engineering tool. From there, the application is customized, thus departing from the original sandbox.
The sample application is developed using Seam, JPA/Hibernate, JSF 1.2, Facelets, RichFaces, jBPM, Drools, and various other technologies. It is built using both Ant and Maven 2, though the Maven 2 integration comes at the end of the book in the Spring chapter. [Less]
一个轻量级的基于Google Guice的Restful服务框架,支持JPA、JAAS、分布式资源对象.Demo演示: http://www.rest4g.org/full 特点: 基于Google guice 零配置,服务的自动扫描注册
... [More]
非侵入式,用户不需要实现特定的接口来实现Restful服务,只需要通过@RESTful来声明 支持Post. Get. Put. Delete操作 支持对Get操作的缓存机制,实现动态资源静态化(通过@Cache标注声明) 灵活的注入(支持上下文环境request/response/session以及参数的自动注入) 根据客户端要求返回不同类型的数据(xml/json/html) 通过@PageFlow实现对MVC module2的支持,输出结果支持CTE、Velocity、Freemarker和Spry模板引擎(当返回类型是text/html时才有效) 支持JPA,通过增强的BaseEntityManager实现实体的CRUD 支持事务,通过@Transactional注解声明事务的类型 支持JAAS,通过@RolesAllowed注解声明操作所需要的角色 支持Hibernate validator 支持拦截器 (interceptor) 支持分布式资源对象,实现业务逻辑的分布式部署 提供了与Struts2集成的插件
代码示例:
//=======================================================
//资源类
//=======================================================
/**
* @author cnoss (QQ:86895156)
* 联系人的资源对象
* 声明remoteable为真(可以通过@RemoteReference的注入到任一资源对象,通常用在跨应用的资源调用上)
*/
@RESTful(name = "ContactResource", remoteable = true)
@Path( { "/contact", "/contacts/{contactId}" })
public class ContactResource {
@Inject
private ContactService service;//注入联系人管理的服务对象
/**
* 创建新的联系人
* PageFlow :当服务端返回类型是Text/Html类型时,重定向用户的请求到指定的页面,实现最基本功能的MVC。
* 在这里,指明当操作成功时,重定向到/contacts,当操作失败时,将用户请求重定向到/contact。
* @param contact 联系人实体
*/
@Post
@PageFlow(success = @PageInfo(value = "/contacts",type=ResultType.REDIRECT)
,error=@PageInfo(value="/contact",type=ResultType.REDIRECT))
public String createContact(@ModelBean Contact contact) {
return this.service.createContact(contact);
}
/**
* 修改联系人信息
* @param contact 联系人实体
*/
@Put
@PageFlow(success = @PageInfo(value = "/contacts",type=ResultType.REDIRECT)
,error=@PageInfo(value="/contact",type=ResultType.REDIRECT))
public void putContact(@ModelBean Contact contact) {
this.service.updateContact(contact);
}
/**
* 显示联系人列表
* @param page 页码
* @param size 每页记录数
*/
@Get
@Path("/contacts")
@PageFlow(success = @PageInfo(value = "/template/contacts.ctl"))
public Page listContacts(int page, int size) {
return this.service.listContacts(page, size);
}
/**
* 显示单个联系人的信息
* @param contactId 联系对象ID
*/
@Get
@PageFlow(success = @PageInfo(value = "/template/contactDetail.ctl"))
public Contact getContact(@Parameter("contactId") String contactId) {
if(contactId == null)
return new Contact();
return this.service.findContactById(contactId);
}
/**
* 删除指定ID的联系人
* @param contactId 联系对象ID
*/
@Delete
@PageFlow(success = @PageInfo(value = "/contacts",type=ResultType.REDIRECT))
public void deleteContact(@Parameter("contactId") String contactId) {
this.service.deleteContact(contactId);
}
}
//=======================================================
//业务类
//=======================================================
/**
*
* @author cnoss (QQ:86895156)
*
*/
@Transactional//事务支持,缺省为TransactionalType.REQUIRED,可以在方法中覆写
@Interceptors({//自定义的拦截器(类级别的,作用于所有的方法,可以在方法中覆写)
@Interceptor(TestInterceptor.class),
@Interceptor(LogInterceptor.class)
})
public class ContactService{
//注入实体管理器
@Inject
private BaseEntityManager entityManager;
public String createContact(Contact contact) {
if (contact == null)
throw new RuntimeException("联系人的内容不能为空");
if (this.entityManager.loadByNamedQuery("byName", contact.getName()) != null) {
throw new RuntimeException("联系人的姓名相同,请重新输入");
}
this.entityManager.create(contact);
return contact.getId();
}
public void deleteContact(String contactId) {
String[] ids = contactId.split(",");
Contact contact;
for (String id : ids) {
contact = this.findContactById(id);
if (contact == null)
throw new RuntimeException("联系人不存在");
this.entityManager.delete(contact);
}
}
@Transactional(type=TransactionalType.READOLNY)
public Contact findContactById(String contactId) {
return this.entityManager.load(contactId);
}
@Transactional(type=TransactionalType.READOLNY)//覆盖类级别的事务类型为只读
@Interceptor(ListContactsInterceptor.class)//覆盖类级别的拦截器
public Page listContacts(int pageIndex, int pageSize)
throws RuntimeException {
return this.entityManager.pageByNamedQuery("list",
new Pagination(pageIndex, pageSize));
}
public void updateContact(Contact contact) {
if (contact == null)
throw new RuntimeException("联系人的内容不能为空");
Contact tmpContact = this.entityManager.loadByNamedQuery("byName", contact.getName());
if(tmpContact != null && !contact.getId().equals(tmpContact.getId()))
throw new RuntimeException("联系人的姓名相同,请重新输入");
this.entityManager.update(contact);
}
}
//=======================================================
//远程调用的案例
//=======================================================
/**
*
* @author cnoss (QQ:86895156)
*
*/
@Path( { "/testCallRemote"})
public class TestRemoteResource {
@Inject
@RemoteReference//注入远程资源对象
private ContactResource service;
@Get
public Page listContacts(int page, int size) {
return this.service.listContacts(page, size);
}
}
Demo演示: http://cnoss.vicp.net/ 请大家直接从SVN中获取JRest4Guice工程即可(使用Maven)
真诚希望大家提出宝贵意见,联系方式: Email:zhangyouqun@gmail.com QQ: 86895156 MSN: zhangyouqun@hotmail.com [Less]
An extremely simple annotation-based persistence layer for Java.