<?xml version="1.0"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd">

<service-builder package-path="com.liferay.portlet.wiki">
	<namespace>Wiki</namespace>
	<entity name="WikiNode" uuid="true" local-service="true" remote-service="true" trash-enabled="true">

		<!-- PK fields -->

		<column name="nodeId" type="long" primary="true" container-model="true" />

		<!-- Group instance -->

		<column name="groupId" type="long" />

		<!-- Audit fields -->

		<column name="companyId" type="long" />
		<column name="userId" type="long" />
		<column name="userName" type="String" />
		<column name="createDate" type="Date" />
		<column name="modifiedDate" type="Date" />

		<!-- Other fields -->

		<column name="name" type="String" />
		<column name="description" type="String" />
		<column name="lastPostDate" type="Date" />
		<column name="status" type="int" />
		<column name="statusByUserId" type="long" />
		<column name="statusByUserName" type="String" />
		<column name="statusDate" type="Date" />

		<!-- Order -->

		<order by="asc">
			<order-column name="name" case-sensitive="false" />
		</order>

		<!-- Finder methods -->

		<finder name="GroupId" return-type="Collection">
			<finder-column name="groupId" />
		</finder>
		<finder name="CompanyId" return-type="Collection">
			<finder-column name="companyId" />
		</finder>
		<finder name="G_N" return-type="WikiNode" unique="true">
			<finder-column name="groupId" />
			<finder-column name="name" />
		</finder>
		<finder name="G_S" return-type="Collection">
			<finder-column name="groupId" />
			<finder-column name="status" />
		</finder>
		<finder name="C_S" return-type="Collection">
			<finder-column name="companyId" />
			<finder-column name="status" />
		</finder>

		<!-- References -->

		<reference package-path="com.liferay.portal" entity="Group" />
		<reference package-path="com.liferay.portal" entity="Subscription" />
		<reference package-path="com.liferay.portal" entity="SystemEvent" />
		<reference package-path="com.liferay.portal" entity="WorkflowInstanceLink" />
		<reference package-path="com.liferay.portlet.asset" entity="AssetEntry" />
		<reference package-path="com.liferay.portlet.trash" entity="TrashEntry" />
		<reference package-path="com.liferay.portlet.trash" entity="TrashVersion" />
	</entity>
	<entity name="WikiPage" uuid="true" local-service="true" remote-service="true" trash-enabled="true">

		<!-- PK fields -->

		<column name="pageId" type="long" primary="true" />

		<!-- Resource -->

		<column name="resourcePrimKey" type="long" filter-primary="true" />

		<!-- Group instance -->

		<column name="groupId" type="long" />

		<!-- Audit fields -->

		<column name="companyId" type="long" />
		<column name="userId" type="long" />
		<column name="userName" type="String" />
		<column name="createDate" type="Date" />
		<column name="modifiedDate" type="Date" />

		<!-- Other fields -->

		<column name="nodeId" type="long" />
		<column name="title" type="String" />
		<column name="version" type="double" />
		<column name="minorEdit" type="boolean" />
		<column name="content" type="String" />
		<column name="summary" type="String" />
		<column name="format" type="String" />
		<column name="head" type="boolean" />
		<column name="parentTitle" type="String" />
		<column name="redirectTitle" type="String" />
		<column name="status" type="int" />
		<column name="statusByUserId" type="long" />
		<column name="statusByUserName" type="String" />
		<column name="statusDate" type="Date" />

		<!-- Order -->

		<order by="asc">
			<order-column name="nodeId" />
			<order-column name="title" case-sensitive="false" />
			<order-column name="version" order-by="desc" />
		</order>

		<!-- Finder methods -->

		<finder name="ResourcePrimKey" return-type="Collection">
			<finder-column name="resourcePrimKey" />
		</finder>
		<finder name="NodeId" return-type="Collection">
			<finder-column name="nodeId" />
		</finder>
		<finder name="Format" return-type="Collection">
			<finder-column name="format" />
		</finder>
		<finder name="R_N" return-type="Collection">
			<finder-column name="resourcePrimKey" />
			<finder-column name="nodeId" />
		</finder>
		<finder name="R_S" return-type="Collection">
			<finder-column name="resourcePrimKey" />
			<finder-column name="status" />
		</finder>
		<finder name="N_T" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="title" case-sensitive="false" />
		</finder>
		<finder name="N_H" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
		</finder>
		<finder name="N_P" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="parentTitle" case-sensitive="false" />
		</finder>
		<finder name="N_R" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="redirectTitle" case-sensitive="false" />
		</finder>
		<finder name="N_S" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="status" />
		</finder>
		<finder name="R_N_V" return-type="WikiPage" unique="true">
			<finder-column name="resourcePrimKey" />
			<finder-column name="nodeId" />
			<finder-column name="version" />
		</finder>
		<finder name="R_N_H" return-type="Collection">
			<finder-column name="resourcePrimKey" />
			<finder-column name="nodeId" />
			<finder-column name="head" />
		</finder>
		<finder name="R_N_S" return-type="Collection">
			<finder-column name="resourcePrimKey" />
			<finder-column name="nodeId" />
			<finder-column name="status" />
		</finder>
		<finder name="G_N_H" return-type="Collection">
			<finder-column name="groupId" />
			<finder-column name="nodeId" />
			<finder-column name="head" />
		</finder>
		<finder name="G_N_S" return-type="Collection">
			<finder-column name="groupId" />
			<finder-column name="nodeId" />
			<finder-column name="status" />
		</finder>
		<finder name="U_N_S" return-type="Collection">
			<finder-column name="userId" />
			<finder-column name="nodeId" />
			<finder-column name="status" />
		</finder>
		<finder name="N_T_V" return-type="WikiPage" unique="true">
			<finder-column name="nodeId" />
			<finder-column name="title" case-sensitive="false" />
			<finder-column name="version" />
		</finder>
		<finder name="N_T_H" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="title" case-sensitive="false" />
			<finder-column name="head" />
		</finder>
		<finder name="N_T_S" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="title" case-sensitive="false" />
			<finder-column name="status" />
		</finder>
		<finder name="N_H_P" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="parentTitle" case-sensitive="false" />
		</finder>
		<finder name="N_H_R" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="redirectTitle" case-sensitive="false" />
		</finder>
		<finder name="N_H_S" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="status" />
		</finder>
		<finder name="N_H_NotS" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="status" comparator="!=" />
		</finder>
		<finder name="G_U_N_S" return-type="Collection">
			<finder-column name="groupId" />
			<finder-column name="userId" />
			<finder-column name="nodeId" />
			<finder-column name="status" />
		</finder>
		<finder name="G_N_T_H" return-type="Collection">
			<finder-column name="groupId" />
			<finder-column name="nodeId" />
			<finder-column name="title" case-sensitive="false" />
			<finder-column name="head" />
		</finder>
		<finder name="G_N_H_S" return-type="Collection">
			<finder-column name="groupId" />
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="status" />
		</finder>
		<finder name="N_H_P_S" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="parentTitle" case-sensitive="false" />
			<finder-column name="status" />
		</finder>
		<finder name="N_H_P_NotS" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="parentTitle" case-sensitive="false" />
			<finder-column name="status" comparator="!=" />
		</finder>
		<finder name="N_H_R_S" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="redirectTitle" case-sensitive="false" />
			<finder-column name="status" />
		</finder>
		<finder name="N_H_R_NotS" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="redirectTitle" case-sensitive="false" />
			<finder-column name="status" comparator="!=" />
		</finder>
		<finder name="G_N_H_P_S" return-type="Collection">
			<finder-column name="groupId" />
			<finder-column name="nodeId" />
			<finder-column name="head" />
			<finder-column name="parentTitle" case-sensitive="false" />
			<finder-column name="status" />
		</finder>

		<!-- References -->

		<reference package-path="com.liferay.portal" entity="Company" />
		<reference package-path="com.liferay.portal" entity="Group" />
		<reference package-path="com.liferay.portal" entity="Layout" />
		<reference package-path="com.liferay.portal" entity="PortletPreferences" />
		<reference package-path="com.liferay.portal" entity="Subscription" />
		<reference package-path="com.liferay.portal" entity="SystemEvent" />
		<reference package-path="com.liferay.portal" entity="WorkflowInstanceLink" />
		<reference package-path="com.liferay.portlet.asset" entity="AssetCategory" />
		<reference package-path="com.liferay.portlet.asset" entity="AssetEntry" />
		<reference package-path="com.liferay.portlet.asset" entity="AssetLink" />
		<reference package-path="com.liferay.portlet.asset" entity="AssetTag" />
		<reference package-path="com.liferay.portlet.expando" entity="ExpandoRow" />
		<reference package-path="com.liferay.portlet.messageboards" entity="MBMessage" />
		<reference package-path="com.liferay.portlet.social" entity="SocialActivity" />
		<reference package-path="com.liferay.portlet.trash" entity="TrashEntry" />
		<reference package-path="com.liferay.portlet.trash" entity="TrashVersion" />

		<!-- Transactions -->

		<tx-required>getPage</tx-required>
	</entity>
	<entity name="WikiPageResource" uuid="true" local-service="true" remote-service="false">

		<!-- PK fields -->

		<column name="resourcePrimKey" type="long" primary="true" />

		<!-- Other fields -->

		<column name="nodeId" type="long" />
		<column name="title" type="String" />

		<!-- Finder methods -->

		<finder name="N_T" return-type="WikiPageResource" unique="true">
			<finder-column name="nodeId" />
			<finder-column name="title" />
		</finder>
	</entity>
	<exceptions>
		<exception>DuplicateNodeName</exception>
		<exception>DuplicatePage</exception>
		<exception>ImportFiles</exception>
		<exception>NodeName</exception>
		<exception>NoSuchNode</exception>
		<exception>NoSuchPage</exception>
		<exception>PageContent</exception>
		<exception>PageTitle</exception>
		<exception>PageVersion</exception>
		<exception>RequiredNode</exception>
		<exception>WikiFormat</exception>
	</exceptions>
</service-builder>