Merged V2.2 to HEAD

7629: QName Refactor Merge 6 of 9
   7630: QName Refactor Merge 7 of 9
   7631: QName Refactor Merge 8 of 9
   7632: QName Refactor Merge 9 of 9


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8438 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2008-03-06 19:11:36 +00:00
parent 00e81c0d66
commit d389ff1936
30 changed files with 805 additions and 746 deletions

View File

@@ -24,13 +24,13 @@
<!-- Fact properties -->
<property name="userId" column="user_id" type="string" length="255" not-null="true" index="adt_user_idx"/>
<property name="userId" column="user_id" type="string" length="255" not-null="true" index="idx_alf_adtf_usr"/>
<property name="date" column="timestamp" type="timestamp" not-null="true"/>
<property name="transactionId" column="transaction_id" type="string" length="56" not-null="true"/>
<property name="sessionId" column="session_id" type="string" length="56" not-null="false"/>
<property name="storeProtocol" column="store_protocol" type="string" length="50" not-null="false" index="adt_store_idx"/>
<property name="storeId" column="store_id" type="string" length="100" not-null="false" index="adt_store_idx"/>
<property name="nodeUUID" column="node_uuid" type="string" length="36" not-null="false" index="adt_store_idx"/>
<property name="storeProtocol" column="store_protocol" type="string" length="50" not-null="false" index="idx_alf_adtf_ref"/>
<property name="storeId" column="store_id" type="string" length="100" not-null="false" index="idx_alf_adtf_ref"/>
<property name="nodeUUID" column="node_uuid" type="string" length="36" not-null="false" index="idx_alf_adtf_ref"/>
<property name="path" column="path" type="string" length="512" not-null="false"/>
<property name="filtered" column="filtered" type="boolean" not-null="true"/>
<property name="returnValue" column="return_val" type="string" length="1024" not-null="false"/>
@@ -67,16 +67,16 @@
<!-- Date is used as the key for look up -->
<property name="date" column="date_only" type="date" index="adt_date_idx" not-null="true"/>
<property name="dayOfYear" column="day_of_year" type="integer" index="adt_doy_idx" not-null="true"/>
<property name="dayOfMonth" column="day_of_month" type="integer" index="adt_dom_idx" not-null="true"/>
<property name="dayOfWeek" column="day_of_week" type="integer" index="adt_dow_idx" not-null="true"/>
<property name="weekOfYear" column="week_of_year" type="integer" index="adt_woy_idx" not-null="true"/>
<property name="weekOfMonth" column="week_of_month" type="integer" index="adt_wom_idx" not-null="true"/>
<property name="month" column="month" type="integer" index="adt_m_idx" not-null="true"/>
<property name="quarter" column="quarter" type="integer" index="adt_q_idx" not-null="true"/>
<property name="halfYear" column="halfYear" type="integer" index="adt_hy_idx" not-null="true"/>
<property name="year" column="year" type="integer" index="adt_y_idx" not-null="true"/>
<property name="date" column="date_only" type="date" index="idx_alf_adtd_dat" not-null="true"/>
<property name="dayOfYear" column="day_of_year" type="integer" index="idx_alf_adtd_doy" not-null="true"/>
<property name="dayOfMonth" column="day_of_month" type="integer" index="idx_alf_adtd_dom" not-null="true"/>
<property name="dayOfWeek" column="day_of_week" type="integer" index="idx_alf_adtd_dow" not-null="true"/>
<property name="weekOfYear" column="week_of_year" type="integer" index="idx_alf_adtd_woy" not-null="true"/>
<property name="weekOfMonth" column="week_of_month" type="integer" index="idx_alf_adtd_wom" not-null="true"/>
<property name="month" column="month" type="integer" index="idx_alf_adtd_m" not-null="true"/>
<property name="quarter" column="quarter" type="integer" index="idx_alf_adtd_q" not-null="true"/>
<property name="halfYear" column="halfYear" type="integer" index="idx_alf_adtd_hy" not-null="true"/>
<property name="year" column="year" type="integer" index="idx_alf_adtd_y" not-null="true"/>
</class>
@@ -109,9 +109,9 @@
<!-- The app_source_idx index is used to find the app source -->
<!-- The look up is always the tripple, the service and method or just the method may be null -->
<property name="application" column="application" type="string" length="255" not-null="true" index="app_source_app_idx"/>
<property name="service" column="service" type="string" length="255" not-null="false" index="app_source_ser_idx"/>
<property name="method" column="method" type="string" length="255" not-null="false" index="app_source_met_idx"/>
<property name="application" column="application" type="string" length="255" not-null="true" index="idx_alf_adts_app"/>
<property name="service" column="service" type="string" length="255" not-null="false" index="idx_alf_adts_ser"/>
<property name="method" column="method" type="string" length="255" not-null="false" index="idx_alf_adts_met"/>
</class>

