28 November, 2016

RapidClipse 3.0 Release Candidate available





















RapidClipse 3.0 Release Candidate is now available for Windows.

New Features in 3.0:

  • Completely new written GUI-Builder
  • New Menu Wizard
  • New SQL-to-JPA query editor
  • Mobile-Kit
  • All deployment tools integrated
  • XDEV CLOUD integration
  • New Eclipse version Neon
  • New Hibernate version 5

Install:

Important note: This version is a snapshot. For using snapshots infallibly you must enable snapshot releases. Snapshot option should be enabled while testing this version only. We strongly recommend to disable snapshot releases as soon as you continue working on already existing projects to avoid accidentally mixing up framework versions.  
  1. Download and install RapidClipse 3.0 Beta #2 for your Windows system (32-Bit / 64-Bit).
  2. Start RapidClipse. 
  3. Choose menu Window > Preferences > XDEV > RapidClipse Framework.
  4. Select the checkbox Use snapshot releases.

Changelog:

Note: Changes since RapidClipse 2. Since RapidClipse 3.0 Beta #2 is features freeze, bugfixes only, but no more new features.

Method getContainerDataSource() was replaced

In the classes XdevTableXdevComboBox XdevOptionGroup XdevListSelect and XdevTwinColSelect the method getContainerDataSource() was replaced by the method getBeanContainerDataSource(). If you have used this method, you will get warnings after updating to version 3.0. You can easily fix it by using getBeanContainerDataSource().
  1. Choose menu Search > File.
  2. In the following wizard at Containing text type getContainerDataSource.
  3. Click Replace
  4. In the following wizard at Width type getBeanContainerDataSource.
If you have used the analogue Vaadin components you have to keep the method getContainerDataSource.

Method getItem() was replaced

In the classes XdevTableXdevComboBox XdevOptionGroup XdevListSelect and XdevTwinColSelect the method getItem() was replaced by the method getBeanItem(). If you have used this method, you will get warnings after updating to version 3.0. You can easily fix it by using getBeanItem() .
  1. Choose menu Search > File.
  2. In the following wizard at Containing text type getItem.
  3. Click Replace
  4. In the following wizard at Width type getBeanItem.
If you have used the analogue Vaadin components you have to keep the method getItem.

Entity Export Error (Create tables from JPA entities)

When you export entities by using Create tables from JPA entities an error will occur. You can fix it by removing the entry <property name="hibernate.hbm2ddl.auto" value="validate" /> in the persistence.xml file you will find in the Project Management.

With this statement your entity object model is validated with your database structure while the runtime. Mostly, this is useful. However, with the new Hibernate version 5 integrated in RapidClipse 3.0 Beta #2 the validation is executed while exporting entities also what causes an error each time.

Primary Key Auto Increments have changed

The default strategy of auto incrementing primary keys has changed in the new Hibernate version 5 integrated in RapidClipse 3.0 Beta #2. If you want to keep the Hibernate 4 default strategy, insert the statement <property name="hibernate.id.new_generator_mappings" value="false" /> into your persistence.xml file you find in the Project Management.


Download RapidClipse 3.0 Release Candidate

24 November, 2016

RapidClipse 3 Release Canditate next week

We like to inform you that RapidClipse 3.0 is basically ready, but we still have to do some final bugfixes. To reduce your waiting time we will launch RapidClipse 3.0 Release Candidate next week containing all new features. The final release will be launched as soon as we have done the final fixes.

Thank you!


11 November, 2016

JPA-SQL Code Editor introduction


















Suitable for the 10 year jubilee of the JPA standard, RapidClipse 3 comes with a new JPA-SQL code editor for Eclipse. This tool enables you to write custom database queries in JPA-SQL, based on SQL. After that, the JPA-SQL code is turned into Javacode based on JPA Criteria API. If you compare the following code example, you can see most of the benefits at a look.

JPA-SQL Code:

findAllCustomer()
{
    SELECT * FROM CUSTOMER
}

JPA Criteria Code:

public List<Customer> findAllCustomer() {
    EntityManager entityManager = em();

    CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();

    CriteriaQuery<Customer> criteriaQuery = criteriaBuilder.createQuery(Customer.class);

    Root<Customer> root = criteriaQuery.from(Customer.class);

    TypedQuery<Customer> query = entityManager.createQuery(criteriaQuery);
    return query.getResultList();

}

What is JPA (Java Persistence API)?

If you want to develop database applications compliant with the Java standard, you have to use a Java persistence framework which implements the JPA specification, for example Open JPA, EclipseLink or Hibernate. Last one deemed as defacto standard and that's why we decided to use Hibernate in RapidClipse.

Database developers love SQL, but SQL is unsuited for Java

Even with JPA you can write custom queries by using plain SQL strings in any case, but actually you shouldn't do that. SQL strings have many disadvantages:
  • your query code is not type safety,
  • you completely give up your IDE support, for example code completion, syntax highlighting, error warnings, refactoring and so on,
  • you can not debug your query code,
  • the more statements, joins, quotes and string linkings you have, the more your code becomes confusing,
  • SQL strings are always a risk respectively SQL injection,
  • and your application will never be database-independent.

Java Query APIs are much more complex than SQL

For this reason, JPA provides us JPQL and the JPA Criteria API, which enable us to write our custom queries completely in Java. In addition to that, Hibernate provides it's own implementations HQL and the Hibernate Criteria API. Which API to use depends on intention and mostly it's a matter of taste, but we as Java tool makers had to make a decision which one we use for generting your query code.

