<?xml version="1.0"?>
<!-- @AutoRun -->

<OBJECTS name="">
    <NODE name="Script" factory="Vector">
        <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
            <tableName factory="String">oneit_sec_privilege</tableName>
            <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"/>
            <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='name' factory='String'>TL_AccessCompanyAdmin</value>
            <value name='description' factory='String'>Allow the user to access admin options in company</value>
            <value name='category' factory='String' value="Talentology"/>
        </NODE>
        <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
            <tableName factory="String">oneit_sec_privilege</tableName>
            <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"/>
            <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='name' factory='String'>TL_AccessCompany</value>
            <value name='description' factory='String'>Allow the user to access standared options in company</value>
            <value name='category' factory='String' value="Talentology"/>
        </NODE>
        
        <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
            <tableName factory="String">oneit_sec_role</tableName>
            <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"  keyName="companyAdminRoleID"/>
            <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='name' factory='String'>TL_CompanyAdmin</value>
            <value name='description' factory='String'>Users who is in charge of company</value>
        </NODE>
        <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation">
            <tableName factory="String">oneit_sec_role</tableName>
            <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"  keyName="companyUserRoleID"/>
            <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='name' factory='String'>TL_CompanyUser</value>
            <value name='description' factory='String'>The Standard User</value>
        </NODE>
        
        <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"  query="select object_id as privid from oneit_sec_privilege where name in ('TL_AccessCompanyAdmin','TL_AccessCompany')">
            <tableName factory="String">oneit_sec_role_priv_link</tableName>
            <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"/>
            <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='role_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="companyAdminRoleID"/>
            <value name='priv_id' factory='Participant' class="oneit.sql.transfer.InsertOperation$QueryColumn" column="privid"/>
        </NODE>
        <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"  query="select object_id as privid from oneit_sec_privilege where name in ('TL_AccessCompany')">
            <tableName factory="String">oneit_sec_role_priv_link</tableName>
            <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"/>
            <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='role_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="companyUserRoleID"/>
            <value name='priv_id' factory='Participant' class="oneit.sql.transfer.InsertOperation$QueryColumn" column="privid"/>
        </NODE>
        
        
        <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"  
                query="select user_id from oneit_sec_user_extension where object_type='CompanyUser' AND role_type='ADMIN'">
            <tableName factory="String">oneit_sec_role_grant</tableName>
            <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"/>
            <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='role_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="companyAdminRoleID"/>
            <value name='user_id' factory='Participant' class="oneit.sql.transfer.InsertOperation$QueryColumn" column="user_id"/>
        </NODE>
        <NODE name="insertOp" factory="Participant" class="oneit.sql.transfer.InsertOperation"  
                query="select user_id from oneit_sec_user_extension where object_type='CompanyUser' AND role_type!='ADMIN'">
            <tableName factory="String">oneit_sec_role_grant</tableName>
            <value name='object_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID"/>
            <value name='object_last_updated_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='object_created_date' class="oneit.sql.transfer.DBTransferer$Timestamp"/>
            <value name='role_id' factory='Participant' class="oneit.sql.transfer.DBTransferer$ObjectID" keyName="companyUserRoleID"/>
            <value name='user_id' factory='Participant' class="oneit.sql.transfer.InsertOperation$QueryColumn" column="user_id"/>
        </NODE>
    </NODE>
</OBJECTS>