Results 1 to 4 of 4

Thread: Database initialization

  1. #1

    Default Database initialization

    I'd like to use Java constants (public static final) to be able to make comparisions like myProcess.getState.equals(ProcessState.CLOSED), but I'd also like them to be in the database. In my example, I'd have a ProcessState table which would have every possible state.

    Does Spring + Hibernate support that database initialization somehow?

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I don't see how it can be in Java as a static and at the same time dynamic in the database.
    Last edited by karldmoore; Aug 29th, 2007 at 12:08 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  3. #3

    Default

    Those are values needed at the database just read-only, they won't change.

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I appreciate what you are saying. You could model the values as normal immutable entities, but they aren't static they've come from the database.
    Last edited by karldmoore; Aug 29th, 2007 at 12:07 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •