Bidirectional One to One association mapping (without annotations)

In this post under Hibernate, I will explain how to create a bidirectional one to one association between objects using a mapping file with an example. For our example, we will create the below two tables. Data Definition Language CREATE TABLE `ticket2` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `number` VARCHAR(50) NOT NULL, `description` VARCHAR(100) NOT…… Continue reading Bidirectional One to One association mapping (without annotations)

Unidirectional One to One association mapping (without annotations)

In this post under Hibernate, I will explain how to create a unidirectional one to one association between objects using a mapping file with an example. For our example, we will create the below two tables. Data Definition Language CREATE TABLE `ticket1` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `number` VARCHAR(50) NOT NULL, `description` VARCHAR(100) NOT…… Continue reading Unidirectional One to One association mapping (without annotations)

Listening to Cache Entry Expired events

Whenever a Cache entry is expired, an event (i.e., CacheEntryEvent) is generated. In this post under JCache, I will show with an example how to create a listener to listen for those events and respond. We have to create a listener class which implements the javax.cache.event.CacheEntryExpiredListener interface as shown below import java.util.Iterator; import javax.cache.event.CacheEntryEvent; import…… Continue reading Listening to Cache Entry Expired events

Listening to Cache Entry Update events

Whenever a Cache entry is updated, an event (i.e., CacheEntryEvent) is generated. In this post under JCache, I will show with an example how to create a listener to listen for those events and respond. We have to create a listener class which implements the javax.cache.event.CacheEntryUpdatedListener interface as shown below import java.util.Iterator; import javax.cache.event.CacheEntryEvent; import…… Continue reading Listening to Cache Entry Update events

Listening to Cache Entry Removed events

Whenever a Cache entry is removed, an event (i.e., CacheEntryEvent) is generated. In this post under JCache, I will show with an example how to create a listener to listen for those events and respond. We have to create a listener class which implements the javax.cache.event.CacheEntryRemovedListener interface as shown below import java.util.Iterator; import javax.cache.event.CacheEntryEvent; import…… Continue reading Listening to Cache Entry Removed events

Listening to Cache Entry Created events

Whenever a new Cache entry is created, an event (i.e., CacheEntryEvent) is generated. In this post under JCache, I will show with an example how to create a listener to listen for those events and respond. We have to create a listener class which implements the javax.cache.event.CacheEntryCreatedListener interface as shown below import java.util.Iterator; import javax.cache.event.CacheEntryCreatedListener;…… Continue reading Listening to Cache Entry Created events

Bidirectional One to Many association mapping (without annotations)

In this post under Hibernate, I will explain how to create a bidirectional one to many association between objects using a mapping file with an example. For our example, we will create the below two tables. Data Definition Language CREATE TABLE `series2` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(50) NOT NULL, `description` VARCHAR(100) NOT…… Continue reading Bidirectional One to Many association mapping (without annotations)