xbean


A java library to do bean converstions ( service <--> client) via annotations.

About

XBean is aimed at providing the easiest and cleanest way to do bean conversions using annotations.

Why bean conversion?

Generally, we won't pass all the data from database such as primary key, creation date, last update date etc. So, we will convert domain (or entity) beans to client beans which holds only data that we need to display in browser. So, it is best practice to convert the domain(or service) beans to client beans.

XBean

In a multi tiered web application, we often used to write code to convert domain beans (DAL layer) to client(to browser) beans (business layer) and vice versa.

For example: bean1.setId(bean2.getId()); bean1.setName(bean2.getName()); bean1.setDateStr((new SimpleDateFormat("yyyy-MM-dd")).format(bean2.getDate()); .....

Though we have third party libraries available to do this job, we don't have any library which makes us to do the conversion easily with flexible options.The aim of this project is to basically automate those conversions with as easy as possible using annotations.

Why you need XBean?

Using Xbean, you can eliminate hundred's of lines of boilerplate code in your project.It also reduces your development time as you are no longer doing bean conversions manually.

See Overview to know more about xbean.

Maven Support

If you are using maven, you can add dependency in your pom.xml as follows <dependency> <groupId>com.google.code.xbean</groupId> <artifactId>xbean</artifactId> <version>1.1.0</version> </dependency>

Google Group

xbean Visit this group

Project Information

Labels:
xbean Annotation Convert Java Beans