We have seen previously about declaring fields in classes in Scala and also saw the kind of bytecode created for each of the cases. But lot of Java tools out there expect the fields in classes to follow the JavaBeans specification and in order to support that Scala provides @BeanProperty annotation. also read: Primary and …
Understanding Classes and its Fields in Scala
For those moving from Java to Scala would find it a bit different to see how the classes and their fields are treated in Scala. Most of you in the Java world always complain about the verbosity of adding fields and then to add their getters and setters. Lets look at how the Classes and …
CRUD Operations in Gaelyk- Part 2- Read Operation
In our previous post we saw about implementing Create operation for creating a new entity and persisting to the database. In this article lets see how we can retrieve all the entities stored in the datastore. This would be the Read operation from the CRUD operations in Gaelyk also read: Groovy Tutorials Creating JSON using …
Creating JSON using Groovy
I wrote previously about parsing JSON in Groovy. In this article I show a simple example of creating JSON using Groovy. I had to learn about creating JSON using Groovy as I would be using JSON as the response format in the REST API which might be developed sometime in future. also read: Groovy Tutorials …
Creating, Writing, Reading files using Java Files API of Java 7
Introduction to Java File API In our previous post we did get a taste of the power of the static APIs in the Java Files class and we managed to compare the code written without using the APIs in Java Files and with using the APIs in Java Files. also read: Java 7.0 Tutorials New …
New features in JDBC 3.0
This article provides an introduction to the array of core new features available in JDBC 3.0. More specifically, the features ‘supporting save points’, ‘using parameter metadata’, ‘updating large objects’ and ‘auto generated keys’ are discussed. Wherever possible, to get a hang of it, relevant code samples have been provided in the respective sections. Download Source …
JavaBeat Newsletter-2: New and noteworthy in Java Ecosystem
Interesting blog posts from JavaBeat: Exploring the enhancements to the java.nio package as part of Java 7 we wrote about watching a directory for changes and also looked at few methods in the Files class. Writing agents in Java to instrument the class files/byte code. Using Fork-Join framework introduced as part of Java 7. Getting …
A peek into the Files utility which is part of java.nio package in Java 7
We recently wrote about watching a directory using the new APIs introduced as part of Java 7. In this post let me throw some light on another class added to the java.nio package as part of Java 7 update- java.nio.file.Files. Another piece of information related to this is that complete java.nio.file package was added as …