[jboss-user] [JBoss Seam] - Re: Enum in Seam

smartbinary do-not-reply at jboss.com
Thu Sep 6 13:36:16 EDT 2007


Hi - just in-case you didn't find a solution to this...and are willing to just use the ordinals from the enum...you should be able to use:


  |     public enum Status implements Serializable {
  |         ACTIVE, 
  |         CANCELLED, 
  |         SIGNED;
  |     }
  | 

Then:


  |     @Column(name = "doc_status_cd")
  |     @Enumerated(EnumType.ORDINAL)
  |     public Status getStatus() {
  |         return status;
  |     }
  | 

Just make sure that your db field (doc_status_cd) in the above example is a numeric type of some sort.


Regards,

Todd

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081782#4081782

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081782



More information about the jboss-user mailing list