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

<service-builder root-dir=".." package-path="com.liferay.portlet">
	<portlet name="Wiki" short-name="Wiki" />
	<entity name="WikiNode" local-service="true" remote-service="true">

		<!-- PK fields -->

		<column name="nodeId" type="String" primary="true" />

		<!-- Group instance -->

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

		<!-- Audit fields -->

		<column name="companyId" type="String" />
		<column name="userId" type="String" />
		<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" />

		<!-- 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>

		<!-- References -->

		<reference package-path="com.liferay.portal" entity="Resource" />
	</entity>
	<entity name="WikiPage" local-service="true" remote-service="true">

		<!-- PK fields -->

		<column name="nodeId" type="String" primary="true" />
		<column name="title" type="String" primary="true" />
		<column name="version" type="double" primary="true" />

		<!-- Audit fields -->

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

		<!-- Other fields -->

		<column name="content" type="String" />
		<column name="format" type="String" />
		<column name="head" type="boolean" />

		<!-- Order -->

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

		<!-- Finder methods -->

		<finder name="NodeId" return-type="Collection">
			<finder-column name="nodeId" />
		</finder>
		<finder name="N_T" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="title" />
		</finder>
		<finder name="N_H" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="head" />
		</finder>
		<finder name="N_T_H" return-type="Collection">
			<finder-column name="nodeId" />
			<finder-column name="title" />
			<finder-column name="head" />
		</finder>
	</entity>
	<exceptions>
		<exception>NodeName</exception>
		<exception>NoSuchNode</exception>
		<exception>NoSuchPage</exception>
		<exception>PageContent</exception>
		<exception>PageTitle</exception>
	</exceptions>
</service-builder>