Thread:
 currentTime maybe 
 junico   14 Nov 2008, 09:50 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: junico (14 Nov 2008, 09:50) Replies: 0, Views: 333
Subject: currentTime maybe
@MappedSuperclass
public class BaseEntity implements Serializable{

	@Id
	private Long id;
	@Version
	private long version;

	public BaseEntity() {
		try {
			Thread.sleep(2);
			this.id = System.currentTimeMillis();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

@Entity
public class Junico extends BaseEntity{

     public Junico(){
          super();
     }
}
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]