| 1 |
<?xml version="1.0"?> |
|---|
| 2 |
<!DOCTYPE hibernate-mapping PUBLIC |
|---|
| 3 |
"-//Hibernate/Hibernate Mapping DTD//EN" |
|---|
| 4 |
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> |
|---|
| 5 |
|
|---|
| 6 |
<!-- =================================================================== |
|---|
| 7 |
Object representing contacts |
|---|
| 8 |
=================================================================== --> |
|---|
| 9 |
|
|---|
| 10 |
<hibernate-mapping> |
|---|
| 11 |
<class name="org.bedework.calfacade.BwContact" |
|---|
| 12 |
table="bw_contacts"> |
|---|
| 13 |
<cache usage="read-write"/> |
|---|
| 14 |
|
|---|
| 15 |
<id name="id" type="integer" column="entityid" unsaved-value="-1"> |
|---|
| 16 |
<generator class="native"/> |
|---|
| 17 |
</id> |
|---|
| 18 |
|
|---|
| 19 |
<version name="seq" column="bwseq" type="integer" /> |
|---|
| 20 |
|
|---|
| 21 |
<property name="creatorHref" column="bw_creator" type="string" |
|---|
| 22 |
index="bwidx_con_creator" /> |
|---|
| 23 |
|
|---|
| 24 |
<property name="ownerHref" column="bw_owner" type="string" |
|---|
| 25 |
index="bwidx_con_owner" /> |
|---|
| 26 |
|
|---|
| 27 |
<property name="access" column="bwaccess" type="string" |
|---|
| 28 |
length="3900" /> |
|---|
| 29 |
|
|---|
| 30 |
<property name="publick" type="true_false" > |
|---|
| 31 |
<column name="publick" not-null="true" /> |
|---|
| 32 |
</property> |
|---|
| 33 |
|
|---|
| 34 |
<property name="uid" column="bw_uid" type="string" length="50" |
|---|
| 35 |
unique="true" |
|---|
| 36 |
not-null="true" |
|---|
| 37 |
index="bwidx_contact_uid" /> |
|---|
| 38 |
|
|---|
| 39 |
<many-to-one name="name" |
|---|
| 40 |
class="org.bedework.calfacade.BwString" |
|---|
| 41 |
column="bw_connameid" |
|---|
| 42 |
unique="true" |
|---|
| 43 |
not-null="true" |
|---|
| 44 |
cascade="all" |
|---|
| 45 |
foreign-key="bw_con_name_fk" /> |
|---|
| 46 |
|
|---|
| 47 |
<property name="phone" column="bw_phone" type="string"/> |
|---|
| 48 |
<property name="email" column="bw_email" type="string"/> |
|---|
| 49 |
<property name="link" column="bw_link" type="string" |
|---|
| 50 |
length="500" /> |
|---|
| 51 |
</class> |
|---|
| 52 |
|
|---|
| 53 |
<!-- ================================================================= |
|---|
| 54 |
Contact queries |
|---|
| 55 |
================================================================= --> |
|---|
| 56 |
|
|---|
| 57 |
<query name="getContactRefs"><![CDATA[ |
|---|
| 58 |
select new org.bedework.calsvci.EventProperties$PropertyRef( |
|---|
| 59 |
ev.colPath,ev.uid) |
|---|
| 60 |
from org.bedework.calfacade.BwEvent as ev |
|---|
| 61 |
where :ent in elements(ev.contacts) |
|---|
| 62 |
]]></query> |
|---|
| 63 |
|
|---|
| 64 |
<query name="getContactRefsCount"><![CDATA[ |
|---|
| 65 |
select count(*) from org.bedework.calfacade.BwEvent as ev |
|---|
| 66 |
where :ent in elements(ev.contacts) |
|---|
| 67 |
]]></query> |
|---|
| 68 |
</hibernate-mapping> |
|---|
| 69 |
|
|---|