JPQL Code Example: 

TypedQuery<Country> query =
    em.createQuery("SELECT c FROM Country c", Country.class);

List<Country> results = query.getResultList();

JPQL and thus HQL are similar to SQL, easy to read and write and that's why they are used frequently by developers. Unfortunately, JPQL and HQL using SQL strings as well, whereby we have disadvantages listed above. Until Hibernate 4 we personally were very pleased with the Hibernate Criteria API, but with the new Hibernate version 5 it's deprecated. JPA Criteria API is the only one remaining, if we want to avoid SQL strings. The JPA Criteria API is on the one hand perfectly. It's very powerful and flexible by supporting method chaining for example. But on the other hand it's considered as complicated, the code is difficult to read and write and does not look like SQL as you can see in the example above. Therefore, it's not much popular and mainly recommended for dynamic queries.

JPA-SQL combines the simplicity of SQL with the power of the JPA Criteria API 

To solve that problem, we decided to create a new query language called JPA-SQL, which combines the simplicity of SQL with all advantages of the powerful JPA Criteria API. The function principle is simple. JPA-SQL enables you to write custom queries in a SQL-based syntax, but behind the scenes the JPA-SQL Code Editor generates the respective JPA Criteria code in realtime.

Fully IDE support

JPA-SQL Code Editor provides you all advantages you know from Java coding:

  • type-safety 
  • code completion - detecting keywords, oprators and entities
  • syntax highlighting
  • code folding
  • code formatter
  • inline refactoring and refactoring participants for JDT member renames and moves
  • hovers
  • linking (Ctrl+Click)
  • outline view
  • error/warning marks with quick fixes
  • code templates
Additional advantages:
  • order of your statements can be chosen freely 
  • query-methods are generated automatically into your DAO
  • integration in Eclipse build process
  • debugging the generated JPA Criteria code is possible
  • safe from SQL injection
  • completely database-independent queries

Compatible with Hibernate, EclipseLink & Open JPA

The generated query code bases on the JPA Criteria API and thus can be used with any JPA provider.

Availability

JPA-SQL together with the JPA-SQL Code Editor is integrated in RapidClipse 3.0 available for free. A single JPA-SQL Code Editor plugin for Eclipse is planned already.

Download RapidClipse 3 with JPA-SQL for free

09 November, 2016

RapidClipse 3.0 Beta #2 now available





















We are glad to announce, that RapidClipse 3 Beta #2 is now avialable for Windows.

New Features available already:

  • Completely new written GUI-Builder
  • New Menu Wizard
  • New SQL-to-JPA query editor
  • Mobile-Kit
  • All deployment tools integrated
  • XDEV CLOUD integration
  • New Eclipse version Neon
  • New Hibernate version 5

Still missing New Features:

  • Jetstream.one Java In-Memory Database
  • XDEV CLOUD service

Install

Important note: This version is a snapshot. For using snapshots you must enable snapshot releases. Snapshot option should be enabled while testing this version only. We strongly recommend to disable snapshot releases as soon as you continue working on already existing projects to avoid accidentally mixing up framework versions.  
  1. Download and install RapidClipse 3.0 Beta #2 for your Windows system (32-Bit / 64-Bit).
  2. Start RapidClipse. 
  3. Choose menu Window > Preferences > XDEV > RapidClipse Framework.
  4. Select the checkbox Use snapshot releases.

Changelog

Method getContainerDataSource() was replaced

In the classes XdevTable, XdevComboBox XdevOptionGroup XdevListSelect and XdevTwinColSelect the method getContainerDataSource() was replaced by the method getBeanContainerDataSource(). If you have used this method, you will get warnings after updating to version 3.0. You can easily fix it by using getBeanContainerDataSource().
  1. Choose menu Search > File.
  2. In the following wizard at Containing text type getContainerDataSource.
  3. Click Replace
  4. In the following wizard at Width type getBeanContainerDataSource.
If you have used the analogue Vaadin components you have to keep the method getContainerDataSource.

Method getItem() was replaced

In the classes XdevTableXdevComboBox XdevOptionGroup XdevListSelect and XdevTwinColSelect the method getItem() was replaced by the method getBeanItem(). If you have used this method, you will get warnings after updating to version 3.0. You can easily fix it by using getBeanItem() .
  1. Choose menu Search > File.
  2. In the following wizard at Containing text type getItem.
  3. Click Replace
  4. In the following wizard at Width type getBeanItem.
If you have used the analogue Vaadin components you have to keep the method getItem.

Entity Export Error (Create tables from JPA entities)

When you export entities by using Create tables from JPA entities an error will occur. You can fix it by removing the entry <property name="hibernate.hbm2ddl.auto" value="validate" /> in the persistence.xml file you will find in the Project Management.

With this statement your entity object model is validated with your database structure while the runtime. Mostly, this is useful. However, with the new Hibernate version 5 integrated in RapidClipse 3.0 Beta #2 the validation is executed while exporting entities also what causes an error each time.

Primary Key Auto Increments have changed

The default strategy of auto incrementing primary keys has changed in the new Hibernate version 5 integrated in RapidClipse 3.0 Beta #2. If you want to keep the Hibernate 4 default strategy, insert the statement <property name="hibernate.id.new_generator_mappings" value="false" /> into your persistence.xml file you find in the Project Management.


Download RapidClipse 3.0 Beta #2