<?xml version='1.0' encoding='windows-1252' ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">

<ViewObject
   Name="ServiceHistories"
   OrderBy="LINE_NO"
   BindingStyle="OracleName"
   CustomQuery="true"
   ComponentClass="oracle.srdemo.model.frameworkExt.SRViewObjectImpl"
   FetchMode="FETCH_AS_NEEDED"
   UseGlueCode="false" >
   <Properties>
      <Property Name ="InsertNewRowsAtEnd" Value ="true" />
   </Properties>
   <Data>
      <Property Name ="COMPLETE_LIBRARY" Value ="FALSE" />
      <Property Name ="ID" Value ="3fd19779-010a-1000-80b5-8d9088295bcf::::ViewObject" />
      <Property Name ="IS_ABSTRACT" Value ="FALSE" />
      <Property Name ="IS_ACTIVE" Value ="FALSE" />
      <Property Name ="IS_LEAF" Value ="FALSE" />
      <Property Name ="IS_ROOT" Value ="FALSE" />
      <Property Name ="VISIBILITY" Value ="PUBLIC" />
   </Data>
   <SQLQuery><![CDATA[
SELECT ServiceHistory.SVR_ID, 
       ServiceHistory.LINE_NO, 
       ServiceHistory.SVH_DATE, 
       ServiceHistory.NOTES, 
       ServiceHistory.SVH_TYPE, 
       ServiceHistory.CREATED_BY, 
       SystemUser.FIRST_NAME, 
       SystemUser.LAST_NAME, 
       SystemUser.USER_ID
FROM SERVICE_HISTORIES ServiceHistory,
     USERS SystemUser,
     USERS CurrentUser
WHERE ServiceHistory.CREATED_BY = SystemUser.USER_ID
  AND CurrentUser.EMAIL = context_pkg.app_user_name
  AND (CurrentUser.USER_ROLE in ('technician','manager') OR
       ServiceHistory.SVH_TYPE!='Hidden')
   ]]></SQLQuery>
   <DesignTime>
      <Attr Name="_isExpertMode" Value="true" />
      <Attr Name="_version" Value="10.1.3.36.73" />
      <Attr Name="_objectSuperClassName" Value="oracle.srdemo.model.frameworkExt.SRViewObjectImpl" />
      <Attr Name="_codeGenFlag2" Value="Access|VarAccess" />
   </DesignTime>
   <EntityUsage
      Name="ServiceHistory"
      Entity="oracle.srdemo.model.entities.ServiceHistory" >
      <Data>
         <Property Name ="COMPLETE_LIBRARY" Value ="FALSE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80c0-8d9088295bcf::queries.ServiceHistories$ServiceHistory::EntityObjectInstance" />
         <Property Name ="IS_ABSTRACT" Value ="FALSE" />
         <Property Name ="IS_ACTIVE" Value ="FALSE" />
         <Property Name ="IS_LEAF" Value ="FALSE" />
         <Property Name ="IS_ROOT" Value ="FALSE" />
         <Property Name ="VISIBILITY" Value ="PUBLIC" />
      </Data>
      <DesignTime>
         <Attr Name="_queryClause" Value="true" />
         <Attr Name="_queryOrderBy" Value="ServiceHistory.LINE_NO" />
         <Attr Name="_queryWhere" Value="ServiceHistory.CREATED_BY = SystemUser.USER_ID AND (INSTR(UPPER(&#39;,&#39;||(:Role)||&#39;,&#39;),&#39;,TECHNICIAN,&#39;)&#62;0 OR ServiceHistory.SVH_TYPE!=&#39;Hidden&#39;)" />
      </DesignTime>
   </EntityUsage>
   <EntityUsage
      Name="SystemUser"
      Entity="oracle.srdemo.model.entities.User"
      Association="oracle.srdemo.model.entities.associations.ServiceHistoriesCreatedByUser"
      AssociationEnd="oracle.srdemo.model.entities.associations.ServiceHistoriesCreatedByUser.Users"
      SourceUsage="oracle.srdemo.model.queries.ServiceHistories.ServiceHistory"
      ReadOnly="true"
      Reference="true" >
      <Data>
         <Property Name ="COMPLETE_LIBRARY" Value ="FALSE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80c1-8d9088295bcf::queries.ServiceHistories$SystemUser::EntityObjectInstance" />
         <Property Name ="IS_ABSTRACT" Value ="FALSE" />
         <Property Name ="IS_ACTIVE" Value ="FALSE" />
         <Property Name ="IS_LEAF" Value ="FALSE" />
         <Property Name ="IS_ROOT" Value ="FALSE" />
         <Property Name ="VISIBILITY" Value ="PUBLIC" />
      </Data>
      <DesignTime>
         <Attr Name="_queryClause" Value="false" />
         <AttrArray Name="_dstAttributes">
            <Item Value="oracle.srdemo.model.entities.User.UserId" />
         </AttrArray>
         <AttrArray Name="_srcAttributes">
            <Item Value="oracle.srdemo.model.entities.ServiceHistory.CreatedBy" />
         </AttrArray>
      </DesignTime>
   </EntityUsage>
   <ViewAttribute
      Name="SvrId"
      IsNotNull="true"
      EntityAttrName="SvrId"
      EntityUsage="ServiceHistory"
      AliasName="SVR_ID" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80b6-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="LineNo"
      IsNotNull="true"
      EntityAttrName="LineNo"
      EntityUsage="ServiceHistory"
      AliasName="LINE_NO" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80b7-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="SvhDate"
      IsUpdateable="false"
      IsNotNull="true"
      EntityAttrName="SvhDate"
      EntityUsage="ServiceHistory"
      AliasName="SVH_DATE" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80b8-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="Notes"
      IsNotNull="true"
      EntityAttrName="Notes"
      EntityUsage="ServiceHistory"
      AliasName="NOTES" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80b9-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="SvhType"
      IsUpdateable="while_insert"
      IsNotNull="true"
      EntityAttrName="SvhType"
      EntityUsage="ServiceHistory"
      AliasName="SVH_TYPE" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80ba-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="CreatedBy"
      IsNotNull="true"
      EntityAttrName="CreatedBy"
      EntityUsage="ServiceHistory"
      AliasName="CREATED_BY" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80bb-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="Hidden"
      IsQueriable="false"
      IsPersistent="false"
      EntityAttrName="Hidden"
      EntityUsage="ServiceHistory" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80bc-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="FirstName"
      IsNotNull="true"
      EntityAttrName="FirstName"
      EntityUsage="SystemUser"
      AliasName="FIRST_NAME" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80bd-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="LastName"
      IsNotNull="true"
      EntityAttrName="LastName"
      EntityUsage="SystemUser"
      AliasName="LAST_NAME" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80be-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
   <ViewAttribute
      Name="UserId"
      IsNotNull="true"
      EntityAttrName="UserId"
      EntityUsage="SystemUser"
      AliasName="USER_ID" >
      <Data>
         <Property Name ="ATTR_LOAD" Value ="LOAD_EACH" />
         <Property Name ="CHANGEABILITY" Value ="CHANGEABLE" />
         <Property Name ="ID" Value ="3fd19779-010a-1000-80bf-8d9088295bcf::queries.ServiceHistories::ViewObjectAttribute" />
         <Property Name ="IS_NOT_NULL" Value ="TRUE" />
         <Property Name ="IS_OVERRIDE_ATTR" Value ="FALSE" />
         <Property Name ="IS_PERSISTENT" Value ="TRUE" />
         <Property Name ="IS_QUERIABLE" Value ="TRUE" />
         <Property Name ="IS_SUPER_ATTR" Value ="FALSE" />
         <Property Name ="IS_UNIQUE" Value ="FALSE" />
         <Property Name ="IS_UPDATEABLE" Value ="UPDATEABLE" />
         <Property Name ="IS_VISIBLE" Value ="TRUE" />
         <Property Name ="MULTIPLICITY" Value ="1" />
         <Property Name ="OWNER_SCOPE" Value ="INSTANCE" />
         <Property Name ="VISIBILITY" Value ="PACKAGE" />
      </Data>
   </ViewAttribute>
</ViewObject>
