|
Hibernate example source code file (VideoSystem.java)
The Hibernate VideoSystem.java source code//$Id$ package org.hibernate.ejb.test.callbacks; import javax.persistence.EntityListeners; import javax.persistence.ExcludeSuperclassListeners; import javax.persistence.MappedSuperclass; import javax.persistence.PrePersist; import javax.persistence.PreUpdate; /** * @author Emmanuel Bernard */ @ExcludeSuperclassListeners @EntityListeners({FirstOneListener.class, IncreaseListener.class}) @MappedSuperclass public class VideoSystem extends CommunicationSystem { public transient int counter = 0; @PreUpdate public void increase() { isFirst = false; isLast = false; communication++; } @PrePersist public void prepareEntity() { counter++; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate VideoSystem.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.