-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Does possible mapping class + enum's + domain table?
PostPosted: Mon Sep 11, 2006 8:39 am 
Newbie

Joined: Sun Nov 20, 2005 10:23 am
Posts: 19
Hi all,

I'm trying write a mapping file to my schema but I not kwnow as... see:

############### class definitions #############

public enum MediaPosition { Master, Slave }
public enum MediaType { Hard, CD, DVD }

public class Media
{
//...
public int ID { ... }
public string Label { ... }
public MediaType Type { ... }
public MediaPosition Position { ... }
//...
}

############### database schema #############

TAB_MEDIA
-----------------
id int,
label varchar(25),
type varchar(2),
position varchar(2)

TAB_DOMAIN
-----------------
field varchar(20),
code varchar(2),
text varchar(40)


############### rows samples #############

TAB_MEDIA
----------------------------------------------------
ID LABEL TYPE POSITION
----------------------------------------------------
0 'MED_00001' '01' '01'
1 'MED_00002' '01' '01'
2 'MED_00003' '02' '02'
3 'MED_00004' '03' '01'
4 'MED_00005' '03' '02'
5 'MED_00006' '01' '02'

TAB_DOMAIN
--------------------------------------------------------------
FIELD CODE TEXT
--------------------------------------------------------------
'Position' '01' 'Media in marter position'
'Position' '02' 'Media in slave position'
'Type' '01' 'Hard disk drive'
'Type' '02' 'CD-ROM drive'
'Type' '03' 'DVD-ROM drive'


Is possible mapping this structure?


Thank's in advice by help...

[]'s
FernandoVM


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.