[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: HQL and enum constants

alexg79 do-not-reply at jboss.com
Thu Feb 22 11:10:16 EST 2007


For the record, here's the code for the MaterialUnit enum inside the Material class:

  |     public enum MaterialUnit {
  |         SQUARE_METRES("m\u00b2"),
  |         ROLLS("rll"),
  |         PIECES("kpl"),
  |         KILOGRAMS("kg");
  | 
  |         private final String name;
  |         
  |         private MaterialUnit(final String name) {
  | 		this.name = name;
  | 	}
  | 
  | 	@Override
  |         public String toString() {
  | 		return name;
  |         }
  |         
  |     }
  | 

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

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



More information about the jboss-user mailing list