View File

@@ -92,13 +92,21 @@
<natural-id mutable="true">
<many-to-one name="accessControlList"
class="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl"
column="acl_id" lazy="no-proxy" fetch="select"
optimistic-lock="true" not-null="true"/>
column="acl_id"
foreign-key="fk_alf_aclm_acl"
lazy="no-proxy"
fetch="select"
optimistic-lock="true"
not-null="true"/>
<many-to-one name="accessControlEntry"
class="org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl"
column="ace_id" lazy="no-proxy" fetch="select"
optimistic-lock="true" not-null="true"/>
column="ace_id"
foreign-key="fk_alf_aclm_ace"
lazy="no-proxy"
fetch="select"
optimistic-lock="true"
not-null="true"/>
<property name="position" column="pos" type="int"/>
</natural-id>
@@ -230,13 +238,21 @@
<natural-id mutable="true">
<many-to-one name="authority"
class="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
column="auth_id" lazy="no-proxy" fetch="select"
optimistic-lock="true" not-null="true"/>
column="auth_id"
foreign-key="fk_alf_autha_aut"
lazy="no-proxy"
fetch="select"
optimistic-lock="true"
not-null="true"/>
<many-to-one name="alias"
class="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
column="alias_id" lazy="no-proxy" fetch="select"
optimistic-lock="true" not-null="true"/>
column="alias_id"
foreign-key="fk_alf_autha_ali"
lazy="no-proxy"
fetch="select"
optimistic-lock="true"
not-null="true"/>
</natural-id>
<version column="version" name="version" type="long"/>

View File

@@ -33,7 +33,7 @@
not-null="false"
cascade="none" />
<property name="changeTxnId" column="change_txn_id" type="string" length="56" not-null="true" />
<property name="commitTimeMs" column="commit_time_ms" type="long" not-null="false" index="idx_commit_time_ms" />
<property name="commitTimeMs" column="commit_time_ms" type="long" not-null="false" index="idx_alf_txn_ctms" />
</class>
<class

View File

@@ -654,7 +654,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean
}
InputStream scriptInputStream = new FileInputStream(scriptFile);
BufferedReader reader = new BufferedReader(new InputStreamReader(scriptInputStream, "UTF8"));
BufferedReader reader = new BufferedReader(new InputStreamReader(scriptInputStream, "UTF-8"));
try
{
int line = 0;
@@ -695,11 +695,21 @@ public class SchemaBootstrap extends AbstractLifecycleBean
execute = true;
optional = false;
}
else if (sql.endsWith(";(optional)"))
else if (sql.endsWith("(optional)") || sql.endsWith("(OPTIONAL)"))
{
sql = sql.substring(0, sql.length() - 11);
execute = true;
optional = true;
// Get the end of statement
int endIndex = sql.lastIndexOf(';');
if (endIndex > 0)
{
sql = sql.substring(0, endIndex);
execute = true;
optional = true;
}
else
{
// Ends with "(optional)" but there is no semi-colon.
// Just take it at face value and probably fail.
}
}
// append to the statement being built up
sb.append(" ").append(sql);