Tag: java

Creating Displayable Text

Working on cycling through the fields of an object, and programmatically building a user friendly display text for each. To simplify my life, I’m using reflection, and the following method to capitalize the field name, and insert spaces appropriately (for camel-case field names):

Getting Started with Hydra

AddThis recently released Hydra on the open source community, and with my proximity to this technology, I thought it would be a wonderful winter adventure to peruse the code base. After cloning the project from GitHub, I required updating/adding Java 7 to my Eclipse environment. It was a bit more tedious than I expected. I […]

Quick Assessment of Hibernate Efficiency

Out of curiosity, I ran a test to compare the speed at which Hibernate completes executing HQL vs SQL vs Criteria selections. The results are pretty clear. Running the selection a thousand times:HQL Query executed in 1764 msSQL Query executed in 486 msCriteria executed in 683 ms The results were similar for other total executions. […]

Storing Enum in Hibernate 4

I recently faced a conundrum in that I wanted to use an enum to represent a value saved through Hibernate to a database. I didn’t want to store the name of the enum, rather a discriminator bound as a property of the enum. For example: In this situation, I want the status stored as an […]

Integrating Spring Security pt 3

Injecting Custom Authentication You may recall from my first post in this series that my goal was to use Spring Security to enforce user authentication and authorization through my page while using my custom project Passport. Within Passport, I’ve built user management and an email confirmation component. The first hurdle to overcome was integrating Spring […]

Integrating Spring Security pt 2

In a previous post, I gave guidance on how to start using Spring Security to lock down a web application backed by a MySQL database. I’d like to provide another useful resource, this utility class for accessing the username of the currently logged-in user. This class is helpful for finding the current user logged in, […]

Simple Hadoop Overview

As per the Hadoop website: Hadoop is a framework that allows for the distributed processing of large data sets across clusters of computers using a simple programming model. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-availability, […]

Dabbling in Rome

I wanted to read an RSS feed in java, and remembered using a library called Rome. Fortunately, it’s still around and not completely dead (that I can tell). You can find it here. An in the tradition of re-use, here is an article on how to use it.