<?xml version="1.0" encoding="utf-8"?>
<data-map project-version="2.0">
	<property name="defaultPackage" value="com.aimluck.eip.cayenne.om.social"/>
	<db-entity name="activity">
		<db-attribute name="APP_ID" type="VARCHAR" isMandatory="true" length="255"/>
		<db-attribute name="BODY" type="CLOB"/>
		<db-attribute name="EXTERNAL_ID" type="VARCHAR" length="99"/>
		<db-attribute name="ICON" type="VARCHAR" length="255"/>
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
		<db-attribute name="LOGIN_NAME" type="VARCHAR" isMandatory="true" length="32"/>
		<db-attribute name="MODULE_ID" type="INTEGER"/>
		<db-attribute name="PORTLET_PARAMS" type="VARCHAR" length="99"/>
		<db-attribute name="PRIORITY" type="FLOAT"/>
		<db-attribute name="TITLE" type="VARCHAR" isMandatory="true" length="99"/>
		<db-attribute name="UPDATE_DATE" type="TIMESTAMP"/>
	</db-entity>
	<db-entity name="activity_map">
		<db-attribute name="ACTIVITY_ID" type="INTEGER"/>
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
		<db-attribute name="IS_READ" type="INTEGER"/>
		<db-attribute name="LOGIN_NAME" type="VARCHAR" isMandatory="true" length="32"/>
	</db-entity>
	<db-entity name="app_data">
		<db-attribute name="APP_ID" type="VARCHAR" isMandatory="true" length="255"/>
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
		<db-attribute name="LOGIN_NAME" type="VARCHAR" isMandatory="true" length="32"/>
		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="99"/>
		<db-attribute name="VALUE" type="CLOB"/>
	</db-entity>
	<db-entity name="application">
		<db-attribute name="APP_ID" type="VARCHAR" isMandatory="true" length="255"/>
		<db-attribute name="CONSUMER_KEY" type="VARCHAR" length="99"/>
		<db-attribute name="CONSUMER_SECRET" type="VARCHAR" length="99"/>
		<db-attribute name="CREATE_DATE" type="DATE"/>
		<db-attribute name="DESCRIPTION" type="CLOB"/>
		<db-attribute name="ICON" type="VARCHAR" length="255"/>
		<db-attribute name="ICON64" type="VARCHAR" length="255"/>
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
		<db-attribute name="STATUS" type="INTEGER"/>
		<db-attribute name="SUMMARY" type="VARCHAR" length="255"/>
		<db-attribute name="TITLE" type="VARCHAR" length="99"/>
		<db-attribute name="UPDATE_DATE" type="TIMESTAMP"/>
		<db-attribute name="URL" type="VARCHAR" isMandatory="true" length="255"/>
	</db-entity>
	<db-entity name="container_config">
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
		<db-attribute name="NAME" type="VARCHAR" isMandatory="true" length="64"/>
		<db-attribute name="VALUE" type="VARCHAR" length="255"/>
	</db-entity>
	<db-entity name="module_id">
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
	</db-entity>
	<db-entity name="oauth_consumer">
		<db-attribute name="APP_ID" type="INTEGER"/>
		<db-attribute name="CONSUMER_KEY" type="VARCHAR" length="255"/>
		<db-attribute name="CONSUMER_SECRET" type="VARCHAR" length="255"/>
		<db-attribute name="CREATE_DATE" type="DATE"/>
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isGenerated="true" isMandatory="true"/>
		<db-attribute name="NAME" type="VARCHAR" length="99"/>
		<db-attribute name="TYPE" type="VARCHAR" length="99"/>
		<db-attribute name="UPDATE_DATE" type="TIMESTAMP"/>
	</db-entity>
	<db-entity name="oauth_entry">
		<db-attribute name="APP_ID" type="VARCHAR" length="255"/>
		<db-attribute name="AUTHORIZED" type="INTEGER"/>
		<db-attribute name="CALLBACK_TOKEN" type="VARCHAR" length="255"/>
		<db-attribute name="CALLBACK_TOKEN_ATTEMPTS" type="INTEGER"/>
		<db-attribute name="CALLBACK_URL" type="VARCHAR" length="255"/>
		<db-attribute name="CALLBACK_URL_SIGNED" type="INTEGER"/>
		<db-attribute name="CONSUMER_KEY" type="VARCHAR" length="255"/>
		<db-attribute name="CONTAINER" type="VARCHAR" length="32"/>
		<db-attribute name="DOMAIN" type="VARCHAR" length="255"/>
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
		<db-attribute name="ISSUE_TIME" type="TIMESTAMP"/>
		<db-attribute name="OAUTH_VERSION" type="VARCHAR" length="16"/>
		<db-attribute name="TOKEN" type="VARCHAR" length="255"/>
		<db-attribute name="TOKEN_SECRET" type="VARCHAR" length="255"/>
		<db-attribute name="TYPE" type="VARCHAR" length="32"/>
		<db-attribute name="USER_ID" type="VARCHAR" length="64"/>
	</db-entity>
	<db-entity name="oauth_token">
		<db-attribute name="ACCESS_TOKEN" type="VARCHAR" length="255"/>
		<db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
		<db-attribute name="SESSION_HANDLE" type="VARCHAR" length="255"/>
		<db-attribute name="TOKEN_EXPIRE_MILIS" type="INTEGER"/>
		<db-attribute name="TOKEN_SECRET" type="VARCHAR" length="255"/>
	</db-entity>
	<obj-entity name="Activity" className="com.aimluck.eip.cayenne.om.social.Activity" dbEntityName="activity">
		<obj-attribute name="appId" type="java.lang.String" db-attribute-path="APP_ID"/>
		<obj-attribute name="body" type="java.lang.String" db-attribute-path="BODY"/>
		<obj-attribute name="externalId" type="java.lang.String" db-attribute-path="EXTERNAL_ID"/>
		<obj-attribute name="icon" type="java.lang.String" db-attribute-path="ICON"/>
		<obj-attribute name="loginName" type="java.lang.String" db-attribute-path="LOGIN_NAME"/>
		<obj-attribute name="moduleId" type="java.lang.Integer" db-attribute-path="MODULE_ID"/>
		<obj-attribute name="portletParams" type="java.lang.String" db-attribute-path="PORTLET_PARAMS"/>
		<obj-attribute name="priority" type="java.lang.Float" db-attribute-path="PRIORITY"/>
		<obj-attribute name="title" type="java.lang.String" db-attribute-path="TITLE"/>
		<obj-attribute name="updateDate" type="java.util.Date" db-attribute-path="UPDATE_DATE"/>
	</obj-entity>
	<obj-entity name="ActivityMap" className="com.aimluck.eip.cayenne.om.social.ActivityMap" dbEntityName="activity_map">
		<obj-attribute name="isRead" type="java.lang.Integer" db-attribute-path="IS_READ"/>
		<obj-attribute name="loginName" type="java.lang.String" db-attribute-path="LOGIN_NAME"/>
	</obj-entity>
	<obj-entity name="AppData" className="com.aimluck.eip.cayenne.om.social.AppData" dbEntityName="app_data">
		<obj-attribute name="appId" type="java.lang.String" db-attribute-path="APP_ID"/>
		<obj-attribute name="loginName" type="java.lang.String" db-attribute-path="LOGIN_NAME"/>
		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
		<obj-attribute name="value" type="java.lang.String" db-attribute-path="VALUE"/>
	</obj-entity>
	<obj-entity name="Application" className="com.aimluck.eip.cayenne.om.social.Application" dbEntityName="application">
		<obj-attribute name="appId" type="java.lang.String" db-attribute-path="APP_ID"/>
		<obj-attribute name="consumerKey" type="java.lang.String" db-attribute-path="CONSUMER_KEY"/>
		<obj-attribute name="consumerSecret" type="java.lang.String" db-attribute-path="CONSUMER_SECRET"/>
		<obj-attribute name="createDate" type="java.util.Date" db-attribute-path="CREATE_DATE"/>
		<obj-attribute name="description" type="java.lang.String" db-attribute-path="DESCRIPTION"/>
		<obj-attribute name="icon" type="java.lang.String" db-attribute-path="ICON"/>
		<obj-attribute name="icon64" type="java.lang.String" db-attribute-path="ICON64"/>
		<obj-attribute name="status" type="java.lang.Integer" db-attribute-path="STATUS"/>
		<obj-attribute name="summary" type="java.lang.String" db-attribute-path="SUMMARY"/>
		<obj-attribute name="title" type="java.lang.String" db-attribute-path="TITLE"/>
		<obj-attribute name="updateDate" type="java.util.Date" db-attribute-path="UPDATE_DATE"/>
		<obj-attribute name="url" type="java.lang.String" db-attribute-path="URL"/>
	</obj-entity>
	<obj-entity name="ContainerConfig" className="com.aimluck.eip.cayenne.om.social.ContainerConfig" dbEntityName="container_config">
		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
		<obj-attribute name="value" type="java.lang.String" db-attribute-path="VALUE"/>
	</obj-entity>
	<obj-entity name="ModuleId" className="com.aimluck.eip.cayenne.om.social.ModuleId" dbEntityName="module_id">
	</obj-entity>
	<obj-entity name="OAuthConsumer" className="com.aimluck.eip.cayenne.om.social.OAuthConsumer" dbEntityName="oauth_consumer">
		<obj-attribute name="consumerKey" type="java.lang.String" db-attribute-path="CONSUMER_KEY"/>
		<obj-attribute name="consumerSecret" type="java.lang.String" db-attribute-path="CONSUMER_SECRET"/>
		<obj-attribute name="createDate" type="java.util.Date" db-attribute-path="CREATE_DATE"/>
		<obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/>
		<obj-attribute name="type" type="java.lang.String" db-attribute-path="TYPE"/>
		<obj-attribute name="updateDate" type="java.util.Date" db-attribute-path="UPDATE_DATE"/>
	</obj-entity>
	<obj-entity name="OAuthEntry" className="com.aimluck.eip.cayenne.om.social.OAuthEntry" dbEntityName="oauth_entry">
		<obj-attribute name="appId" type="java.lang.String" db-attribute-path="APP_ID"/>
		<obj-attribute name="authorized" type="java.lang.Integer" db-attribute-path="AUTHORIZED"/>
		<obj-attribute name="callbackToken" type="java.lang.String" db-attribute-path="CALLBACK_TOKEN"/>
		<obj-attribute name="callbackTokenAttempts" type="java.lang.Integer" db-attribute-path="CALLBACK_TOKEN_ATTEMPTS"/>
		<obj-attribute name="callbackUrl" type="java.lang.String" db-attribute-path="CALLBACK_URL"/>
		<obj-attribute name="callbackUrlSigned" type="java.lang.Integer" db-attribute-path="CALLBACK_URL_SIGNED"/>
		<obj-attribute name="consumerKey" type="java.lang.String" db-attribute-path="CONSUMER_KEY"/>
		<obj-attribute name="container" type="java.lang.String" db-attribute-path="CONTAINER"/>
		<obj-attribute name="domain" type="java.lang.String" db-attribute-path="DOMAIN"/>
		<obj-attribute name="issueTime" type="java.util.Date" db-attribute-path="ISSUE_TIME"/>
		<obj-attribute name="oauthVersion" type="java.lang.String" db-attribute-path="OAUTH_VERSION"/>
		<obj-attribute name="token" type="java.lang.String" db-attribute-path="TOKEN"/>
		<obj-attribute name="tokenSecret" type="java.lang.String" db-attribute-path="TOKEN_SECRET"/>
		<obj-attribute name="type" type="java.lang.String" db-attribute-path="TYPE"/>
		<obj-attribute name="userId" type="java.lang.String" db-attribute-path="USER_ID"/>
	</obj-entity>
	<obj-entity name="OAuthToken" className="com.aimluck.eip.cayenne.om.social.OAuthToken" dbEntityName="oauth_token">
		<obj-attribute name="accessToken" type="java.lang.String" db-attribute-path="ACCESS_TOKEN"/>
		<obj-attribute name="id" type="java.lang.Integer" db-attribute-path="ID"/>
		<obj-attribute name="sessionHandle" type="java.lang.String" db-attribute-path="SESSION_HANDLE"/>
		<obj-attribute name="tokenExpireMilis" type="java.lang.Integer" db-attribute-path="TOKEN_EXPIRE_MILIS"/>
		<obj-attribute name="tokenSecret" type="java.lang.String" db-attribute-path="TOKEN_SECRET"/>
	</obj-entity>
	<db-relationship name="activityMaps" source="activity" target="activity_map" toMany="true">
		<db-attribute-pair source="ID" target="ACTIVITY_ID"/>
	</db-relationship>
	<db-relationship name="activity" source="activity_map" target="activity" toMany="false">
		<db-attribute-pair source="ACTIVITY_ID" target="ID"/>
	</db-relationship>
	<db-relationship name="oauthConsumer" source="application" target="oauth_consumer" toMany="true">
		<db-attribute-pair source="ID" target="APP_ID"/>
	</db-relationship>
	<db-relationship name="application" source="oauth_consumer" target="application" toMany="false">
		<db-attribute-pair source="APP_ID" target="ID"/>
	</db-relationship>
	<obj-relationship name="activityMaps" source="Activity" target="ActivityMap" db-relationship-path="activityMaps"/>
	<obj-relationship name="activity" source="ActivityMap" target="Activity" db-relationship-path="activity"/>
	<obj-relationship name="oauthConsumer" source="Application" target="OAuthConsumer" db-relationship-path="oauthConsumer"/>
	<obj-relationship name="application" source="OAuthConsumer" target="Application" db-relationship-path="application"/>
</data-map>
