File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
Object Relational Mapping
[Hibernate] Should I use enum to mapping the column?
Joined: Apr 27, 2004
May 25, 2011 19:26:36
I have a table as below
SEQ_NO VARCHAR2(10) PK ORDER_NO VARCHAR2(10) BILL_TYPE VARCHAR2(1)
For the Bill_TYPE column , the value 0、1 and 2 represent different bill type.
Should I use an enum for the column mapping or only use the normal
for the column mapping?
I think the java string for the column mapping is simpler than enum mapping in the application.
But use enum can avoid assign wrong type value in the code.
Can someone give me other suggestions?
My Way,My Pace
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: [Hibernate] Should I use enum to mapping the column?
JPA Annotation @Column + column defination
How to use a Timestamp as the Identifier
Hibernate Inheritance Mapping Question !
Registering IN OUT parameter
hibernate mapping files for enumerated strings.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014