svnno****@sourc*****
svnno****@sourc*****
2008年 11月 11日 (火) 22:35:52 JST
Revision: 1332 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=1332 Author: shinsuke Date: 2008-11-11 22:35:52 +0900 (Tue, 11 Nov 2008) Log Message: ----------- changed db schema and a file structure. Modified Paths: -------------- bookmark/trunk/src/main/config/erd/bookmark.erd bookmark/trunk/src/main/config/sql/bookmark.ddl bookmark/trunk/src/main/config/sql/bookmark.dml bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/admin/CategoryAction.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/admin/LinkAction.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsBookmarkCategoryBhv.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsBookmarkLinkBhv.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsUserInfoBhv.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsBookmarkCategory.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsBookmarkLink.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsUserInfo.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/BookmarkCategoryDbm.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/BookmarkLinkDbm.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/UserInfoDbm.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsBookmarkCategoryCB.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsBookmarkLinkCB.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsUserInfoCB.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsBookmarkCategoryCQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsBookmarkLinkCQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsUserInfoCQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsBookmarkCategoryCQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsBookmarkLinkCQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsUserInfoCQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/BookmarkCategoryCIQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/BookmarkLinkCIQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/UserInfoCIQ.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/nss/BookmarkCategoryNss.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/nss/BookmarkLinkNss.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/dxo/CategoryDxo.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/dxo/LinkDxo.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/service/CategoryService.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/service/LinkService.java bookmark/trunk/src/main/webapp/WEB-INF/db/bookmark.data.db bookmark/trunk/src/main/webapp/WEB-INF/db/bookmark.index.db bookmark/trunk/src/main/webapp/WEB-INF/portlet.xml Added Paths: ----------- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/CategoryAction.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/LinkAction.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/CategoryForm.java bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/LinkForm.java bookmark/trunk/src/main/webapp/WEB-INF/db/bookmark.1.log.db bookmark/trunk/src/main/webapp/WEB-INF/view/user/ bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/ bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/confirm.jsp bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/edit.jsp bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/error.jsp bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/index.jsp bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/ bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/confirm.jsp bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/edit.jsp bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/error.jsp bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/index.jsp Removed Paths: ------------- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/category/ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/link/ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/category/ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/link/ bookmark/trunk/src/main/webapp/WEB-INF/view/category/ bookmark/trunk/src/main/webapp/WEB-INF/view/link/ -------------- next part -------------- Modified: bookmark/trunk/src/main/config/erd/bookmark.erd =================================================================== --- bookmark/trunk/src/main/config/erd/bookmark.erd 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/config/erd/bookmark.erd 2008-11-11 13:35:52 UTC (rev 1332) @@ -234,8 +234,8 @@ </columns> <indices/> <constraint> - <x>185</x> - <y>408</y> + <x>428</x> + <y>738</y> <width>-1</width> <height>-1</height> </constraint> @@ -403,7 +403,7 @@ <indices/> <constraint> <x>40</x> - <y>852</y> + <y>1182</y> <width>-1</width> <height>-1</height> </constraint> @@ -472,7 +472,7 @@ <indices/> <constraint> <x>44</x> - <y>40</y> + <y>408</y> <width>-1</width> <height>-1</height> </constraint> @@ -704,8 +704,8 @@ </columns> <indices/> <constraint> - <x>364</x> - <y>852</y> + <x>607</x> + <y>1182</y> <width>-1</width> <height>-1</height> </constraint> @@ -768,8 +768,8 @@ </columns> <indices/> <constraint> - <x>372</x> - <y>40</y> + <x>615</x> + <y>408</y> <width>-1</width> <height>-1</height> </constraint> @@ -843,240 +843,26 @@ <targetConnections> <net.java.amateras.db.visual.model.ForeignKeyModel reference="../../sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel/target/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/source/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel"/> <net.java.amateras.db.visual.model.ForeignKeyModel reference="../../sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/target/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/source/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel"/> - </targetConnections> - <listeners serialization="custom"> - <java.beans.PropertyChangeSupport> - <default> - <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion> - <source class="net.java.amateras.db.visual.model.TableModel" reference="../../../.."/> - </default> - <null/> - </java.beans.PropertyChangeSupport> - </listeners> - </net.java.amateras.db.visual.model.TableModel> - <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel/target"/> - <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/target"/> - <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel/target/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/source"/> - <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/target/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/source"/> - <net.java.amateras.db.visual.model.TableModel> - <error></error> - <linkedPath></linkedPath> - <tableName>bookmark_category</tableName> - <logicalName>Bookmark Category</logicalName> - <description></description> - <columns> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>id</columnName> - <logicalName>ID</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>INTEGER</name> - <logicalName>Integer</logicalName> - <supportSize>false</supportSize> - <type>4</type> - </columnType> - <size>19</size> - <notNull>true</notNull> - <primaryKey>true</primaryKey> - <description></description> - <autoIncrement>true</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>name</columnName> - <logicalName>Name</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>VARCHAR</name> - <logicalName>String</logicalName> - <supportSize>true</supportSize> - <type>12</type> - </columnType> - <size>100</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>memo</columnName> - <logicalName>Memo</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>VARCHAR</name> - <logicalName>String</logicalName> - <supportSize>true</supportSize> - <type>12</type> - </columnType> - <size>200</size> - <notNull>false</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>type</columnName> - <logicalName>Type</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>VARCHAR</name> - <logicalName>String</logicalName> - <supportSize>true</supportSize> - <type>12</type> - </columnType> - <size>1</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue>'P'</defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>sort_order</columnName> - <logicalName>Sort Order</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>INTEGER</name> - <logicalName>Integer</logicalName> - <supportSize>false</supportSize> - <type>4</type> - </columnType> - <size>10</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue>0</defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>created_time</columnName> - <logicalName>Created Time</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>TIMESTAMP</name> - <logicalName>Datetime</logicalName> - <supportSize>false</supportSize> - <type>93</type> - </columnType> - <size>10</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>created_by</columnName> - <logicalName>Created_by</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>VARCHAR</name> - <logicalName>String</logicalName> - <supportSize>true</supportSize> - <type>12</type> - </columnType> - <size>255</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>updated_time</columnName> - <logicalName>Updated Time</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[6]/columnType"/> - <size>10</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>updated_by</columnName> - <logicalName>Updated by</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[7]/columnType"/> - <size>255</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>deleted_time</columnName> - <logicalName>Deleted Time</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[6]/columnType"/> - <size>10</size> - <notNull>false</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>deleted_by</columnName> - <logicalName>Deleted by</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[7]/columnType"/> - <size>255</size> - <notNull>false</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> - <columnName>versionNo</columnName> - <logicalName>Version No</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>INTEGER</name> - <logicalName>Integer</logicalName> - <supportSize>false</supportSize> - <type>4</type> - </columnType> - <size>10</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue>0</defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - </columns> - <indices> - <net.java.amateras.db.visual.model.IndexModel> - <indexName>IDX_created_by_for_category</indexName> - <indexType class="net.java.amateras.db.dialect.IndexType"> - <name>INDEX</name> - </indexType> - <columns> - <string>created_by</string> - </columns> - </net.java.amateras.db.visual.model.IndexModel> - </indices> - <constraint> - <x>624</x> - <y>408</y> - <width>-1</width> - <height>-1</height> - </constraint> - <sourceConnections/> - <targetConnections> <net.java.amateras.db.visual.model.ForeignKeyModel> - <foreignKeyName>FK_from_link_to_category</foreignKeyName> + <foreignKeyName>FK_from_link_create_to_user</foreignKeyName> <references> <entry> <net.java.amateras.db.visual.model.ColumnModel reference="../../../../../columns/net.java.amateras.db.visual.model.ColumnModel"/> <net.java.amateras.db.visual.model.ColumnModel> - <columnName>category_id</columnName> - <logicalName>Category ID</logicalName> + <columnName>created_by</columnName> + <logicalName>Created by</logicalName> <columnType class="net.java.amateras.db.dialect.ColumnType"> - <name>INTEGER</name> - <logicalName>Integer</logicalName> - <supportSize>false</supportSize> - <type>4</type> + <name>VARCHAR</name> + <logicalName>String</logicalName> + <supportSize>true</supportSize> + <type>12</type> </columnType> - <size>1</size> - <notNull>false</notNull> + <size>255</size> + <notNull>true</notNull> <primaryKey>false</primaryKey> <description></description> <autoIncrement>false</autoIncrement> - <defaultValue>0</defaultValue> + <defaultValue></defaultValue> </net.java.amateras.db.visual.model.ColumnModel> </entry> </references> @@ -1106,7 +892,12 @@ <net.java.amateras.db.visual.model.ColumnModel> <columnName>name</columnName> <logicalName>Name</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[3]/columnType"/> + <columnType class="net.java.amateras.db.dialect.ColumnType"> + <name>VARCHAR</name> + <logicalName>String</logicalName> + <supportSize>true</supportSize> + <type>12</type> + </columnType> <size>100</size> <notNull>true</notNull> <primaryKey>false</primaryKey> @@ -1117,7 +908,7 @@ <net.java.amateras.db.visual.model.ColumnModel> <columnName>memo</columnName> <logicalName>Memo</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[3]/columnType"/> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> <size>200</size> <notNull>false</notNull> <primaryKey>false</primaryKey> @@ -1128,7 +919,7 @@ <net.java.amateras.db.visual.model.ColumnModel> <columnName>url</columnName> <logicalName>URL</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[3]/columnType"/> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> <size>255</size> <notNull>true</notNull> <primaryKey>false</primaryKey> @@ -1139,7 +930,7 @@ <net.java.amateras.db.visual.model.ColumnModel> <columnName>type</columnName> <logicalName>Type</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[3]/columnType"/> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> <size>1</size> <notNull>true</notNull> <primaryKey>false</primaryKey> @@ -1150,7 +941,12 @@ <net.java.amateras.db.visual.model.ColumnModel> <columnName>sort_order</columnName> <logicalName>Sort Order</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../references/entry/net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> + <columnType class="net.java.amateras.db.dialect.ColumnType"> + <name>INTEGER</name> + <logicalName>Integer</logicalName> + <supportSize>false</supportSize> + <type>4</type> + </columnType> <size>10</size> <notNull>true</notNull> <primaryKey>false</primaryKey> @@ -1158,8 +954,18 @@ <autoIncrement>false</autoIncrement> <defaultValue>0</defaultValue> </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel reference="../../../references/entry/net.java.amateras.db.visual.model.ColumnModel[2]"/> <net.java.amateras.db.visual.model.ColumnModel> + <columnName>category_id</columnName> + <logicalName>Category ID</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[6]/columnType"/> + <size>1</size> + <notNull>false</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue>0</defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> <columnName>created_time</columnName> <logicalName>Created Time</logicalName> <columnType class="net.java.amateras.db.dialect.ColumnType"> @@ -1175,18 +981,8 @@ <autoIncrement>false</autoIncrement> <defaultValue></defaultValue> </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../references/entry/net.java.amateras.db.visual.model.ColumnModel[2]"/> <net.java.amateras.db.visual.model.ColumnModel> - <columnName>created_by</columnName> - <logicalName>Created by</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> - <size>255</size> - <notNull>true</notNull> - <primaryKey>false</primaryKey> - <description></description> - <autoIncrement>false</autoIncrement> - <defaultValue></defaultValue> - </net.java.amateras.db.visual.model.ColumnModel> - <net.java.amateras.db.visual.model.ColumnModel> <columnName>updated_time</columnName> <logicalName>Updated Time</logicalName> <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[8]/columnType"/> @@ -1200,7 +996,7 @@ <net.java.amateras.db.visual.model.ColumnModel> <columnName>updated_by</columnName> <logicalName>Updated by</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../references/entry/net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> <size>255</size> <notNull>true</notNull> <primaryKey>false</primaryKey> @@ -1222,7 +1018,7 @@ <net.java.amateras.db.visual.model.ColumnModel> <columnName>deleted_by</columnName> <logicalName>Deleted by</logicalName> - <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../references/entry/net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> <size>255</size> <notNull>false</notNull> <primaryKey>false</primaryKey> @@ -1250,7 +1046,9 @@ <indices> <net.java.amateras.db.visual.model.IndexModel> <indexName>IDX_created_by_and_category_id_for_link</indexName> - <indexType class="net.java.amateras.db.dialect.IndexType" reference="../../../../../../indices/net.java.amateras.db.visual.model.IndexModel/indexType"/> + <indexType class="net.java.amateras.db.dialect.IndexType"> + <name>INDEX</name> + </indexType> <columns> <string>created_by</string> <string>category_id</string> @@ -1258,13 +1056,292 @@ </net.java.amateras.db.visual.model.IndexModel> </indices> <constraint> - <x>624</x> + <x>443</x> <y>40</y> <width>-1</width> <height>-1</height> </constraint> <sourceConnections> + <net.java.amateras.db.visual.model.ForeignKeyModel> + <foreignKeyName>FK_from_link_to_category</foreignKeyName> + <references> + <entry> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>id</columnName> + <logicalName>ID</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType"> + <name>INTEGER</name> + <logicalName>Integer</logicalName> + <supportSize>false</supportSize> + <type>4</type> + </columnType> + <size>19</size> + <notNull>true</notNull> + <primaryKey>true</primaryKey> + <description></description> + <autoIncrement>true</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[7]"/> + </entry> + </references> + <source class="net.java.amateras.db.visual.model.TableModel" reference="../../.."/> + <target class="net.java.amateras.db.visual.model.TableModel"> + <error></error> + <linkedPath></linkedPath> + <tableName>bookmark_category</tableName> + <logicalName>Bookmark Category</logicalName> + <description></description> + <columns> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../references/entry/net.java.amateras.db.visual.model.ColumnModel"/> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>name</columnName> + <logicalName>Name</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../../references/entry/net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> + <size>100</size> + <notNull>true</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>memo</columnName> + <logicalName>Memo</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[2]/columnType"/> + <size>200</size> + <notNull>false</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>type</columnName> + <logicalName>Type</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType"> + <name>VARCHAR</name> + <logicalName>String</logicalName> + <supportSize>true</supportSize> + <type>12</type> + </columnType> + <size>1</size> + <notNull>true</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue>'P'</defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>sort_order</columnName> + <logicalName>Sort Order</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType"> + <name>INTEGER</name> + <logicalName>Integer</logicalName> + <supportSize>false</supportSize> + <type>4</type> + </columnType> + <size>10</size> + <notNull>true</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue>0</defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>created_time</columnName> + <logicalName>Created Time</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType"> + <name>TIMESTAMP</name> + <logicalName>Datetime</logicalName> + <supportSize>false</supportSize> + <type>93</type> + </columnType> + <size>10</size> + <notNull>true</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>created_by</columnName> + <logicalName>Created_by</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType"> + <name>VARCHAR</name> + <logicalName>String</logicalName> + <supportSize>true</supportSize> + <type>12</type> + </columnType> + <size>255</size> + <notNull>true</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>updated_time</columnName> + <logicalName>Updated Time</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[6]/columnType"/> + <size>10</size> + <notNull>true</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>updated_by</columnName> + <logicalName>Updated by</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[7]/columnType"/> + <size>255</size> + <notNull>true</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>deleted_time</columnName> + <logicalName>Deleted Time</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[6]/columnType"/> + <size>10</size> + <notNull>false</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>deleted_by</columnName> + <logicalName>Deleted by</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType" reference="../../net.java.amateras.db.visual.model.ColumnModel[7]/columnType"/> + <size>255</size> + <notNull>false</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue></defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + <net.java.amateras.db.visual.model.ColumnModel> + <columnName>versionNo</columnName> + <logicalName>Version No</logicalName> + <columnType class="net.java.amateras.db.dialect.ColumnType"> + <name>INTEGER</name> + <logicalName>Integer</logicalName> + <supportSize>false</supportSize> + <type>4</type> + </columnType> + <size>10</size> + <notNull>true</notNull> + <primaryKey>false</primaryKey> + <description></description> + <autoIncrement>false</autoIncrement> + <defaultValue>0</defaultValue> + </net.java.amateras.db.visual.model.ColumnModel> + </columns> + <indices> + <net.java.amateras.db.visual.model.IndexModel> + <indexName>IDX_created_by_for_category</indexName> + <indexType class="net.java.amateras.db.dialect.IndexType" reference="../../../../../../indices/net.java.amateras.db.visual.model.IndexModel/indexType"/> + <columns> + <string>created_by</string> + </columns> + </net.java.amateras.db.visual.model.IndexModel> + </indices> + <constraint> + <x>305</x> + <y>408</y> + <width>-1</width> + <height>-1</height> + </constraint> + <sourceConnections> + <net.java.amateras.db.visual.model.ForeignKeyModel> + <foreignKeyName>FK_from_category_create_to_user</foreignKeyName> + <references> + <entry> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../../../../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel"/> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[7]"/> + </entry> + </references> + <source class="net.java.amateras.db.visual.model.TableModel" reference="../../.."/> + <target class="net.java.amateras.db.visual.model.TableModel" reference="../../../../../../../../.."/> + <listeners serialization="custom"> + <java.beans.PropertyChangeSupport> + <default> + <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion> + <source class="net.java.amateras.db.visual.model.ForeignKeyModel" reference="../../../.."/> + </default> + <null/> + </java.beans.PropertyChangeSupport> + </listeners> + </net.java.amateras.db.visual.model.ForeignKeyModel> + <net.java.amateras.db.visual.model.ForeignKeyModel> + <foreignKeyName>FK_from_category_update_to_user</foreignKeyName> + <references> + <entry> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../../../../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel"/> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[9]"/> + </entry> + </references> + <source class="net.java.amateras.db.visual.model.TableModel" reference="../../.."/> + <target class="net.java.amateras.db.visual.model.TableModel" reference="../../../../../../../../.."/> + <listeners serialization="custom"> + <java.beans.PropertyChangeSupport> + <default> + <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion> + <source class="net.java.amateras.db.visual.model.ForeignKeyModel" reference="../../../.."/> + </default> + <null/> + </java.beans.PropertyChangeSupport> + </listeners> + </net.java.amateras.db.visual.model.ForeignKeyModel> + </sourceConnections> + <targetConnections> + <net.java.amateras.db.visual.model.ForeignKeyModel reference="../../.."/> + </targetConnections> + <listeners serialization="custom"> + <java.beans.PropertyChangeSupport> + <default> + <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion> + <source class="net.java.amateras.db.visual.model.TableModel" reference="../../../.."/> + </default> + <null/> + </java.beans.PropertyChangeSupport> + </listeners> + </target> + <listeners serialization="custom"> + <java.beans.PropertyChangeSupport> + <default> + <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion> + <source class="net.java.amateras.db.visual.model.ForeignKeyModel" reference="../../../.."/> + </default> + <null/> + </java.beans.PropertyChangeSupport> + </listeners> + </net.java.amateras.db.visual.model.ForeignKeyModel> <net.java.amateras.db.visual.model.ForeignKeyModel reference="../../.."/> + <net.java.amateras.db.visual.model.ForeignKeyModel> + <foreignKeyName>FK_from_link_update_to_user</foreignKeyName> + <references> + <entry> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../../../../../../columns/net.java.amateras.db.visual.model.ColumnModel"/> + <net.java.amateras.db.visual.model.ColumnModel reference="../../../../../columns/net.java.amateras.db.visual.model.ColumnModel[11]"/> + </entry> + </references> + <source class="net.java.amateras.db.visual.model.TableModel" reference="../../.."/> + <target class="net.java.amateras.db.visual.model.TableModel" reference="../../../../../.."/> + <listeners serialization="custom"> + <java.beans.PropertyChangeSupport> + <default> + <propertyChangeSupportSerializedDataVersion>2</propertyChangeSupportSerializedDataVersion> + <source class="net.java.amateras.db.visual.model.ForeignKeyModel" reference="../../../.."/> + </default> + <null/> + </java.beans.PropertyChangeSupport> + </listeners> + </net.java.amateras.db.visual.model.ForeignKeyModel> </sourceConnections> <targetConnections/> <listeners serialization="custom"> @@ -1288,6 +1365,9 @@ </java.beans.PropertyChangeSupport> </listeners> </net.java.amateras.db.visual.model.ForeignKeyModel> + <net.java.amateras.db.visual.model.ForeignKeyModel reference="../net.java.amateras.db.visual.model.ForeignKeyModel[3]/source/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel[3]"/> + <net.java.amateras.db.visual.model.ForeignKeyModel reference="../net.java.amateras.db.visual.model.ForeignKeyModel[3]/source/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel/target/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel"/> + <net.java.amateras.db.visual.model.ForeignKeyModel reference="../net.java.amateras.db.visual.model.ForeignKeyModel[3]/source/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel/target/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]"/> </targetConnections> <listeners serialization="custom"> <java.beans.PropertyChangeSupport> @@ -1299,7 +1379,12 @@ </java.beans.PropertyChangeSupport> </listeners> </net.java.amateras.db.visual.model.TableModel> - <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel[6]/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel/source"/> + <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel/target"/> + <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/target"/> + <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel/target/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/source"/> + <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/target/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel[2]/source"/> + <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel[3]/source/sourceConnections/net.java.amateras.db.visual.model.ForeignKeyModel/target"/> + <net.java.amateras.db.visual.model.TableModel reference="../net.java.amateras.db.visual.model.TableModel/targetConnections/net.java.amateras.db.visual.model.ForeignKeyModel[3]/source"/> </children> <dommains/> <dialectName>hsqldb</dialectName> Modified: bookmark/trunk/src/main/config/sql/bookmark.ddl =================================================================== --- bookmark/trunk/src/main/config/sql/bookmark.ddl 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/config/sql/bookmark.ddl 2008-11-11 13:35:52 UTC (rev 1332) @@ -107,7 +107,9 @@ updated_by VARCHAR(255) NOT NULL, deleted_time TIMESTAMP, deleted_by VARCHAR(255), - versionNo INTEGER DEFAULT 0 NOT NULL + versionNo INTEGER DEFAULT 0 NOT NULL, + FOREIGN KEY (created_by) REFERENCES user_info (user_id), + FOREIGN KEY (updated_by) REFERENCES user_info (user_id) ); /********************************** @@ -128,7 +130,9 @@ deleted_time TIMESTAMP, deleted_by VARCHAR(255), versionNo INTEGER DEFAULT 0 NOT NULL, - FOREIGN KEY (category_id) REFERENCES bookmark_category (id) + FOREIGN KEY (category_id) REFERENCES bookmark_category (id), + FOREIGN KEY (created_by) REFERENCES user_info (user_id), + FOREIGN KEY (updated_by) REFERENCES user_info (user_id) ); Modified: bookmark/trunk/src/main/config/sql/bookmark.dml =================================================================== --- bookmark/trunk/src/main/config/sql/bookmark.dml 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/config/sql/bookmark.dml 2008-11-11 13:35:52 UTC (rev 1332) @@ -1,2 +1,3 @@ +insert into user_info (USER_ID, CREATED_TIME, CREATED_BY, UPDATED_TIME, UPDATED_BY, VERSIONNO) values ('admin', '2008-10-15 17:17:37', 'admin', '2008-10-15 17:17:37', 'admin', 0); insert into BOOKMARK_CATEGORY (ID, NAME, CREATED_TIME, CREATED_BY, SORT_ORDER, UPDATED_TIME, UPDATED_BY, VERSIONNO, MEMO, TYPE) values (1, '(Unclassified)', '2008-10-15 17:17:37', 'admin', 1, '2008-10-15 17:17:37', 'admin', 0, '', 'P'); insert into BOOKMARK_CATEGORY (ID, NAME, CREATED_TIME, CREATED_BY, SORT_ORDER, UPDATED_TIME, UPDATED_BY, VERSIONNO, MEMO, TYPE) values (2, '(Shared)', '2008-10-15 17:17:37', 'admin', 1, '2008-10-15 17:17:37', 'admin', 0, '', 'P'); Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/admin/CategoryAction.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/admin/CategoryAction.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/admin/CategoryAction.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -273,6 +273,14 @@ this.request = request; } + public CategoryForm getCategoryForm() { + return categoryForm; + } + + public void setCategoryForm(CategoryForm categoryForm) { + this.categoryForm = categoryForm; + } + public CategoryService getCategoryService() { return categoryService; } @@ -305,12 +313,4 @@ this.categoryDxo = categoryDxo; } - public CategoryForm getCategoryForm() { - return categoryForm; - } - - public void setCategoryForm(CategoryForm categoryForm) { - this.categoryForm = categoryForm; - } - } Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/admin/LinkAction.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/admin/LinkAction.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/admin/LinkAction.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -249,7 +249,15 @@ this.request = request; } - public LinkService getMessageService() { + public LinkForm getLinkForm() { + return linkForm; + } + + public void setLinkForm(LinkForm linkForm) { + this.linkForm = linkForm; + } + + public LinkService getLinkService() { return linkService; } @@ -257,7 +265,15 @@ this.linkService = linkService; } - public LinkPager getMessagePager() { + public CategoryService getCategoryService() { + return categoryService; + } + + public void setCategoryService(CategoryService categoryService) { + this.categoryService = categoryService; + } + + public LinkPager getLinkPager() { return linkPager; } @@ -273,7 +289,7 @@ this.pagerDxo = pagerDxo; } - public LinkDxo getMessageDxo() { + public LinkDxo getLinkDxo() { return linkDxo; } @@ -281,32 +297,4 @@ this.linkDxo = linkDxo; } - public CategoryService getCategoryService() { - return categoryService; - } - - public void setCategoryService(CategoryService categoryService) { - this.categoryService = categoryService; - } - - public LinkService getLinkService() { - return linkService; - } - - public LinkPager getLinkPager() { - return linkPager; - } - - public LinkDxo getLinkDxo() { - return linkDxo; - } - - public LinkForm getLinkForm() { - return linkForm; - } - - public void setLinkForm(LinkForm linkForm) { - this.linkForm = linkForm; - } - } Added: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/CategoryAction.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/CategoryAction.java (rev 0) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/CategoryAction.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,316 @@ +package jp.sf.pal.bookmark.action.user; + +import java.io.Serializable; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import jp.sf.pal.bookmark.BookmarkConstants; +import jp.sf.pal.bookmark.common.dxo.PagerDxo; +import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; +import jp.sf.pal.bookmark.dxo.CategoryDxo; +import jp.sf.pal.bookmark.form.user.CategoryForm; +import jp.sf.pal.bookmark.pager.CategoryPager; +import jp.sf.pal.bookmark.service.CategoryService; +import jp.sf.pal.bookmark.util.BookmarkUtil; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.seasar.struts.annotation.ActionForm; +import org.seasar.struts.annotation.Execute; +import org.seasar.struts.exception.ActionMessagesException; + +public class CategoryAction implements Serializable { + + private static final long serialVersionUID = 1L; + + private static final Log log = LogFactory.getLog(CategoryAction.class); + + // for list + + public List<BookmarkCategory> categoryItems; + + // for edit/confirm/delete + + @ActionForm + private CategoryForm categoryForm; + + private CategoryService categoryService; + + private CategoryPager categoryPager; + + private PagerDxo pagerDxo; + + private CategoryDxo categoryDxo; + + private transient HttpServletRequest request; + + protected String displayList() { + // page navi + categoryPager.setCreatedBy(request.getRemoteUser()); + categoryItems = categoryService.getCategoryList(categoryPager); + return "index.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String index() { + return displayList(); + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "list/{pageNumber}") + public String list() { + pagerDxo.convert(categoryForm, categoryPager); + return displayList(); + } + + @Execute(validator = false, input = "error.jsp") + public String back() { + // reset edit page + return displayList(); + } + + @Execute(validator = false, input = "error.jsp") + public String editagain() { + return "edit.jsp"; + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "confirmpage/{mode}/{id}") + public String confirmpage() { + if (categoryForm.mode != BookmarkConstants.CONFIRM_MODE) { + throw new ActionMessagesException("errors.invalid.mode", + new Object[] { BookmarkConstants.CONFIRM_MODE, + categoryForm.mode }); + } + + // update edit page + + loadCategory(); + + return "confirm.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String createpage() { + // page navi + categoryForm.initialize(); + categoryForm.mode = BookmarkConstants.CREATE_MODE; + + // update edit page + + return "edit.jsp"; + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "editpage/{mode}/{id}") + public String editpage() { + if (categoryForm.mode != BookmarkConstants.EDIT_MODE) { + throw new ActionMessagesException("errors.invalid.mode", + new Object[] { BookmarkConstants.EDIT_MODE, + categoryForm.mode }); + } + + // update edit page + + loadCategory(); + + return "edit.jsp"; + } + + @Execute(validator = true, input = "edit.jsp") + public String confirm() { + return "confirm.jsp"; + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "deletepage/{mode}/{id}") + public String deletepage() { + if (categoryForm.mode != BookmarkConstants.DELETE_MODE) { + throw new ActionMessagesException("errors.invalid.mode", + new Object[] { BookmarkConstants.DELETE_MODE, + categoryForm.mode }); + } + + // update edit page + + loadCategory(); + + return "confirm.jsp"; + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "moveup/{id}") + public String moveup() { + if (categoryForm.id == null) { + throw new ActionMessagesException("errors.invalid.id"); + } + BookmarkCategory category = categoryService.getCategory(Integer + .parseInt(categoryForm.id)); + if (category == null) { + throw new ActionMessagesException("errors.could_not_find_category", + new Object[] { categoryForm.id }); + } + try { + categoryService.moveUp(category); + BookmarkUtil.addMessage(request, "success.move_category_up"); + } catch (ActionMessagesException e) { + throw e; + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException( + "errors.failed_to_update_category"); + } + return displayList(); + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "movedown/{id}") + public String movedown() { + if (categoryForm.id == null) { + throw new ActionMessagesException("errors.invalid.id"); + } + BookmarkCategory category = categoryService.getCategory(Integer + .parseInt(categoryForm.id)); + if (category == null) { + throw new ActionMessagesException("errors.could_not_find_category", + new Object[] { categoryForm.id }); + } + try { + categoryService.moveDown(category); + BookmarkUtil.addMessage(request, "success.move_category_down"); + } catch (ActionMessagesException e) { + throw e; + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException( + "errors.failed_to_update_category"); + } + return displayList(); + } + + @Execute(validator = true, input = "edit.jsp") + public String create() { + try { + BookmarkCategory category = createCategory(); + categoryService.store(category); + BookmarkUtil.addMessage(request, "success.create_category"); + // reset edit page + return displayList(); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException( + "errors.failed_to_create_category"); + } + } + + @Execute(validator = true, input = "edit.jsp") + public String update() { + try { + BookmarkCategory category = createCategory(); + categoryService.store(category); + BookmarkUtil.addMessage(request, "success.update_category"); + // reset edit page + return displayList(); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException( + "errors.failed_to_update_category"); + } + } + + @Execute(validator = false, input = "error.jsp") + public String delete() { + try { + categoryService.disable(Integer.parseInt(categoryForm.id), request + .getRemoteUser()); + BookmarkUtil.addMessage(request, "success.delete_category"); + // reset edit page + return displayList(); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException( + "errors.failed_to_delete_category"); + } + } + + private void loadCategory() { + Integer categoryId = Integer.parseInt(categoryForm.id); + + BookmarkCategory category = categoryService.getCategory(categoryId); + if (category == null) { + // throw an exception + throw new ActionMessagesException("errors.could_not_find_category", + new Object[] { categoryId }); + } + categoryDxo.convertFromCategoryToForm(category, categoryForm); + + } + + private BookmarkCategory createCategory() { + BookmarkCategory category; + if (categoryForm.mode == BookmarkConstants.EDIT_MODE) { + Integer categoryId = Integer.parseInt(categoryForm.id); + category = categoryService.getCategory(categoryId); + category.setUpdatedBy(request.getRemoteUser()); + } else { + category = new BookmarkCategory(); + String remoteUser = request.getRemoteUser(); + category.setUpdatedBy(remoteUser); + category.setCreatedBy(remoteUser); + } + categoryDxo.convertFromFormToCategory(categoryForm, category); + + return category; + + } + + /** + * @return the request + */ + public HttpServletRequest getRequest() { + return request; + } + + /** + * @param request the request to set + */ + public void setRequest(HttpServletRequest request) { + this.request = request; + } + + public CategoryForm getCategoryForm() { + return categoryForm; + } + + public void setCategoryForm(CategoryForm categoryForm) { + this.categoryForm = categoryForm; + } + + public CategoryService getCategoryService() { + return categoryService; + } + + public void setCategoryService(CategoryService categoryService) { + this.categoryService = categoryService; + } + + public CategoryPager getCategoryPager() { + return categoryPager; + } + + public void setCategoryPager(CategoryPager categoryPager) { + this.categoryPager = categoryPager; + } + + public PagerDxo getPagerDxo() { + return pagerDxo; + } + + public void setPagerDxo(PagerDxo pagerDxo) { + this.pagerDxo = pagerDxo; + } + + public CategoryDxo getCategoryDxo() { + return categoryDxo; + } + + public void setCategoryDxo(CategoryDxo categoryDxo) { + this.categoryDxo = categoryDxo; + } + +} Property changes on: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/CategoryAction.java ___________________________________________________________________ Name: svn:eol-style + native Added: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/LinkAction.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/LinkAction.java (rev 0) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/LinkAction.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,367 @@ +package jp.sf.pal.bookmark.action.user; + +import java.io.Serializable; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import jp.sf.pal.bookmark.BookmarkConstants; +import jp.sf.pal.bookmark.common.dxo.PagerDxo; +import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; +import jp.sf.pal.bookmark.db.exentity.BookmarkLink; +import jp.sf.pal.bookmark.dxo.LinkDxo; +import jp.sf.pal.bookmark.form.user.LinkForm; +import jp.sf.pal.bookmark.pager.LinkPager; +import jp.sf.pal.bookmark.service.CategoryService; +import jp.sf.pal.bookmark.service.LinkService; +import jp.sf.pal.bookmark.util.BookmarkUtil; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.seasar.struts.annotation.ActionForm; +import org.seasar.struts.annotation.Execute; +import org.seasar.struts.exception.ActionMessagesException; + +public class LinkAction implements Serializable { + + private static final long serialVersionUID = 1L; + + private static final Log log = LogFactory.getLog(LinkAction.class); + + public List<BookmarkCategory> categoryItems; + + // for list + + public List<BookmarkLink> linkItems; + + // for edit/confirm/delete + + @ActionForm + private LinkForm linkForm; + + private LinkService linkService; + + private CategoryService categoryService; + + private LinkPager linkPager; + + private PagerDxo pagerDxo; + + private LinkDxo linkDxo; + + private transient HttpServletRequest request; + + protected String displayList() { + String username = request.getRemoteUser(); + + // page navi + linkPager.setCreatedBy(username); + linkItems = linkService.getLinkList(linkPager); + + categoryItems = categoryService.getCategoryList(username); + + return "index.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String index() { + return displayList(); + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "list/{pageNumber}") + public String list() { + // page navi + pagerDxo.convert(linkForm, linkPager); + + return displayList(); + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "select/{categoryId}") + public String select() { + linkPager.setCategoryId(Integer.parseInt(linkForm.categoryId)); + + return displayList(); + } + + @Execute(validator = false, input = "error.jsp") + public String back() { + // reset edit page + loadListPageParameters(); + + return displayList(); + } + + @Execute(validator = false, input = "error.jsp") + public String editagain() { + String username = request.getRemoteUser(); + categoryItems = categoryService.getCategoryList(username); + + return "edit.jsp"; + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "confirmpage/{mode}/{id}") + public String confirmpage() { + if (linkForm.mode != BookmarkConstants.CONFIRM_MODE) { + throw new ActionMessagesException("errors.invalid.mode", + new Object[] { BookmarkConstants.CONFIRM_MODE, + linkForm.mode }); + } + + String username = request.getRemoteUser(); + categoryItems = categoryService.getCategoryList(username); + + // update edit page + loadDetailsPageParameters(); + + loadLink(); + + return "confirm.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String createpage() { + // page navi + linkForm.initialize(); + linkForm.mode = BookmarkConstants.CREATE_MODE; + + String username = request.getRemoteUser(); + categoryItems = categoryService.getCategoryList(username); + + // update edit page + loadDetailsPageParameters(); + + return "edit.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String editpage() { + linkForm.mode = BookmarkConstants.EDIT_MODE; + + String username = request.getRemoteUser(); + categoryItems = categoryService.getCategoryList(username); + + // update edit page + loadDetailsPageParameters(); + + loadLink(); + + return "edit.jsp"; + } + + @Execute(validator = true, input = "edit.jsp") + public String confirm() { + String username = request.getRemoteUser(); + categoryItems = categoryService.getCategoryList(username); + + return "confirm.jsp"; + } + + @Execute(validator = false, input = "error.jsp") + public String deletepage() { + linkForm.mode = BookmarkConstants.DELETE_MODE; + + String username = request.getRemoteUser(); + categoryItems = categoryService.getCategoryList(username); + + // update edit page + loadDetailsPageParameters(); + + loadLink(); + + return "confirm.jsp"; + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "moveup/{id}") + public String moveup() { + if (linkForm.id == null) { + throw new ActionMessagesException("errors.invalid.id"); + } + BookmarkLink link = linkService.getLink(Long.parseLong(linkForm.id)); + if (link == null) { + throw new ActionMessagesException("errors.could_not_find_link", + new Object[] { linkForm.id }); + } + try { + linkService.moveUp(link); + BookmarkUtil.addMessage(request, "success.move_link_up"); + } catch (ActionMessagesException e) { + throw e; + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException("errors.failed_to_update_link"); + } + return displayList(); + } + + @Execute(validator = false, input = "error.jsp", urlPattern = "movedown/{id}") + public String movedown() { + if (linkForm.id == null) { + throw new ActionMessagesException("errors.invalid.id"); + } + BookmarkLink link = linkService.getLink(Long.parseLong(linkForm.id)); + if (link == null) { + throw new ActionMessagesException("errors.could_not_find_link", + new Object[] { linkForm.id }); + } + try { + linkService.moveDown(link); + BookmarkUtil.addMessage(request, "success.move_link_down"); + } catch (ActionMessagesException e) { + throw e; + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException("errors.failed_to_update_link"); + } + return displayList(); + } + + @Execute(validator = true, input = "edit.jsp") + public String create() { + try { + BookmarkLink link = createLink(); + linkService.store(link); + BookmarkUtil.addMessage(request, "success.create_link"); + + // reset edit page + loadListPageParameters(); + + return displayList(); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException("errors.failed_to_create_link"); + } + } + + @Execute(validator = true, input = "edit.jsp") + public String update() { + try { + BookmarkLink link = createLink(); + linkService.store(link); + BookmarkUtil.addMessage(request, "success.update_link"); + + // reset edit page + loadListPageParameters(); + + return displayList(); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException("errors.failed_to_update_link"); + } + } + + @Execute(validator = false, input = "error.jsp") + public String delete() { + try { + linkService.disable(Long.parseLong(linkForm.id), request + .getRemoteUser()); + BookmarkUtil.addMessage(request, "success.delete_link"); + + // reset edit page + loadListPageParameters(); + + return displayList(); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException("errors.failed_to_delete_link"); + } + } + + private void loadLink() { + Long linkId = Long.parseLong(linkForm.id); + + BookmarkLink link = linkService.getLink(linkId); + if (link == null) { + // throw an exception + throw new ActionMessagesException("errors.could_not_find_link", + new Object[] { linkId }); + } + linkDxo.convertFromLinkToForm(link, linkForm); + + } + + private BookmarkLink createLink() { + BookmarkLink link; + if (linkForm.mode == BookmarkConstants.EDIT_MODE) { + Long linkId = Long.parseLong(linkForm.id); + link = linkService.getLink(linkId); + link.setUpdatedBy(request.getRemoteUser()); + } else { + link = new BookmarkLink(); + String remoteUser = request.getRemoteUser(); + link.setUpdatedBy(remoteUser); + link.setCreatedBy(remoteUser); + } + linkDxo.convertFromFormToLink(linkForm, link); + + return link; + } + + private void loadListPageParameters() { + } + + private void loadDetailsPageParameters() { + } + + /** + * @return the request + */ + public HttpServletRequest getRequest() { + return request; + } + + /** + * @param request the request to set + */ + public void setRequest(HttpServletRequest request) { + this.request = request; + } + + public LinkForm getLinkForm() { + return linkForm; + } + + public void setLinkForm(LinkForm linkForm) { + this.linkForm = linkForm; + } + + public LinkService getLinkService() { + return linkService; + } + + public void setLinkService(LinkService linkService) { + this.linkService = linkService; + } + + public CategoryService getCategoryService() { + return categoryService; + } + + public void setCategoryService(CategoryService categoryService) { + this.categoryService = categoryService; + } + + public LinkPager getLinkPager() { + return linkPager; + } + + public void setLinkPager(LinkPager linkPager) { + this.linkPager = linkPager; + } + + public PagerDxo getPagerDxo() { + return pagerDxo; + } + + public void setPagerDxo(PagerDxo pagerDxo) { + this.pagerDxo = pagerDxo; + } + + public LinkDxo getLinkDxo() { + return linkDxo; + } + + public void setLinkDxo(LinkDxo linkDxo) { + this.linkDxo = linkDxo; + } + +} Property changes on: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/action/user/LinkAction.java ___________________________________________________________________ Name: svn:eol-style + native Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsBookmarkCategoryBhv.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsBookmarkCategoryBhv.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsBookmarkCategoryBhv.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -23,6 +23,7 @@ import jp.sf.pal.bookmark.db.exdao.BookmarkCategoryDao; import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; import jp.sf.pal.bookmark.db.exentity.BookmarkLink; +import jp.sf.pal.bookmark.db.exentity.UserInfo; /** * The behavior of BOOKMARK_CATEGORY. @@ -44,13 +45,13 @@ * VERSIONNO * * [foreign-table] - * + * USER_INFO * * [referrer-table] * BOOKMARK_LINK * * [foreign-property] - * + * userInfoByCreatedBy, userInfoByUpdatedBy * * [referrer-property] * bookmarkLinkList @@ -390,7 +391,40 @@ // ========= // Pullout Foreign // =============== + /** + * Pull out the list of foreign table 'UserInfo'. + * + * @param bookmarkCategoryList The list of bookmarkCategory. (NotNull) + * @return The list of foreign table. (NotNull) + */ + public List<UserInfo> pulloutUserInfoByCreatedBy( + List<BookmarkCategory> bookmarkCategoryList) { + return helpPulloutInternally(bookmarkCategoryList, + new InternalPulloutCallback<BookmarkCategory, UserInfo>() { + public UserInfo callbackGetForeignEntity( + BookmarkCategory entity) { + return entity.getUserInfoByCreatedBy(); + } + }); + } + /** + * Pull out the list of foreign table 'UserInfo'. + * + * @param bookmarkCategoryList The list of bookmarkCategory. (NotNull) + * @return The list of foreign table. (NotNull) + */ + public List<UserInfo> pulloutUserInfoByUpdatedBy( + List<BookmarkCategory> bookmarkCategoryList) { + return helpPulloutInternally(bookmarkCategoryList, + new InternalPulloutCallback<BookmarkCategory, UserInfo>() { + public UserInfo callbackGetForeignEntity( + BookmarkCategory entity) { + return entity.getUserInfoByUpdatedBy(); + } + }); + } + //========================================================================== // ========= // Entity Update Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsBookmarkLinkBhv.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsBookmarkLinkBhv.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsBookmarkLinkBhv.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -19,6 +19,7 @@ import jp.sf.pal.bookmark.db.exdao.BookmarkLinkDao; import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; import jp.sf.pal.bookmark.db.exentity.BookmarkLink; +import jp.sf.pal.bookmark.db.exentity.UserInfo; /** * The behavior of BOOKMARK_LINK. @@ -40,13 +41,13 @@ * VERSIONNO * * [foreign-table] - * BOOKMARK_CATEGORY + * BOOKMARK_CATEGORY, USER_INFO * * [referrer-table] * * * [foreign-property] - * bookmarkCategory + * bookmarkCategory, userInfoByCreatedBy, userInfoByUpdatedBy * * [referrer-property] * @@ -303,6 +304,38 @@ }); } + /** + * Pull out the list of foreign table 'UserInfo'. + * + * @param bookmarkLinkList The list of bookmarkLink. (NotNull) + * @return The list of foreign table. (NotNull) + */ + public List<UserInfo> pulloutUserInfoByCreatedBy( + List<BookmarkLink> bookmarkLinkList) { + return helpPulloutInternally(bookmarkLinkList, + new InternalPulloutCallback<BookmarkLink, UserInfo>() { + public UserInfo callbackGetForeignEntity(BookmarkLink entity) { + return entity.getUserInfoByCreatedBy(); + } + }); + } + + /** + * Pull out the list of foreign table 'UserInfo'. + * + * @param bookmarkLinkList The list of bookmarkLink. (NotNull) + * @return The list of foreign table. (NotNull) + */ + public List<UserInfo> pulloutUserInfoByUpdatedBy( + List<BookmarkLink> bookmarkLinkList) { + return helpPulloutInternally(bookmarkLinkList, + new InternalPulloutCallback<BookmarkLink, UserInfo>() { + public UserInfo callbackGetForeignEntity(BookmarkLink entity) { + return entity.getUserInfoByUpdatedBy(); + } + }); + } + //========================================================================== // ========= // Entity Update Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsUserInfoBhv.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsUserInfoBhv.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsbhv/BsUserInfoBhv.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -17,12 +17,18 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.ResultBeanBuilder; import jp.sf.pal.bookmark.db.allcommon.dbmeta.DBMeta; import jp.sf.pal.bookmark.db.bsentity.dbmeta.UserInfoDbm; +import jp.sf.pal.bookmark.db.cbean.BookmarkCategoryCB; +import jp.sf.pal.bookmark.db.cbean.BookmarkLinkCB; import jp.sf.pal.bookmark.db.cbean.GroupMappingCB; import jp.sf.pal.bookmark.db.cbean.RoleMappingCB; import jp.sf.pal.bookmark.db.cbean.UserInfoCB; +import jp.sf.pal.bookmark.db.exbhv.BookmarkCategoryBhv; +import jp.sf.pal.bookmark.db.exbhv.BookmarkLinkBhv; import jp.sf.pal.bookmark.db.exbhv.GroupMappingBhv; import jp.sf.pal.bookmark.db.exbhv.RoleMappingBhv; import jp.sf.pal.bookmark.db.exdao.UserInfoDao; +import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; +import jp.sf.pal.bookmark.db.exentity.BookmarkLink; import jp.sf.pal.bookmark.db.exentity.GroupInfo; import jp.sf.pal.bookmark.db.exentity.GroupMapping; import jp.sf.pal.bookmark.db.exentity.RoleInfo; @@ -52,13 +58,13 @@ * GROUP_INFO, ROLE_INFO * * [referrer-table] - * GROUP_MAPPING, ROLE_MAPPING + * BOOKMARK_CATEGORY, BOOKMARK_LINK, GROUP_MAPPING, ROLE_MAPPING * * [foreign-property] * groupInfo, roleInfo * * [referrer-property] - * groupMappingList, roleMappingList + * bookmarkCategoryByCreatedByList, bookmarkCategoryByUpdatedByList, bookmarkLinkByCreatedByList, bookmarkLinkByUpdatedByList, groupMappingList, roleMappingList * </pre> * * @author DBFlute(AutoGenerator) @@ -287,6 +293,376 @@ // Load Referrer // ============= /** + * Load referrer of bookmarkCategoryByCreatedByList with the setupper for + * condition-bean of referrer. <br /> About internal policy, the value of + * primary key(and others too) is treated as case-insensitive. <br /> The + * condition-bean that the setupper provides have settings before you touch + * it. It is as follows: + * + * <pre> + * cb.query().setCreatedBy_InScope(pkList); + * cb.query().addOrderBy_CreatedBy_Asc(); + * </pre> + * + * @param userInfoList The entity list of userInfo. (NotNull) + * @param conditionBeanSetupper The instance of referrer condition-bean + * setupper for registering referrer condition. (NotNull) + */ + public void loadBookmarkCategoryByCreatedByList( + List<UserInfo> userInfoList, + ConditionBeanSetupper<BookmarkCategoryCB> conditionBeanSetupper) { + assertObjectNotNull("userInfoList<UserInfo>", userInfoList); + assertObjectNotNull("conditionBeanSetupper<BookmarkCategoryCB>", + conditionBeanSetupper); + if (userInfoList.isEmpty()) { + return; + } + loadBookmarkCategoryByCreatedByList(userInfoList, + new LoadReferrerOption<BookmarkCategoryCB, BookmarkCategory>( + conditionBeanSetupper)); + } + + /** + * {Refer to overload method that has an argument of condition-bean + * setupper.} + * + * @param userInfoList The entity list of userInfo. (NotNull) + * @param loadReferrerOption The option of load-referrer. (NotNull) + */ + public void loadBookmarkCategoryByCreatedByList( + List<UserInfo> userInfoList, + LoadReferrerOption<BookmarkCategoryCB, BookmarkCategory> loadReferrerOption) { + assertObjectNotNull("userInfoList<UserInfo>", userInfoList); + assertObjectNotNull( + "loadReferrerOption<BookmarkCategory, BookmarkCategoryCB>", + loadReferrerOption); + if (userInfoList.isEmpty()) { + return; + } + final BookmarkCategoryBhv referrerBhv = xgetBSFLR().select( + BookmarkCategoryBhv.class); + helpLoadReferrerInternally( + userInfoList, + loadReferrerOption, + new InternalLoadReferrerCallback<UserInfo, String, BookmarkCategoryCB, BookmarkCategory>() { + public String callbackBase_getPrimaryKeyValue( + UserInfo entity) { + return entity.getUserId(); + } + + public void callbackBase_setReferrerList(UserInfo entity, + List<BookmarkCategory> referrerList) { + entity.setBookmarkCategoryByCreatedByList(referrerList); + } + + public BookmarkCategoryCB callbackReferrer_newMyConditionBean() { + return referrerBhv.newMyConditionBean(); + } + + public void callbackReferrer_queryForeignKeyInScope( + BookmarkCategoryCB cb, List<String> pkList) { + cb.query().setCreatedBy_InScope(pkList); + } + + public void callbackReferrer_queryAddOrderByForeignKeyAsc( + BookmarkCategoryCB cb) { + cb.query().addOrderBy_CreatedBy_Asc(); + } + + public List<BookmarkCategory> callbackReferrer_selectList( + BookmarkCategoryCB cb) { + return referrerBhv.selectList(cb); + } + + public String callbackReferrer_getForeignKeyValue( + BookmarkCategory entity) { + return entity.getCreatedBy(); + } + + public void callbackReferrer_setForeignEntity( + BookmarkCategory referrerEntity, UserInfo baseEntity) { + referrerEntity.setUserInfoByCreatedBy(baseEntity); + } + }); + } + + /** + * Load referrer of bookmarkCategoryByUpdatedByList with the setupper for + * condition-bean of referrer. <br /> About internal policy, the value of + * primary key(and others too) is treated as case-insensitive. <br /> The + * condition-bean that the setupper provides have settings before you touch + * it. It is as follows: + * + * <pre> + * cb.query().setUpdatedBy_InScope(pkList); + * cb.query().addOrderBy_UpdatedBy_Asc(); + * </pre> + * + * @param userInfoList The entity list of userInfo. (NotNull) + * @param conditionBeanSetupper The instance of referrer condition-bean + * setupper for registering referrer condition. (NotNull) + */ + public void loadBookmarkCategoryByUpdatedByList( + List<UserInfo> userInfoList, + ConditionBeanSetupper<BookmarkCategoryCB> conditionBeanSetupper) { + assertObjectNotNull("userInfoList<UserInfo>", userInfoList); + assertObjectNotNull("conditionBeanSetupper<BookmarkCategoryCB>", + conditionBeanSetupper); + if (userInfoList.isEmpty()) { + return; + } + loadBookmarkCategoryByUpdatedByList(userInfoList, + new LoadReferrerOption<BookmarkCategoryCB, BookmarkCategory>( + conditionBeanSetupper)); + } + + /** + * {Refer to overload method that has an argument of condition-bean + * setupper.} + * + * @param userInfoList The entity list of userInfo. (NotNull) + * @param loadReferrerOption The option of load-referrer. (NotNull) + */ + public void loadBookmarkCategoryByUpdatedByList( + List<UserInfo> userInfoList, + LoadReferrerOption<BookmarkCategoryCB, BookmarkCategory> loadReferrerOption) { + assertObjectNotNull("userInfoList<UserInfo>", userInfoList); + assertObjectNotNull( + "loadReferrerOption<BookmarkCategory, BookmarkCategoryCB>", + loadReferrerOption); + if (userInfoList.isEmpty()) { + return; + } + final BookmarkCategoryBhv referrerBhv = xgetBSFLR().select( + BookmarkCategoryBhv.class); + helpLoadReferrerInternally( + userInfoList, + loadReferrerOption, + new InternalLoadReferrerCallback<UserInfo, String, BookmarkCategoryCB, BookmarkCategory>() { + public String callbackBase_getPrimaryKeyValue( + UserInfo entity) { + return entity.getUserId(); + } + + public void callbackBase_setReferrerList(UserInfo entity, + List<BookmarkCategory> referrerList) { + entity.setBookmarkCategoryByUpdatedByList(referrerList); + } + + public BookmarkCategoryCB callbackReferrer_newMyConditionBean() { + return referrerBhv.newMyConditionBean(); + } + + public void callbackReferrer_queryForeignKeyInScope( + BookmarkCategoryCB cb, List<String> pkList) { + cb.query().setUpdatedBy_InScope(pkList); + } + + public void callbackReferrer_queryAddOrderByForeignKeyAsc( + BookmarkCategoryCB cb) { + cb.query().addOrderBy_UpdatedBy_Asc(); + } + + public List<BookmarkCategory> callbackReferrer_selectList( + BookmarkCategoryCB cb) { + return referrerBhv.selectList(cb); + } + + public String callbackReferrer_getForeignKeyValue( + BookmarkCategory entity) { + return entity.getUpdatedBy(); + } + + public void callbackReferrer_setForeignEntity( + BookmarkCategory referrerEntity, UserInfo baseEntity) { + referrerEntity.setUserInfoByUpdatedBy(baseEntity); + } + }); + } + + /** + * Load referrer of bookmarkLinkByCreatedByList with the setupper for + * condition-bean of referrer. <br /> About internal policy, the value of + * primary key(and others too) is treated as case-insensitive. <br /> The + * condition-bean that the setupper provides have settings before you touch + * it. It is as follows: + * + * <pre> + * cb.query().setCreatedBy_InScope(pkList); + * cb.query().addOrderBy_CreatedBy_Asc(); + * </pre> + * + * @param userInfoList The entity list of userInfo. (NotNull) + * @param conditionBeanSetupper The instance of referrer condition-bean + * setupper for registering referrer condition. (NotNull) + */ + public void loadBookmarkLinkByCreatedByList(List<UserInfo> userInfoList, + ConditionBeanSetupper<BookmarkLinkCB> conditionBeanSetupper) { + assertObjectNotNull("userInfoList<UserInfo>", userInfoList); + assertObjectNotNull("conditionBeanSetupper<BookmarkLinkCB>", + conditionBeanSetupper); + if (userInfoList.isEmpty()) { + return; + } + loadBookmarkLinkByCreatedByList(userInfoList, + new LoadReferrerOption<BookmarkLinkCB, BookmarkLink>( + conditionBeanSetupper)); + } + + /** + * {Refer to overload method that has an argument of condition-bean + * setupper.} + * + * @param userInfoList The entity list of userInfo. (NotNull) + * @param loadReferrerOption The option of load-referrer. (NotNull) + */ + public void loadBookmarkLinkByCreatedByList(List<UserInfo> userInfoList, + LoadReferrerOption<BookmarkLinkCB, BookmarkLink> loadReferrerOption) { + assertObjectNotNull("userInfoList<UserInfo>", userInfoList); + assertObjectNotNull("loadReferrerOption<BookmarkLink, BookmarkLinkCB>", + loadReferrerOption); + if (userInfoList.isEmpty()) { + return; + } + final BookmarkLinkBhv referrerBhv = xgetBSFLR().select( + BookmarkLinkBhv.class); + helpLoadReferrerInternally( + userInfoList, + loadReferrerOption, + new InternalLoadReferrerCallback<UserInfo, String, BookmarkLinkCB, BookmarkLink>() { + public String callbackBase_getPrimaryKeyValue( + UserInfo entity) { + return entity.getUserId(); + } + + public void callbackBase_setReferrerList(UserInfo entity, + List<BookmarkLink> referrerList) { + entity.setBookmarkLinkByCreatedByList(referrerList); + } + + public BookmarkLinkCB callbackReferrer_newMyConditionBean() { + return referrerBhv.newMyConditionBean(); + } + + public void callbackReferrer_queryForeignKeyInScope( + BookmarkLinkCB cb, List<String> pkList) { + cb.query().setCreatedBy_InScope(pkList); + } + + public void callbackReferrer_queryAddOrderByForeignKeyAsc( + BookmarkLinkCB cb) { + cb.query().addOrderBy_CreatedBy_Asc(); + } + + public List<BookmarkLink> callbackReferrer_selectList( + BookmarkLinkCB cb) { + return referrerBhv.selectList(cb); + } + + public String callbackReferrer_getForeignKeyValue( + BookmarkLink entity) { + return entity.getCreatedBy(); + } + + public void callbackReferrer_setForeignEntity( + BookmarkLink referrerEntity, UserInfo baseEntity) { + referrerEntity.setUserInfoByCreatedBy(baseEntity); + } + }); + } + + /** + * Load referrer of bookmarkLinkByUpdatedByList with the setupper for + * condition-bean of referrer. <br /> About internal policy, the value of + * primary key(and others too) is treated as case-insensitive. <br /> The + * condition-bean that the setupper provides have settings before you touch + * it. It is as follows: + * + * <pre> + * cb.query().setUpdatedBy_InScope(pkList); + * cb.query().addOrderBy_UpdatedBy_Asc(); + * </pre> + * + * @param userInfoList The entity list of userInfo. (NotNull) + * @param conditionBeanSetupper The instance of referrer condition-bean + * setupper for registering referrer condition. (NotNull) + */ + public void loadBookmarkLinkByUpdatedByList(List<UserInfo> userInfoList, + ConditionBeanSetupper<BookmarkLinkCB> conditionBeanSetupper) { + assertObjectNotNull("userInfoList<UserInfo>", userInfoList); + assertObjectNotNull("conditionBeanSetupper<BookmarkLinkCB>", + conditionBeanSetupper); + if (userInfoList.isEmpty()) { + return; + } + loadBookmarkLinkByUpdatedByList(userInfoList, + new LoadReferrerOption<BookmarkLinkCB, BookmarkLink>( + conditionBeanSetupper)); + } + + /** + * {Refer to overload method that has an argument of condition-bean + * setupper.} + * + * @param userInfoList The entity list of userInfo. (NotNull) + * @param loadReferrerOption The option of load-referrer. (NotNull) + */ + public void loadBookmarkLinkByUpdatedByList(List<UserInfo> userInfoList, + LoadReferrerOption<BookmarkLinkCB, BookmarkLink> loadReferrerOption) { + assertObjectNotNull("userInfoList<UserInfo>", userInfoList); + assertObjectNotNull("loadReferrerOption<BookmarkLink, BookmarkLinkCB>", + loadReferrerOption); + if (userInfoList.isEmpty()) { + return; + } + final BookmarkLinkBhv referrerBhv = xgetBSFLR().select( + BookmarkLinkBhv.class); + helpLoadReferrerInternally( + userInfoList, + loadReferrerOption, + new InternalLoadReferrerCallback<UserInfo, String, BookmarkLinkCB, BookmarkLink>() { + public String callbackBase_getPrimaryKeyValue( + UserInfo entity) { + return entity.getUserId(); + } + + public void callbackBase_setReferrerList(UserInfo entity, + List<BookmarkLink> referrerList) { + entity.setBookmarkLinkByUpdatedByList(referrerList); + } + + public BookmarkLinkCB callbackReferrer_newMyConditionBean() { + return referrerBhv.newMyConditionBean(); + } + + public void callbackReferrer_queryForeignKeyInScope( + BookmarkLinkCB cb, List<String> pkList) { + cb.query().setUpdatedBy_InScope(pkList); + } + + public void callbackReferrer_queryAddOrderByForeignKeyAsc( + BookmarkLinkCB cb) { + cb.query().addOrderBy_UpdatedBy_Asc(); + } + + public List<BookmarkLink> callbackReferrer_selectList( + BookmarkLinkCB cb) { + return referrerBhv.selectList(cb); + } + + public String callbackReferrer_getForeignKeyValue( + BookmarkLink entity) { + return entity.getUpdatedBy(); + } + + public void callbackReferrer_setForeignEntity( + BookmarkLink referrerEntity, UserInfo baseEntity) { + referrerEntity.setUserInfoByUpdatedBy(baseEntity); + } + }); + } + + /** * Load referrer of groupMappingList with the setupper for condition-bean of * referrer. <br /> About internal policy, the value of primary key(and * others too) is treated as case-insensitive. <br /> The condition-bean Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsBookmarkCategory.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsBookmarkCategory.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsBookmarkCategory.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -8,6 +8,7 @@ import jp.sf.pal.bookmark.db.allcommon.dbmeta.DBMeta; import jp.sf.pal.bookmark.db.allcommon.dbmeta.DBMetaInstanceHandler; import jp.sf.pal.bookmark.db.exentity.BookmarkLink; +import jp.sf.pal.bookmark.db.exentity.UserInfo; /** * The entity of BOOKMARK_CATEGORY that the type is TABLE. <br /> @@ -29,13 +30,13 @@ * VERSIONNO * * [foreign-table] - * + * USER_INFO * * [referrer-table] * BOOKMARK_LINK * * [foreign-property] - * + * userInfoByCreatedBy, userInfoByUpdatedBy * * [referrer-property] * bookmarkLinkList @@ -88,13 +89,13 @@ /** CREATED_TIME: {NotNull : TIMESTAMP} */ protected java.sql.Timestamp _createdTime; - /** CREATED_BY: {NotNull : VARCHAR(255)} */ + /** CREATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} */ protected String _createdBy; /** UPDATED_TIME: {NotNull : TIMESTAMP} */ protected java.sql.Timestamp _updatedTime; - /** UPDATED_BY: {NotNull : VARCHAR(255)} */ + /** UPDATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} */ protected String _updatedBy; /** DELETED_TIME: {TIMESTAMP} */ @@ -155,6 +156,68 @@ // ========= // Foreign Property // ================ + // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + // Foreign Property = [userInfoByCreatedBy] + // * * * * * * * * */ + public static final int userInfoByCreatedBy_RELNO = 0; + + public static final String userInfoByCreatedBy_RELKEYS = "CREATED_BY:USER_ID"; + + /** USER_INFO as 'userInfoByCreatedBy'. */ + protected UserInfo _parentUserInfoByCreatedBy; + + /** + * USER_INFO as 'userInfoByCreatedBy'. {without lazy-load} + * + * @return The entity of foreign property 'userInfoByCreatedBy'. (Nullable: + * If the foreign key does not have 'NotNull' constraint, please + * check null.) + */ + public UserInfo getUserInfoByCreatedBy() { + return _parentUserInfoByCreatedBy; + } + + /** + * USER_INFO as 'userInfoByCreatedBy'. + * + * @param userInfoByCreatedBy The entity of foreign property + * 'userInfoByCreatedBy'. (Nullable) + */ + public void setUserInfoByCreatedBy(UserInfo userInfoByCreatedBy) { + _parentUserInfoByCreatedBy = userInfoByCreatedBy; + } + + // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + // Foreign Property = [userInfoByUpdatedBy] + // * * * * * * * * */ + public static final int userInfoByUpdatedBy_RELNO = 1; + + public static final String userInfoByUpdatedBy_RELKEYS = "UPDATED_BY:USER_ID"; + + /** USER_INFO as 'userInfoByUpdatedBy'. */ + protected UserInfo _parentUserInfoByUpdatedBy; + + /** + * USER_INFO as 'userInfoByUpdatedBy'. {without lazy-load} + * + * @return The entity of foreign property 'userInfoByUpdatedBy'. (Nullable: + * If the foreign key does not have 'NotNull' constraint, please + * check null.) + */ + public UserInfo getUserInfoByUpdatedBy() { + return _parentUserInfoByUpdatedBy; + } + + /** + * USER_INFO as 'userInfoByUpdatedBy'. + * + * @param userInfoByUpdatedBy The entity of foreign property + * 'userInfoByUpdatedBy'. (Nullable) + */ + public void setUserInfoByUpdatedBy(UserInfo userInfoByUpdatedBy) { + _parentUserInfoByUpdatedBy = userInfoByUpdatedBy; + } + //========================================================================== // ========= // Referrer Property @@ -423,11 +486,14 @@ this._createdTime = createdTime; } - /** The column annotation for S2Dao. {NotNull : VARCHAR(255)} */ + /** + * The column annotation for S2Dao. {NotNull : VARCHAR(255) : FK to + * USER_INFO} + */ public static final String createdBy_COLUMN = "CREATED_BY"; /** - * CREATED_BY: {NotNull : VARCHAR(255)} <br /> + * CREATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} <br /> * * @return The value of the column 'CREATED_BY'. (Nullable) */ @@ -436,7 +502,7 @@ } /** - * CREATED_BY: {NotNull : VARCHAR(255)} <br /> + * CREATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} <br /> * * @param createdBy The value of the column 'CREATED_BY'. (Nullable) */ @@ -467,11 +533,14 @@ this._updatedTime = updatedTime; } - /** The column annotation for S2Dao. {NotNull : VARCHAR(255)} */ + /** + * The column annotation for S2Dao. {NotNull : VARCHAR(255) : FK to + * USER_INFO} + */ public static final String updatedBy_COLUMN = "UPDATED_BY"; /** - * UPDATED_BY: {NotNull : VARCHAR(255)} <br /> + * UPDATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} <br /> * * @return The value of the column 'UPDATED_BY'. (Nullable) */ @@ -480,7 +549,7 @@ } /** - * UPDATED_BY: {NotNull : VARCHAR(255)} <br /> + * UPDATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} <br /> * * @param updatedBy The value of the column 'UPDATED_BY'. (Nullable) */ Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsBookmarkLink.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsBookmarkLink.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsBookmarkLink.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -6,6 +6,7 @@ import jp.sf.pal.bookmark.db.allcommon.dbmeta.DBMeta; import jp.sf.pal.bookmark.db.allcommon.dbmeta.DBMetaInstanceHandler; import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; +import jp.sf.pal.bookmark.db.exentity.UserInfo; /** * The entity of BOOKMARK_LINK that the type is TABLE. <br /> @@ -27,13 +28,13 @@ * VERSIONNO * * [foreign-table] - * BOOKMARK_CATEGORY + * BOOKMARK_CATEGORY, USER_INFO * * [referrer-table] * * * [foreign-property] - * bookmarkCategory + * bookmarkCategory, userInfoByCreatedBy, userInfoByUpdatedBy * * [referrer-property] * @@ -91,13 +92,13 @@ /** CREATED_TIME: {NotNull : TIMESTAMP} */ protected java.sql.Timestamp _createdTime; - /** CREATED_BY: {NotNull : VARCHAR(255)} */ + /** CREATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} */ protected String _createdBy; /** UPDATED_TIME: {NotNull : TIMESTAMP} */ protected java.sql.Timestamp _updatedTime; - /** UPDATED_BY: {NotNull : VARCHAR(255)} */ + /** UPDATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} */ protected String _updatedBy; /** DELETED_TIME: {TIMESTAMP} */ @@ -189,6 +190,68 @@ _parentBookmarkCategory = bookmarkCategory; } + // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + // Foreign Property = [userInfoByCreatedBy] + // * * * * * * * * */ + public static final int userInfoByCreatedBy_RELNO = 1; + + public static final String userInfoByCreatedBy_RELKEYS = "CREATED_BY:USER_ID"; + + /** USER_INFO as 'userInfoByCreatedBy'. */ + protected UserInfo _parentUserInfoByCreatedBy; + + /** + * USER_INFO as 'userInfoByCreatedBy'. {without lazy-load} + * + * @return The entity of foreign property 'userInfoByCreatedBy'. (Nullable: + * If the foreign key does not have 'NotNull' constraint, please + * check null.) + */ + public UserInfo getUserInfoByCreatedBy() { + return _parentUserInfoByCreatedBy; + } + + /** + * USER_INFO as 'userInfoByCreatedBy'. + * + * @param userInfoByCreatedBy The entity of foreign property + * 'userInfoByCreatedBy'. (Nullable) + */ + public void setUserInfoByCreatedBy(UserInfo userInfoByCreatedBy) { + _parentUserInfoByCreatedBy = userInfoByCreatedBy; + } + + // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + // Foreign Property = [userInfoByUpdatedBy] + // * * * * * * * * */ + public static final int userInfoByUpdatedBy_RELNO = 2; + + public static final String userInfoByUpdatedBy_RELKEYS = "UPDATED_BY:USER_ID"; + + /** USER_INFO as 'userInfoByUpdatedBy'. */ + protected UserInfo _parentUserInfoByUpdatedBy; + + /** + * USER_INFO as 'userInfoByUpdatedBy'. {without lazy-load} + * + * @return The entity of foreign property 'userInfoByUpdatedBy'. (Nullable: + * If the foreign key does not have 'NotNull' constraint, please + * check null.) + */ + public UserInfo getUserInfoByUpdatedBy() { + return _parentUserInfoByUpdatedBy; + } + + /** + * USER_INFO as 'userInfoByUpdatedBy'. + * + * @param userInfoByUpdatedBy The entity of foreign property + * 'userInfoByUpdatedBy'. (Nullable) + */ + public void setUserInfoByUpdatedBy(UserInfo userInfoByUpdatedBy) { + _parentUserInfoByUpdatedBy = userInfoByUpdatedBy; + } + //========================================================================== // ========= // Referrer Property @@ -477,11 +540,14 @@ this._createdTime = createdTime; } - /** The column annotation for S2Dao. {NotNull : VARCHAR(255)} */ + /** + * The column annotation for S2Dao. {NotNull : VARCHAR(255) : FK to + * USER_INFO} + */ public static final String createdBy_COLUMN = "CREATED_BY"; /** - * CREATED_BY: {NotNull : VARCHAR(255)} <br /> + * CREATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} <br /> * * @return The value of the column 'CREATED_BY'. (Nullable) */ @@ -490,7 +556,7 @@ } /** - * CREATED_BY: {NotNull : VARCHAR(255)} <br /> + * CREATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} <br /> * * @param createdBy The value of the column 'CREATED_BY'. (Nullable) */ @@ -521,11 +587,14 @@ this._updatedTime = updatedTime; } - /** The column annotation for S2Dao. {NotNull : VARCHAR(255)} */ + /** + * The column annotation for S2Dao. {NotNull : VARCHAR(255) : FK to + * USER_INFO} + */ public static final String updatedBy_COLUMN = "UPDATED_BY"; /** - * UPDATED_BY: {NotNull : VARCHAR(255)} <br /> + * UPDATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} <br /> * * @return The value of the column 'UPDATED_BY'. (Nullable) */ @@ -534,7 +603,7 @@ } /** - * UPDATED_BY: {NotNull : VARCHAR(255)} <br /> + * UPDATED_BY: {NotNull : VARCHAR(255) : FK to USER_INFO} <br /> * * @param updatedBy The value of the column 'UPDATED_BY'. (Nullable) */ Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsUserInfo.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsUserInfo.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/BsUserInfo.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -7,6 +7,8 @@ import jp.sf.pal.bookmark.db.allcommon.Entity; import jp.sf.pal.bookmark.db.allcommon.dbmeta.DBMeta; import jp.sf.pal.bookmark.db.allcommon.dbmeta.DBMetaInstanceHandler; +import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; +import jp.sf.pal.bookmark.db.exentity.BookmarkLink; import jp.sf.pal.bookmark.db.exentity.GroupInfo; import jp.sf.pal.bookmark.db.exentity.GroupMapping; import jp.sf.pal.bookmark.db.exentity.RoleInfo; @@ -35,13 +37,13 @@ * GROUP_INFO, ROLE_INFO * * [referrer-table] - * GROUP_MAPPING, ROLE_MAPPING + * BOOKMARK_CATEGORY, BOOKMARK_LINK, GROUP_MAPPING, ROLE_MAPPING * * [foreign-property] * groupInfo, roleInfo * * [referrer-property] - * groupMappingList, roleMappingList + * bookmarkCategoryByCreatedByList, bookmarkCategoryByUpdatedByList, bookmarkLinkByCreatedByList, bookmarkLinkByUpdatedByList, groupMappingList, roleMappingList * </pre> * * @author DBFlute(AutoGenerator) @@ -237,6 +239,138 @@ // Referrer Property // ================= // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + // Referrer Property = [bookmarkCategoryByCreatedByList] + // * * * * * * * * */ + /** BOOKMARK_CATEGORY as 'bookmarkCategoryByCreatedByList'. */ + protected List<BookmarkCategory> _childrenBookmarkCategoryByCreatedByList; + + /** + * BOOKMARK_CATEGORY as 'bookmarkCategoryByCreatedByList'. {without + * lazy-load} <br /> + * + * @return The entity list of referrer property + * 'bookmarkCategoryByCreatedByList'. (NotNull: If it's not loaded + * yet, initializes the list instance of referrer as empty and + * returns it.) + */ + public List<BookmarkCategory> getBookmarkCategoryByCreatedByList() { + if (_childrenBookmarkCategoryByCreatedByList == null) { + _childrenBookmarkCategoryByCreatedByList = new ArrayList<BookmarkCategory>(); + } + return _childrenBookmarkCategoryByCreatedByList; + } + + /** + * BOOKMARK_CATEGORY as 'bookmarkCategoryByCreatedByList'. + * + * @param bookmarkCategoryByCreatedByList The entity list of referrer + * property 'bookmarkCategoryByCreatedByList'. (Nullable) + */ + public void setBookmarkCategoryByCreatedByList( + List<BookmarkCategory> bookmarkCategoryByCreatedByList) { + _childrenBookmarkCategoryByCreatedByList = bookmarkCategoryByCreatedByList; + } + + // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + // Referrer Property = [bookmarkCategoryByUpdatedByList] + // * * * * * * * * */ + /** BOOKMARK_CATEGORY as 'bookmarkCategoryByUpdatedByList'. */ + protected List<BookmarkCategory> _childrenBookmarkCategoryByUpdatedByList; + + /** + * BOOKMARK_CATEGORY as 'bookmarkCategoryByUpdatedByList'. {without + * lazy-load} <br /> + * + * @return The entity list of referrer property + * 'bookmarkCategoryByUpdatedByList'. (NotNull: If it's not loaded + * yet, initializes the list instance of referrer as empty and + * returns it.) + */ + public List<BookmarkCategory> getBookmarkCategoryByUpdatedByList() { + if (_childrenBookmarkCategoryByUpdatedByList == null) { + _childrenBookmarkCategoryByUpdatedByList = new ArrayList<BookmarkCategory>(); + } + return _childrenBookmarkCategoryByUpdatedByList; + } + + /** + * BOOKMARK_CATEGORY as 'bookmarkCategoryByUpdatedByList'. + * + * @param bookmarkCategoryByUpdatedByList The entity list of referrer + * property 'bookmarkCategoryByUpdatedByList'. (Nullable) + */ + public void setBookmarkCategoryByUpdatedByList( + List<BookmarkCategory> bookmarkCategoryByUpdatedByList) { + _childrenBookmarkCategoryByUpdatedByList = bookmarkCategoryByUpdatedByList; + } + + // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + // Referrer Property = [bookmarkLinkByCreatedByList] + // * * * * * * * * */ + /** BOOKMARK_LINK as 'bookmarkLinkByCreatedByList'. */ + protected List<BookmarkLink> _childrenBookmarkLinkByCreatedByList; + + /** + * BOOKMARK_LINK as 'bookmarkLinkByCreatedByList'. {without lazy-load} <br + * /> + * + * @return The entity list of referrer property + * 'bookmarkLinkByCreatedByList'. (NotNull: If it's not loaded yet, + * initializes the list instance of referrer as empty and returns + * it.) + */ + public List<BookmarkLink> getBookmarkLinkByCreatedByList() { + if (_childrenBookmarkLinkByCreatedByList == null) { + _childrenBookmarkLinkByCreatedByList = new ArrayList<BookmarkLink>(); + } + return _childrenBookmarkLinkByCreatedByList; + } + + /** + * BOOKMARK_LINK as 'bookmarkLinkByCreatedByList'. + * + * @param bookmarkLinkByCreatedByList The entity list of referrer property + * 'bookmarkLinkByCreatedByList'. (Nullable) + */ + public void setBookmarkLinkByCreatedByList( + List<BookmarkLink> bookmarkLinkByCreatedByList) { + _childrenBookmarkLinkByCreatedByList = bookmarkLinkByCreatedByList; + } + + // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + // Referrer Property = [bookmarkLinkByUpdatedByList] + // * * * * * * * * */ + /** BOOKMARK_LINK as 'bookmarkLinkByUpdatedByList'. */ + protected List<BookmarkLink> _childrenBookmarkLinkByUpdatedByList; + + /** + * BOOKMARK_LINK as 'bookmarkLinkByUpdatedByList'. {without lazy-load} <br + * /> + * + * @return The entity list of referrer property + * 'bookmarkLinkByUpdatedByList'. (NotNull: If it's not loaded yet, + * initializes the list instance of referrer as empty and returns + * it.) + */ + public List<BookmarkLink> getBookmarkLinkByUpdatedByList() { + if (_childrenBookmarkLinkByUpdatedByList == null) { + _childrenBookmarkLinkByUpdatedByList = new ArrayList<BookmarkLink>(); + } + return _childrenBookmarkLinkByUpdatedByList; + } + + /** + * BOOKMARK_LINK as 'bookmarkLinkByUpdatedByList'. + * + * @param bookmarkLinkByUpdatedByList The entity list of referrer property + * 'bookmarkLinkByUpdatedByList'. (Nullable) + */ + public void setBookmarkLinkByUpdatedByList( + List<BookmarkLink> bookmarkLinkByUpdatedByList) { + _childrenBookmarkLinkByUpdatedByList = bookmarkLinkByUpdatedByList; + } + + // /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Referrer Property = [groupMappingList] // * * * * * * * * */ /** GROUP_MAPPING as 'groupMappingList'. */ Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/BookmarkCategoryDbm.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/BookmarkCategoryDbm.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/BookmarkCategoryDbm.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -6,6 +6,7 @@ import jp.sf.pal.bookmark.db.allcommon.Entity; import jp.sf.pal.bookmark.db.allcommon.dbmeta.AbstractDBMeta; import jp.sf.pal.bookmark.db.allcommon.dbmeta.info.ColumnInfo; +import jp.sf.pal.bookmark.db.allcommon.dbmeta.info.ForeignInfo; import jp.sf.pal.bookmark.db.allcommon.dbmeta.info.ReferrerInfo; import jp.sf.pal.bookmark.db.allcommon.dbmeta.info.UniqueInfo; import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; @@ -231,7 +232,20 @@ // ----------------------------------------------------- // Foreign Property // ---------------- + public ForeignInfo foreignUserInfoByCreatedBy() { + Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnCreatedBy(), + UserInfoDbm.getInstance().columnUserId()); + return cfi("userInfoByCreatedBy", this, UserInfoDbm.getInstance(), map, + 0, false); + } + public ForeignInfo foreignUserInfoByUpdatedBy() { + Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnUpdatedBy(), + UserInfoDbm.getInstance().columnUserId()); + return cfi("userInfoByUpdatedBy", this, UserInfoDbm.getInstance(), map, + 1, false); + } + // ----------------------------------------------------- // Referrer Property // ----------------- Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/BookmarkLinkDbm.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/BookmarkLinkDbm.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/BookmarkLinkDbm.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -252,6 +252,20 @@ map, 0, false); } + public ForeignInfo foreignUserInfoByCreatedBy() { + Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnCreatedBy(), + UserInfoDbm.getInstance().columnUserId()); + return cfi("userInfoByCreatedBy", this, UserInfoDbm.getInstance(), map, + 1, false); + } + + public ForeignInfo foreignUserInfoByUpdatedBy() { + Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnUpdatedBy(), + UserInfoDbm.getInstance().columnUserId()); + return cfi("userInfoByUpdatedBy", this, UserInfoDbm.getInstance(), map, + 2, false); + } + // ----------------------------------------------------- // Referrer Property // ----------------- Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/UserInfoDbm.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/UserInfoDbm.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/bsentity/dbmeta/UserInfoDbm.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -289,6 +289,34 @@ // ----------------------------------------------------- // Referrer Property // ----------------- + public ReferrerInfo referrerBookmarkCategoryByCreatedByList() { + Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnUserId(), + BookmarkCategoryDbm.getInstance().columnCreatedBy()); + return cri("bookmarkCategoryByCreatedByList", this, BookmarkCategoryDbm + .getInstance(), map, false); + } + + public ReferrerInfo referrerBookmarkCategoryByUpdatedByList() { + Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnUserId(), + BookmarkCategoryDbm.getInstance().columnUpdatedBy()); + return cri("bookmarkCategoryByUpdatedByList", this, BookmarkCategoryDbm + .getInstance(), map, false); + } + + public ReferrerInfo referrerBookmarkLinkByCreatedByList() { + Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnUserId(), + BookmarkLinkDbm.getInstance().columnCreatedBy()); + return cri("bookmarkLinkByCreatedByList", this, BookmarkLinkDbm + .getInstance(), map, false); + } + + public ReferrerInfo referrerBookmarkLinkByUpdatedByList() { + Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnUserId(), + BookmarkLinkDbm.getInstance().columnUpdatedBy()); + return cri("bookmarkLinkByUpdatedByList", this, BookmarkLinkDbm + .getInstance(), map, false); + } + public ReferrerInfo referrerGroupMappingList() { Map<ColumnInfo, ColumnInfo> map = newLinkedHashMap(columnUserId(), GroupMappingDbm.getInstance().columnUserId()); Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsBookmarkCategoryCB.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsBookmarkCategoryCB.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsBookmarkCategoryCB.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -9,7 +9,10 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.UnionQuery; import jp.sf.pal.bookmark.db.cbean.BookmarkCategoryCB; import jp.sf.pal.bookmark.db.cbean.BookmarkLinkCB; +import jp.sf.pal.bookmark.db.cbean.UserInfoCB; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; +import jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ; +import jp.sf.pal.bookmark.db.cbean.nss.UserInfoNss; /** * The base condition-bean of BOOKMARK_CATEGORY. @@ -161,6 +164,52 @@ // Setup Select // ============ + protected UserInfoNss _nssUserInfoByCreatedBy; + + public UserInfoNss getNssUserInfoByCreatedBy() { + if (_nssUserInfoByCreatedBy == null) { + _nssUserInfoByCreatedBy = new UserInfoNss(null); + } + return _nssUserInfoByCreatedBy; + } + + public UserInfoNss setupSelect_UserInfoByCreatedBy() { + doSetupSelect(new SsCall() { + public ConditionQuery qf() { + return query().queryUserInfoByCreatedBy(); + } + }); + if (_nssUserInfoByCreatedBy == null + || !_nssUserInfoByCreatedBy.hasConditionQuery()) { + _nssUserInfoByCreatedBy = new UserInfoNss(query() + .queryUserInfoByCreatedBy()); + } + return _nssUserInfoByCreatedBy; + } + + protected UserInfoNss _nssUserInfoByUpdatedBy; + + public UserInfoNss getNssUserInfoByUpdatedBy() { + if (_nssUserInfoByUpdatedBy == null) { + _nssUserInfoByUpdatedBy = new UserInfoNss(null); + } + return _nssUserInfoByUpdatedBy; + } + + public UserInfoNss setupSelect_UserInfoByUpdatedBy() { + doSetupSelect(new SsCall() { + public ConditionQuery qf() { + return query().queryUserInfoByUpdatedBy(); + } + }); + if (_nssUserInfoByUpdatedBy == null + || !_nssUserInfoByUpdatedBy.hasConditionQuery()) { + _nssUserInfoByUpdatedBy = new UserInfoNss(query() + .queryUserInfoByUpdatedBy()); + } + return _nssUserInfoByUpdatedBy; + } + // [DBFlute-0.7.4] //========================================================================== // ========= @@ -188,6 +237,10 @@ AbstractSpecification<BookmarkCategoryCQ> { protected SpQyCall<BookmarkCategoryCQ> _myQyCall; + protected UserInfoCB.Specification _userInfoByCreatedBy; + + protected UserInfoCB.Specification _userInfoByUpdatedBy; + public Specification(ConditionBean baseCB, SpQyCall<BookmarkCategoryCQ> qyCall, boolean forDeriveReferrer) { super(baseCB, qyCall, forDeriveReferrer); @@ -244,12 +297,60 @@ protected void doSpecifyRequiredColumn() { columnId();// PK + if (_myQyCall.qy().hasConditionQueryUserInfoByCreatedBy()) { + columnCreatedBy();// FK + } + if (_myQyCall.qy().hasConditionQueryUserInfoByUpdatedBy()) { + columnUpdatedBy();// FK + } } protected String getTableDbName() { return "BOOKMARK_CATEGORY"; } + public UserInfoCB.Specification specifyUserInfoByCreatedBy() { + assertForeign("userInfoByCreatedBy"); + if (_userInfoByCreatedBy == null) { + _userInfoByCreatedBy = new UserInfoCB.Specification(_baseCB, + new SpQyCall<UserInfoCQ>() { + public boolean has() { + return _myQyCall.has() + && _myQyCall + .qy() + .hasConditionQueryUserInfoByCreatedBy(); + } + + public UserInfoCQ qy() { + return _myQyCall.qy() + .queryUserInfoByCreatedBy(); + } + }, _forDeriveReferrer); + } + return _userInfoByCreatedBy; + } + + public UserInfoCB.Specification specifyUserInfoByUpdatedBy() { + assertForeign("userInfoByUpdatedBy"); + if (_userInfoByUpdatedBy == null) { + _userInfoByUpdatedBy = new UserInfoCB.Specification(_baseCB, + new SpQyCall<UserInfoCQ>() { + public boolean has() { + return _myQyCall.has() + && _myQyCall + .qy() + .hasConditionQueryUserInfoByUpdatedBy(); + } + + public UserInfoCQ qy() { + return _myQyCall.qy() + .queryUserInfoByUpdatedBy(); + } + }, _forDeriveReferrer); + } + return _userInfoByUpdatedBy; + } + public RAFunction<BookmarkLinkCB, BookmarkCategoryCQ> derivedBookmarkLinkList() { return new RAFunction<BookmarkLinkCB, BookmarkCategoryCQ>(_baseCB, _myQyCall.qy(), Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsBookmarkLinkCB.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsBookmarkLinkCB.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsBookmarkLinkCB.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -9,9 +9,12 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.UnionQuery; import jp.sf.pal.bookmark.db.cbean.BookmarkCategoryCB; import jp.sf.pal.bookmark.db.cbean.BookmarkLinkCB; +import jp.sf.pal.bookmark.db.cbean.UserInfoCB; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; +import jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ; import jp.sf.pal.bookmark.db.cbean.nss.BookmarkCategoryNss; +import jp.sf.pal.bookmark.db.cbean.nss.UserInfoNss; /** * The base condition-bean of BOOKMARK_LINK. @@ -186,6 +189,52 @@ return _nssBookmarkCategory; } + protected UserInfoNss _nssUserInfoByCreatedBy; + + public UserInfoNss getNssUserInfoByCreatedBy() { + if (_nssUserInfoByCreatedBy == null) { + _nssUserInfoByCreatedBy = new UserInfoNss(null); + } + return _nssUserInfoByCreatedBy; + } + + public UserInfoNss setupSelect_UserInfoByCreatedBy() { + doSetupSelect(new SsCall() { + public ConditionQuery qf() { + return query().queryUserInfoByCreatedBy(); + } + }); + if (_nssUserInfoByCreatedBy == null + || !_nssUserInfoByCreatedBy.hasConditionQuery()) { + _nssUserInfoByCreatedBy = new UserInfoNss(query() + .queryUserInfoByCreatedBy()); + } + return _nssUserInfoByCreatedBy; + } + + protected UserInfoNss _nssUserInfoByUpdatedBy; + + public UserInfoNss getNssUserInfoByUpdatedBy() { + if (_nssUserInfoByUpdatedBy == null) { + _nssUserInfoByUpdatedBy = new UserInfoNss(null); + } + return _nssUserInfoByUpdatedBy; + } + + public UserInfoNss setupSelect_UserInfoByUpdatedBy() { + doSetupSelect(new SsCall() { + public ConditionQuery qf() { + return query().queryUserInfoByUpdatedBy(); + } + }); + if (_nssUserInfoByUpdatedBy == null + || !_nssUserInfoByUpdatedBy.hasConditionQuery()) { + _nssUserInfoByUpdatedBy = new UserInfoNss(query() + .queryUserInfoByUpdatedBy()); + } + return _nssUserInfoByUpdatedBy; + } + // [DBFlute-0.7.4] //========================================================================== // ========= @@ -215,6 +264,10 @@ protected BookmarkCategoryCB.Specification _bookmarkCategory; + protected UserInfoCB.Specification _userInfoByCreatedBy; + + protected UserInfoCB.Specification _userInfoByUpdatedBy; + public Specification(ConditionBean baseCB, SpQyCall<BookmarkLinkCQ> qyCall, boolean forDeriveReferrer) { super(baseCB, qyCall, forDeriveReferrer); @@ -282,6 +335,12 @@ if (_myQyCall.qy().hasConditionQueryBookmarkCategory()) { columnCategoryId();// FK } + if (_myQyCall.qy().hasConditionQueryUserInfoByCreatedBy()) { + columnCreatedBy();// FK + } + if (_myQyCall.qy().hasConditionQueryUserInfoByUpdatedBy()) { + columnUpdatedBy();// FK + } } protected String getTableDbName() { @@ -307,6 +366,48 @@ } return _bookmarkCategory; } + + public UserInfoCB.Specification specifyUserInfoByCreatedBy() { + assertForeign("userInfoByCreatedBy"); + if (_userInfoByCreatedBy == null) { + _userInfoByCreatedBy = new UserInfoCB.Specification(_baseCB, + new SpQyCall<UserInfoCQ>() { + public boolean has() { + return _myQyCall.has() + && _myQyCall + .qy() + .hasConditionQueryUserInfoByCreatedBy(); + } + + public UserInfoCQ qy() { + return _myQyCall.qy() + .queryUserInfoByCreatedBy(); + } + }, _forDeriveReferrer); + } + return _userInfoByCreatedBy; + } + + public UserInfoCB.Specification specifyUserInfoByUpdatedBy() { + assertForeign("userInfoByUpdatedBy"); + if (_userInfoByUpdatedBy == null) { + _userInfoByUpdatedBy = new UserInfoCB.Specification(_baseCB, + new SpQyCall<UserInfoCQ>() { + public boolean has() { + return _myQyCall.has() + && _myQyCall + .qy() + .hasConditionQueryUserInfoByUpdatedBy(); + } + + public UserInfoCQ qy() { + return _myQyCall.qy() + .queryUserInfoByUpdatedBy(); + } + }, _forDeriveReferrer); + } + return _userInfoByUpdatedBy; + } } // Very Internal (for Suppressing Warn about 'Not Use Import') Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsUserInfoCB.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsUserInfoCB.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/bs/BsUserInfoCB.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -7,6 +7,8 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.ConditionQuery; import jp.sf.pal.bookmark.db.allcommon.cbean.SubQuery; import jp.sf.pal.bookmark.db.allcommon.cbean.UnionQuery; +import jp.sf.pal.bookmark.db.cbean.BookmarkCategoryCB; +import jp.sf.pal.bookmark.db.cbean.BookmarkLinkCB; import jp.sf.pal.bookmark.db.cbean.GroupInfoCB; import jp.sf.pal.bookmark.db.cbean.GroupMappingCB; import jp.sf.pal.bookmark.db.cbean.RoleInfoCB; @@ -370,6 +372,58 @@ return _roleInfo; } + public RAFunction<BookmarkCategoryCB, UserInfoCQ> derivedBookmarkCategoryByCreatedByList() { + return new RAFunction<BookmarkCategoryCB, UserInfoCQ>(_baseCB, + _myQyCall.qy(), + new RAQSetupper<BookmarkCategoryCB, UserInfoCQ>() { + public void setup(String function, + SubQuery<BookmarkCategoryCB> subQuery, + UserInfoCQ cq, String aliasName) { + cq.xderiveBookmarkCategoryByCreatedByList(function, + subQuery, aliasName); + } + }); + } + + public RAFunction<BookmarkCategoryCB, UserInfoCQ> derivedBookmarkCategoryByUpdatedByList() { + return new RAFunction<BookmarkCategoryCB, UserInfoCQ>(_baseCB, + _myQyCall.qy(), + new RAQSetupper<BookmarkCategoryCB, UserInfoCQ>() { + public void setup(String function, + SubQuery<BookmarkCategoryCB> subQuery, + UserInfoCQ cq, String aliasName) { + cq.xderiveBookmarkCategoryByUpdatedByList(function, + subQuery, aliasName); + } + }); + } + + public RAFunction<BookmarkLinkCB, UserInfoCQ> derivedBookmarkLinkByCreatedByList() { + return new RAFunction<BookmarkLinkCB, UserInfoCQ>(_baseCB, + _myQyCall.qy(), + new RAQSetupper<BookmarkLinkCB, UserInfoCQ>() { + public void setup(String function, + SubQuery<BookmarkLinkCB> subQuery, + UserInfoCQ cq, String aliasName) { + cq.xderiveBookmarkLinkByCreatedByList(function, + subQuery, aliasName); + } + }); + } + + public RAFunction<BookmarkLinkCB, UserInfoCQ> derivedBookmarkLinkByUpdatedByList() { + return new RAFunction<BookmarkLinkCB, UserInfoCQ>(_baseCB, + _myQyCall.qy(), + new RAQSetupper<BookmarkLinkCB, UserInfoCQ>() { + public void setup(String function, + SubQuery<BookmarkLinkCB> subQuery, + UserInfoCQ cq, String aliasName) { + cq.xderiveBookmarkLinkByUpdatedByList(function, + subQuery, aliasName); + } + }); + } + public RAFunction<GroupMappingCB, UserInfoCQ> derivedGroupMappingList() { return new RAFunction<GroupMappingCB, UserInfoCQ>(_baseCB, _myQyCall.qy(), Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsBookmarkCategoryCQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsBookmarkCategoryCQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsBookmarkCategoryCQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -10,8 +10,10 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; import jp.sf.pal.bookmark.db.cbean.BookmarkCategoryCB; import jp.sf.pal.bookmark.db.cbean.BookmarkLinkCB; +import jp.sf.pal.bookmark.db.cbean.UserInfoCB; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; +import jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ; /** * The abstract condition-query of BOOKMARK_CATEGORY. @@ -829,8 +831,8 @@ abstract protected ConditionValue getCValueCreatedTime(); /** - * Equal(=). And NullOrEmptyIgnored, OnceRegistered. {NotNull : - * VARCHAR(255)} + * Equal(=). And NullOrEmptyIgnored, OnceRegistered. {NotNull : VARCHAR(255) + * : FK to USER_INFO} * * @param createdBy The value of createdBy as equal. */ @@ -940,6 +942,36 @@ regCreatedBy(CK_NINS, cTL(createdByList)); } + /** + * @param userInfoCBquery Query. + * @deprecated Please use inScopeUserInfoByCreatedBy(subQuery) method. + */ + public void setCreatedBy_InScopeSubQuery_UserInfoByCreatedBy( + UserInfoCQ userInfoCBquery) { + String subQueryPropertyName = keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy(userInfoCBquery);// for + // saving + // query + // - + // value + // . + registerInScopeSubQuery(userInfoCBquery, "CREATED_BY", "USER_ID", + subQueryPropertyName); + } + + public void inScopeUserInfoByCreatedBy(SubQuery<UserInfoCB> subQuery) { + assertObjectNotNull("subQuery<UserInfoCB>", subQuery); + UserInfoCB cb = new UserInfoCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy(cb + .query());// for saving query-value. + registerInScopeSubQuery(cb.query(), "CREATED_BY", "USER_ID", + subQueryPropertyName); + } + + abstract public String keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy( + jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ subQuery); + protected void regCreatedBy(ConditionKey key, Object value) { registerQuery(key, value, getCValueCreatedBy(), "CREATED_BY", "CreatedBy", "createdBy"); @@ -1052,8 +1084,8 @@ abstract protected ConditionValue getCValueUpdatedTime(); /** - * Equal(=). And NullOrEmptyIgnored, OnceRegistered. {NotNull : - * VARCHAR(255)} + * Equal(=). And NullOrEmptyIgnored, OnceRegistered. {NotNull : VARCHAR(255) + * : FK to USER_INFO} * * @param updatedBy The value of updatedBy as equal. */ @@ -1163,6 +1195,36 @@ regUpdatedBy(CK_NINS, cTL(updatedByList)); } + /** + * @param userInfoCBquery Query. + * @deprecated Please use inScopeUserInfoByUpdatedBy(subQuery) method. + */ + public void setUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy( + UserInfoCQ userInfoCBquery) { + String subQueryPropertyName = keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy(userInfoCBquery);// for + // saving + // query + // - + // value + // . + registerInScopeSubQuery(userInfoCBquery, "UPDATED_BY", "USER_ID", + subQueryPropertyName); + } + + public void inScopeUserInfoByUpdatedBy(SubQuery<UserInfoCB> subQuery) { + assertObjectNotNull("subQuery<UserInfoCB>", subQuery); + UserInfoCB cb = new UserInfoCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy(cb + .query());// for saving query-value. + registerInScopeSubQuery(cb.query(), "UPDATED_BY", "USER_ID", + subQueryPropertyName); + } + + abstract public String keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy( + jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ subQuery); + protected void regUpdatedBy(ConditionKey key, Object value) { registerQuery(key, value, getCValueUpdatedBy(), "UPDATED_BY", "UpdatedBy", "updatedBy"); Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsBookmarkLinkCQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsBookmarkLinkCQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsBookmarkLinkCQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -10,8 +10,10 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; import jp.sf.pal.bookmark.db.cbean.BookmarkCategoryCB; import jp.sf.pal.bookmark.db.cbean.BookmarkLinkCB; +import jp.sf.pal.bookmark.db.cbean.UserInfoCB; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; +import jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ; /** * The abstract condition-query of BOOKMARK_LINK. @@ -963,8 +965,8 @@ abstract protected ConditionValue getCValueCreatedTime(); /** - * Equal(=). And NullOrEmptyIgnored, OnceRegistered. {NotNull : - * VARCHAR(255)} + * Equal(=). And NullOrEmptyIgnored, OnceRegistered. {NotNull : VARCHAR(255) + * : FK to USER_INFO} * * @param createdBy The value of createdBy as equal. */ @@ -1074,6 +1076,36 @@ regCreatedBy(CK_NINS, cTL(createdByList)); } + /** + * @param userInfoCBquery Query. + * @deprecated Please use inScopeUserInfoByCreatedBy(subQuery) method. + */ + public void setCreatedBy_InScopeSubQuery_UserInfoByCreatedBy( + UserInfoCQ userInfoCBquery) { + String subQueryPropertyName = keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy(userInfoCBquery);// for + // saving + // query + // - + // value + // . + registerInScopeSubQuery(userInfoCBquery, "CREATED_BY", "USER_ID", + subQueryPropertyName); + } + + public void inScopeUserInfoByCreatedBy(SubQuery<UserInfoCB> subQuery) { + assertObjectNotNull("subQuery<UserInfoCB>", subQuery); + UserInfoCB cb = new UserInfoCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy(cb + .query());// for saving query-value. + registerInScopeSubQuery(cb.query(), "CREATED_BY", "USER_ID", + subQueryPropertyName); + } + + abstract public String keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy( + jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ subQuery); + protected void regCreatedBy(ConditionKey key, Object value) { registerQuery(key, value, getCValueCreatedBy(), "CREATED_BY", "CreatedBy", "createdBy"); @@ -1186,8 +1218,8 @@ abstract protected ConditionValue getCValueUpdatedTime(); /** - * Equal(=). And NullOrEmptyIgnored, OnceRegistered. {NotNull : - * VARCHAR(255)} + * Equal(=). And NullOrEmptyIgnored, OnceRegistered. {NotNull : VARCHAR(255) + * : FK to USER_INFO} * * @param updatedBy The value of updatedBy as equal. */ @@ -1297,6 +1329,36 @@ regUpdatedBy(CK_NINS, cTL(updatedByList)); } + /** + * @param userInfoCBquery Query. + * @deprecated Please use inScopeUserInfoByUpdatedBy(subQuery) method. + */ + public void setUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy( + UserInfoCQ userInfoCBquery) { + String subQueryPropertyName = keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy(userInfoCBquery);// for + // saving + // query + // - + // value + // . + registerInScopeSubQuery(userInfoCBquery, "UPDATED_BY", "USER_ID", + subQueryPropertyName); + } + + public void inScopeUserInfoByUpdatedBy(SubQuery<UserInfoCB> subQuery) { + assertObjectNotNull("subQuery<UserInfoCB>", subQuery); + UserInfoCB cb = new UserInfoCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy(cb + .query());// for saving query-value. + registerInScopeSubQuery(cb.query(), "UPDATED_BY", "USER_ID", + subQueryPropertyName); + } + + abstract public String keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy( + jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ subQuery); + protected void regUpdatedBy(ConditionKey key, Object value) { registerQuery(key, value, getCValueUpdatedBy(), "UPDATED_BY", "UpdatedBy", "updatedBy"); Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsUserInfoCQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsUserInfoCQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/AbstractBsUserInfoCQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -8,11 +8,15 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.ckey.ConditionKey; import jp.sf.pal.bookmark.db.allcommon.cbean.cvalue.ConditionValue; import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.bookmark.db.cbean.BookmarkCategoryCB; +import jp.sf.pal.bookmark.db.cbean.BookmarkLinkCB; import jp.sf.pal.bookmark.db.cbean.GroupInfoCB; import jp.sf.pal.bookmark.db.cbean.GroupMappingCB; import jp.sf.pal.bookmark.db.cbean.RoleInfoCB; import jp.sf.pal.bookmark.db.cbean.RoleMappingCB; import jp.sf.pal.bookmark.db.cbean.UserInfoCB; +import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; +import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; import jp.sf.pal.bookmark.db.cbean.cq.GroupInfoCQ; import jp.sf.pal.bookmark.db.cbean.cq.GroupMappingCQ; import jp.sf.pal.bookmark.db.cbean.cq.RoleInfoCQ; @@ -166,6 +170,134 @@ } /** + * @param bookmarkCategoryCBquery Query. + * @deprecated Please use inScopeBookmarkCategoryByCreatedByList(subQuery) + * method. + */ + public void setUserId_InScopeSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ bookmarkCategoryCBquery) { + String subQueryPropertyName = keepUserId_InScopeSubQuery_BookmarkCategoryByCreatedByList(bookmarkCategoryCBquery);// for + // saving + // query + // - + // value + // . + registerInScopeSubQuery(bookmarkCategoryCBquery, "USER_ID", + "CREATED_BY", subQueryPropertyName); + } + + public void inScopeBookmarkCategoryByCreatedByList( + SubQuery<BookmarkCategoryCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_InScopeSubQuery_BookmarkCategoryByCreatedByList(cb + .query());// for saving query-value. + registerInScopeSubQuery(cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_InScopeSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery); + + /** + * @param bookmarkCategoryCBquery Query. + * @deprecated Please use inScopeBookmarkCategoryByUpdatedByList(subQuery) + * method. + */ + public void setUserId_InScopeSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ bookmarkCategoryCBquery) { + String subQueryPropertyName = keepUserId_InScopeSubQuery_BookmarkCategoryByUpdatedByList(bookmarkCategoryCBquery);// for + // saving + // query + // - + // value + // . + registerInScopeSubQuery(bookmarkCategoryCBquery, "USER_ID", + "UPDATED_BY", subQueryPropertyName); + } + + public void inScopeBookmarkCategoryByUpdatedByList( + SubQuery<BookmarkCategoryCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_InScopeSubQuery_BookmarkCategoryByUpdatedByList(cb + .query());// for saving query-value. + registerInScopeSubQuery(cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_InScopeSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery); + + /** + * @param bookmarkLinkCBquery Query. + * @deprecated Please use inScopeBookmarkLinkByCreatedByList(subQuery) + * method. + */ + public void setUserId_InScopeSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ bookmarkLinkCBquery) { + String subQueryPropertyName = keepUserId_InScopeSubQuery_BookmarkLinkByCreatedByList(bookmarkLinkCBquery);// for + // saving + // query + // - + // value + // . + registerInScopeSubQuery(bookmarkLinkCBquery, "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + public void inScopeBookmarkLinkByCreatedByList( + SubQuery<BookmarkLinkCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_InScopeSubQuery_BookmarkLinkByCreatedByList(cb + .query());// for saving query-value. + registerInScopeSubQuery(cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_InScopeSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery); + + /** + * @param bookmarkLinkCBquery Query. + * @deprecated Please use inScopeBookmarkLinkByUpdatedByList(subQuery) + * method. + */ + public void setUserId_InScopeSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ bookmarkLinkCBquery) { + String subQueryPropertyName = keepUserId_InScopeSubQuery_BookmarkLinkByUpdatedByList(bookmarkLinkCBquery);// for + // saving + // query + // - + // value + // . + registerInScopeSubQuery(bookmarkLinkCBquery, "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + public void inScopeBookmarkLinkByUpdatedByList( + SubQuery<BookmarkLinkCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_InScopeSubQuery_BookmarkLinkByUpdatedByList(cb + .query());// for saving query-value. + registerInScopeSubQuery(cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_InScopeSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery); + + /** * @param groupMappingCBquery Query. * @deprecated Please use inScopeGroupMappingList(subQuery) method. */ @@ -225,6 +357,66 @@ abstract public String keepUserId_InScopeSubQuery_RoleMappingList( RoleMappingCQ subQuery); + public void notInScopeBookmarkCategoryByCreatedByList( + SubQuery<BookmarkCategoryCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_NotInScopeSubQuery_BookmarkCategoryByCreatedByList(cb + .query());// for saving query-value. + registerNotInScopeSubQuery(cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_NotInScopeSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery); + + public void notInScopeBookmarkCategoryByUpdatedByList( + SubQuery<BookmarkCategoryCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByList(cb + .query());// for saving query-value. + registerNotInScopeSubQuery(cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery); + + public void notInScopeBookmarkLinkByCreatedByList( + SubQuery<BookmarkLinkCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_NotInScopeSubQuery_BookmarkLinkByCreatedByList(cb + .query());// for saving query-value. + registerNotInScopeSubQuery(cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_NotInScopeSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery); + + public void notInScopeBookmarkLinkByUpdatedByList( + SubQuery<BookmarkLinkCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForInScopeSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_NotInScopeSubQuery_BookmarkLinkByUpdatedByList(cb + .query());// for saving query-value. + registerNotInScopeSubQuery(cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_NotInScopeSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery); + public void notInScopeGroupMappingList(SubQuery<GroupMappingCB> subQuery) { assertObjectNotNull("subQuery<GroupMappingCB>", subQuery); GroupMappingCB cb = new GroupMappingCB(); @@ -254,6 +446,166 @@ RoleMappingCQ subQuery); /** + * @param bookmarkCategoryCBquery Query. + * @deprecated Please use existsBookmarkCategoryByCreatedByList(subQuery) + * method. + */ + public void setUserId_ExistsSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ bookmarkCategoryCBquery) { + String subQueryPropertyName = keepUserId_ExistsSubQuery_BookmarkCategoryByCreatedByList(bookmarkCategoryCBquery);// for + // saving + // query + // - + // value + // . + registerExistsSubQuery(bookmarkCategoryCBquery, "USER_ID", + "CREATED_BY", subQueryPropertyName); + } + + /** + * Set up 'exists' sub-query. {exists (select CREATED_BY from + * BOOKMARK_CATEGORY where ...)} + * + * @param subQuery The sub-query of + * UserId_ExistsSubQuery_BookmarkCategoryByCreatedByList for + * 'exists'. (NotNull) + */ + public void existsBookmarkCategoryByCreatedByList( + SubQuery<BookmarkCategoryCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForExistsSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_ExistsSubQuery_BookmarkCategoryByCreatedByList(cb + .query());// for saving query-value. + registerExistsSubQuery(cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_ExistsSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery); + + /** + * @param bookmarkCategoryCBquery Query. + * @deprecated Please use existsBookmarkCategoryByUpdatedByList(subQuery) + * method. + */ + public void setUserId_ExistsSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ bookmarkCategoryCBquery) { + String subQueryPropertyName = keepUserId_ExistsSubQuery_BookmarkCategoryByUpdatedByList(bookmarkCategoryCBquery);// for + // saving + // query + // - + // value + // . + registerExistsSubQuery(bookmarkCategoryCBquery, "USER_ID", + "UPDATED_BY", subQueryPropertyName); + } + + /** + * Set up 'exists' sub-query. {exists (select UPDATED_BY from + * BOOKMARK_CATEGORY where ...)} + * + * @param subQuery The sub-query of + * UserId_ExistsSubQuery_BookmarkCategoryByUpdatedByList for + * 'exists'. (NotNull) + */ + public void existsBookmarkCategoryByUpdatedByList( + SubQuery<BookmarkCategoryCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForExistsSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_ExistsSubQuery_BookmarkCategoryByUpdatedByList(cb + .query());// for saving query-value. + registerExistsSubQuery(cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_ExistsSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery); + + /** + * @param bookmarkLinkCBquery Query. + * @deprecated Please use existsBookmarkLinkByCreatedByList(subQuery) + * method. + */ + public void setUserId_ExistsSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ bookmarkLinkCBquery) { + String subQueryPropertyName = keepUserId_ExistsSubQuery_BookmarkLinkByCreatedByList(bookmarkLinkCBquery);// for + // saving + // query + // - + // value + // . + registerExistsSubQuery(bookmarkLinkCBquery, "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + /** + * Set up 'exists' sub-query. {exists (select CREATED_BY from BOOKMARK_LINK + * where ...)} + * + * @param subQuery The sub-query of + * UserId_ExistsSubQuery_BookmarkLinkByCreatedByList for + * 'exists'. (NotNull) + */ + public void existsBookmarkLinkByCreatedByList( + SubQuery<BookmarkLinkCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForExistsSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_ExistsSubQuery_BookmarkLinkByCreatedByList(cb + .query());// for saving query-value. + registerExistsSubQuery(cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_ExistsSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery); + + /** + * @param bookmarkLinkCBquery Query. + * @deprecated Please use existsBookmarkLinkByUpdatedByList(subQuery) + * method. + */ + public void setUserId_ExistsSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ bookmarkLinkCBquery) { + String subQueryPropertyName = keepUserId_ExistsSubQuery_BookmarkLinkByUpdatedByList(bookmarkLinkCBquery);// for + // saving + // query + // - + // value + // . + registerExistsSubQuery(bookmarkLinkCBquery, "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + /** + * Set up 'exists' sub-query. {exists (select UPDATED_BY from BOOKMARK_LINK + * where ...)} + * + * @param subQuery The sub-query of + * UserId_ExistsSubQuery_BookmarkLinkByUpdatedByList for + * 'exists'. (NotNull) + */ + public void existsBookmarkLinkByUpdatedByList( + SubQuery<BookmarkLinkCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForExistsSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_ExistsSubQuery_BookmarkLinkByUpdatedByList(cb + .query());// for saving query-value. + registerExistsSubQuery(cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_ExistsSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery); + + /** * @param groupMappingCBquery Query. * @deprecated Please use existsGroupMappingList(subQuery) method. */ @@ -328,6 +680,98 @@ RoleMappingCQ subQuery); /** + * Set up 'not exists' sub-query. {not exists (select CREATED_BY from + * BOOKMARK_CATEGORY where ...)} + * + * @param subQuery The sub-query of + * UserId_NotExistsSubQuery_BookmarkCategoryByCreatedByList for + * 'not exists'. (NotNull) + */ + public void notExistsBookmarkCategoryByCreatedByList( + SubQuery<BookmarkCategoryCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForExistsSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_NotExistsSubQuery_BookmarkCategoryByCreatedByList(cb + .query());// for saving query-value. + registerNotExistsSubQuery(cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_NotExistsSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery); + + /** + * Set up 'not exists' sub-query. {not exists (select UPDATED_BY from + * BOOKMARK_CATEGORY where ...)} + * + * @param subQuery The sub-query of + * UserId_NotExistsSubQuery_BookmarkCategoryByUpdatedByList for + * 'not exists'. (NotNull) + */ + public void notExistsBookmarkCategoryByUpdatedByList( + SubQuery<BookmarkCategoryCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForExistsSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_NotExistsSubQuery_BookmarkCategoryByUpdatedByList(cb + .query());// for saving query-value. + registerNotExistsSubQuery(cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_NotExistsSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery); + + /** + * Set up 'not exists' sub-query. {not exists (select CREATED_BY from + * BOOKMARK_LINK where ...)} + * + * @param subQuery The sub-query of + * UserId_NotExistsSubQuery_BookmarkLinkByCreatedByList for 'not + * exists'. (NotNull) + */ + public void notExistsBookmarkLinkByCreatedByList( + SubQuery<BookmarkLinkCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForExistsSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_NotExistsSubQuery_BookmarkLinkByCreatedByList(cb + .query());// for saving query-value. + registerNotExistsSubQuery(cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_NotExistsSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery); + + /** + * Set up 'not exists' sub-query. {not exists (select UPDATED_BY from + * BOOKMARK_LINK where ...)} + * + * @param subQuery The sub-query of + * UserId_NotExistsSubQuery_BookmarkLinkByUpdatedByList for 'not + * exists'. (NotNull) + */ + public void notExistsBookmarkLinkByUpdatedByList( + SubQuery<BookmarkLinkCB> subQuery) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForExistsSubQuery(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_NotExistsSubQuery_BookmarkLinkByUpdatedByList(cb + .query());// for saving query-value. + registerNotExistsSubQuery(cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName); + } + + abstract public String keepUserId_NotExistsSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery); + + /** * Set up 'not exists' sub-query. {not exists (select USER_ID from * GROUP_MAPPING where ...)} * @@ -370,6 +814,66 @@ abstract public String keepUserId_NotExistsSubQuery_RoleMappingList( RoleMappingCQ subQuery); + public void xderiveBookmarkCategoryByCreatedByList(String function, + SubQuery<BookmarkCategoryCB> subQuery, String aliasName) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForDeriveReferrer(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_DeriveSubQuery_BookmarkCategoryByCreatedByList(cb + .query());// for saving query-value. + registerDeriveSubQuery(function, cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName, aliasName); + } + + abstract public String keepUserId_DeriveSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery); + + public void xderiveBookmarkCategoryByUpdatedByList(String function, + SubQuery<BookmarkCategoryCB> subQuery, String aliasName) { + assertObjectNotNull("subQuery<BookmarkCategoryCB>", subQuery); + BookmarkCategoryCB cb = new BookmarkCategoryCB(); + cb.xsetupForDeriveReferrer(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_DeriveSubQuery_BookmarkCategoryByUpdatedByList(cb + .query());// for saving query-value. + registerDeriveSubQuery(function, cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName, aliasName); + } + + abstract public String keepUserId_DeriveSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery); + + public void xderiveBookmarkLinkByCreatedByList(String function, + SubQuery<BookmarkLinkCB> subQuery, String aliasName) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForDeriveReferrer(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_DeriveSubQuery_BookmarkLinkByCreatedByList(cb + .query());// for saving query-value. + registerDeriveSubQuery(function, cb.query(), "USER_ID", "CREATED_BY", + subQueryPropertyName, aliasName); + } + + abstract public String keepUserId_DeriveSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery); + + public void xderiveBookmarkLinkByUpdatedByList(String function, + SubQuery<BookmarkLinkCB> subQuery, String aliasName) { + assertObjectNotNull("subQuery<BookmarkLinkCB>", subQuery); + BookmarkLinkCB cb = new BookmarkLinkCB(); + cb.xsetupForDeriveReferrer(); + subQuery.query(cb); + String subQueryPropertyName = keepUserId_DeriveSubQuery_BookmarkLinkByUpdatedByList(cb + .query());// for saving query-value. + registerDeriveSubQuery(function, cb.query(), "USER_ID", "UPDATED_BY", + subQueryPropertyName, aliasName); + } + + abstract public String keepUserId_DeriveSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery); + public void xderiveGroupMappingList(String function, SubQuery<GroupMappingCB> subQuery, String aliasName) { assertObjectNotNull("subQuery<GroupMappingCB>", subQuery); Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsBookmarkCategoryCQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsBookmarkCategoryCQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsBookmarkCategoryCQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -7,6 +7,7 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; +import jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ; import jp.sf.pal.bookmark.db.cbean.cq.ciq.BookmarkCategoryCIQ; /** @@ -306,6 +307,23 @@ return getCreatedBy(); } + protected Map<String, UserInfoCQ> _createdBy_InScopeSubQuery_UserInfoByCreatedByMap; + + public Map<String, UserInfoCQ> getCreatedBy_InScopeSubQuery_UserInfoByCreatedBy() { + return _createdBy_InScopeSubQuery_UserInfoByCreatedByMap; + } + + public String keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy( + UserInfoCQ subQuery) { + if (_createdBy_InScopeSubQuery_UserInfoByCreatedByMap == null) { + _createdBy_InScopeSubQuery_UserInfoByCreatedByMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_createdBy_InScopeSubQuery_UserInfoByCreatedByMap.size() + 1); + _createdBy_InScopeSubQuery_UserInfoByCreatedByMap.put(key, subQuery); + return "createdBy_InScopeSubQuery_UserInfoByCreatedBy." + key; + } + public BsBookmarkCategoryCQ addOrderBy_CreatedBy_Asc() { regOBA("CREATED_BY"); return this; @@ -352,6 +370,23 @@ return getUpdatedBy(); } + protected Map<String, UserInfoCQ> _updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap; + + public Map<String, UserInfoCQ> getUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy() { + return _updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap; + } + + public String keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy( + UserInfoCQ subQuery) { + if (_updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap == null) { + _updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap.size() + 1); + _updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap.put(key, subQuery); + return "updatedBy_InScopeSubQuery_UserInfoByUpdatedBy." + key; + } + public BsBookmarkCategoryCQ addOrderBy_UpdatedBy_Asc() { regOBA("UPDATED_BY"); return this; @@ -451,6 +486,18 @@ // =========== protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) { + BookmarkCategoryCQ baseQuery = (BookmarkCategoryCQ) baseQueryAsSuper; + BookmarkCategoryCQ unionQuery = (BookmarkCategoryCQ) unionQueryAsSuper; + if (baseQuery.hasConditionQueryUserInfoByCreatedBy()) { + unionQuery.queryUserInfoByCreatedBy().reflectRelationOnUnionQuery( + baseQuery.queryUserInfoByCreatedBy(), + unionQuery.queryUserInfoByCreatedBy()); + } + if (baseQuery.hasConditionQueryUserInfoByUpdatedBy()) { + unionQuery.queryUserInfoByUpdatedBy().reflectRelationOnUnionQuery( + baseQuery.queryUserInfoByUpdatedBy(), + unionQuery.queryUserInfoByUpdatedBy()); + } } //========================================================================== @@ -458,6 +505,80 @@ // Foreign Query // ============= + public UserInfoCQ queryUserInfoByCreatedBy() { + return getConditionQueryUserInfoByCreatedBy(); + } + + protected UserInfoCQ _conditionQueryUserInfoByCreatedBy; + + public UserInfoCQ getConditionQueryUserInfoByCreatedBy() { + if (_conditionQueryUserInfoByCreatedBy == null) { + _conditionQueryUserInfoByCreatedBy = createQueryUserInfoByCreatedBy(); + setupOuterJoin_UserInfoByCreatedBy(); + } + return _conditionQueryUserInfoByCreatedBy; + } + + protected void setupOuterJoin_UserInfoByCreatedBy() { + Map<String, String> joinOnMap = newLinkedHashMap(); + joinOnMap.put(getRealColumnName("CREATED_BY"), + getConditionQueryUserInfoByCreatedBy().getRealColumnName( + "USER_ID")); + registerOuterJoin(getConditionQueryUserInfoByCreatedBy(), joinOnMap); + } + + protected UserInfoCQ createQueryUserInfoByCreatedBy() { + String nrp = resolveNextRelationPath("BOOKMARK_CATEGORY", + "userInfoByCreatedBy"); + String jan = resolveJoinAliasName(nrp, getNextNestLevel()); + UserInfoCQ cq = new UserInfoCQ(this, getSqlClause(), jan, + getNextNestLevel()); + cq.xsetForeignPropertyName("userInfoByCreatedBy"); + cq.xsetRelationPath(nrp); + return cq; + } + + public boolean hasConditionQueryUserInfoByCreatedBy() { + return _conditionQueryUserInfoByCreatedBy != null; + } + + public UserInfoCQ queryUserInfoByUpdatedBy() { + return getConditionQueryUserInfoByUpdatedBy(); + } + + protected UserInfoCQ _conditionQueryUserInfoByUpdatedBy; + + public UserInfoCQ getConditionQueryUserInfoByUpdatedBy() { + if (_conditionQueryUserInfoByUpdatedBy == null) { + _conditionQueryUserInfoByUpdatedBy = createQueryUserInfoByUpdatedBy(); + setupOuterJoin_UserInfoByUpdatedBy(); + } + return _conditionQueryUserInfoByUpdatedBy; + } + + protected void setupOuterJoin_UserInfoByUpdatedBy() { + Map<String, String> joinOnMap = newLinkedHashMap(); + joinOnMap.put(getRealColumnName("UPDATED_BY"), + getConditionQueryUserInfoByUpdatedBy().getRealColumnName( + "USER_ID")); + registerOuterJoin(getConditionQueryUserInfoByUpdatedBy(), joinOnMap); + } + + protected UserInfoCQ createQueryUserInfoByUpdatedBy() { + String nrp = resolveNextRelationPath("BOOKMARK_CATEGORY", + "userInfoByUpdatedBy"); + String jan = resolveJoinAliasName(nrp, getNextNestLevel()); + UserInfoCQ cq = new UserInfoCQ(this, getSqlClause(), jan, + getNextNestLevel()); + cq.xsetForeignPropertyName("userInfoByUpdatedBy"); + cq.xsetRelationPath(nrp); + return cq; + } + + public boolean hasConditionQueryUserInfoByUpdatedBy() { + return _conditionQueryUserInfoByUpdatedBy != null; + } + protected String getConditionQueryClassNameInternally() { return BookmarkCategoryCQ.class.getName(); } Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsBookmarkLinkCQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsBookmarkLinkCQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsBookmarkLinkCQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -7,6 +7,7 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; +import jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ; import jp.sf.pal.bookmark.db.cbean.cq.ciq.BookmarkLinkCIQ; /** @@ -286,6 +287,23 @@ return getCreatedBy(); } + protected Map<String, UserInfoCQ> _createdBy_InScopeSubQuery_UserInfoByCreatedByMap; + + public Map<String, UserInfoCQ> getCreatedBy_InScopeSubQuery_UserInfoByCreatedBy() { + return _createdBy_InScopeSubQuery_UserInfoByCreatedByMap; + } + + public String keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy( + UserInfoCQ subQuery) { + if (_createdBy_InScopeSubQuery_UserInfoByCreatedByMap == null) { + _createdBy_InScopeSubQuery_UserInfoByCreatedByMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_createdBy_InScopeSubQuery_UserInfoByCreatedByMap.size() + 1); + _createdBy_InScopeSubQuery_UserInfoByCreatedByMap.put(key, subQuery); + return "createdBy_InScopeSubQuery_UserInfoByCreatedBy." + key; + } + public BsBookmarkLinkCQ addOrderBy_CreatedBy_Asc() { regOBA("CREATED_BY"); return this; @@ -332,6 +350,23 @@ return getUpdatedBy(); } + protected Map<String, UserInfoCQ> _updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap; + + public Map<String, UserInfoCQ> getUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy() { + return _updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap; + } + + public String keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy( + UserInfoCQ subQuery) { + if (_updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap == null) { + _updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap.size() + 1); + _updatedBy_InScopeSubQuery_UserInfoByUpdatedByMap.put(key, subQuery); + return "updatedBy_InScopeSubQuery_UserInfoByUpdatedBy." + key; + } + public BsBookmarkLinkCQ addOrderBy_UpdatedBy_Asc() { regOBA("UPDATED_BY"); return this; @@ -438,6 +473,16 @@ baseQuery.queryBookmarkCategory(), unionQuery.queryBookmarkCategory()); } + if (baseQuery.hasConditionQueryUserInfoByCreatedBy()) { + unionQuery.queryUserInfoByCreatedBy().reflectRelationOnUnionQuery( + baseQuery.queryUserInfoByCreatedBy(), + unionQuery.queryUserInfoByCreatedBy()); + } + if (baseQuery.hasConditionQueryUserInfoByUpdatedBy()) { + unionQuery.queryUserInfoByUpdatedBy().reflectRelationOnUnionQuery( + baseQuery.queryUserInfoByUpdatedBy(), + unionQuery.queryUserInfoByUpdatedBy()); + } } //========================================================================== @@ -481,6 +526,80 @@ return _conditionQueryBookmarkCategory != null; } + public UserInfoCQ queryUserInfoByCreatedBy() { + return getConditionQueryUserInfoByCreatedBy(); + } + + protected UserInfoCQ _conditionQueryUserInfoByCreatedBy; + + public UserInfoCQ getConditionQueryUserInfoByCreatedBy() { + if (_conditionQueryUserInfoByCreatedBy == null) { + _conditionQueryUserInfoByCreatedBy = createQueryUserInfoByCreatedBy(); + setupOuterJoin_UserInfoByCreatedBy(); + } + return _conditionQueryUserInfoByCreatedBy; + } + + protected void setupOuterJoin_UserInfoByCreatedBy() { + Map<String, String> joinOnMap = newLinkedHashMap(); + joinOnMap.put(getRealColumnName("CREATED_BY"), + getConditionQueryUserInfoByCreatedBy().getRealColumnName( + "USER_ID")); + registerOuterJoin(getConditionQueryUserInfoByCreatedBy(), joinOnMap); + } + + protected UserInfoCQ createQueryUserInfoByCreatedBy() { + String nrp = resolveNextRelationPath("BOOKMARK_LINK", + "userInfoByCreatedBy"); + String jan = resolveJoinAliasName(nrp, getNextNestLevel()); + UserInfoCQ cq = new UserInfoCQ(this, getSqlClause(), jan, + getNextNestLevel()); + cq.xsetForeignPropertyName("userInfoByCreatedBy"); + cq.xsetRelationPath(nrp); + return cq; + } + + public boolean hasConditionQueryUserInfoByCreatedBy() { + return _conditionQueryUserInfoByCreatedBy != null; + } + + public UserInfoCQ queryUserInfoByUpdatedBy() { + return getConditionQueryUserInfoByUpdatedBy(); + } + + protected UserInfoCQ _conditionQueryUserInfoByUpdatedBy; + + public UserInfoCQ getConditionQueryUserInfoByUpdatedBy() { + if (_conditionQueryUserInfoByUpdatedBy == null) { + _conditionQueryUserInfoByUpdatedBy = createQueryUserInfoByUpdatedBy(); + setupOuterJoin_UserInfoByUpdatedBy(); + } + return _conditionQueryUserInfoByUpdatedBy; + } + + protected void setupOuterJoin_UserInfoByUpdatedBy() { + Map<String, String> joinOnMap = newLinkedHashMap(); + joinOnMap.put(getRealColumnName("UPDATED_BY"), + getConditionQueryUserInfoByUpdatedBy().getRealColumnName( + "USER_ID")); + registerOuterJoin(getConditionQueryUserInfoByUpdatedBy(), joinOnMap); + } + + protected UserInfoCQ createQueryUserInfoByUpdatedBy() { + String nrp = resolveNextRelationPath("BOOKMARK_LINK", + "userInfoByUpdatedBy"); + String jan = resolveJoinAliasName(nrp, getNextNestLevel()); + UserInfoCQ cq = new UserInfoCQ(this, getSqlClause(), jan, + getNextNestLevel()); + cq.xsetForeignPropertyName("userInfoByUpdatedBy"); + cq.xsetRelationPath(nrp); + return cq; + } + + public boolean hasConditionQueryUserInfoByUpdatedBy() { + return _conditionQueryUserInfoByUpdatedBy != null; + } + protected String getConditionQueryClassNameInternally() { return BookmarkLinkCQ.class.getName(); } Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsUserInfoCQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsUserInfoCQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/bs/BsUserInfoCQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -5,6 +5,8 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.ConditionQuery; import jp.sf.pal.bookmark.db.allcommon.cbean.cvalue.ConditionValue; import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; +import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; import jp.sf.pal.bookmark.db.cbean.cq.GroupInfoCQ; import jp.sf.pal.bookmark.db.cbean.cq.GroupMappingCQ; import jp.sf.pal.bookmark.db.cbean.cq.RoleInfoCQ; @@ -88,6 +90,82 @@ return getUserId(); } + protected Map<String, BookmarkCategoryCQ> _userId_InScopeSubQuery_BookmarkCategoryByCreatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_InScopeSubQuery_BookmarkCategoryByCreatedByList() { + return _userId_InScopeSubQuery_BookmarkCategoryByCreatedByListMap; + } + + public String keepUserId_InScopeSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_InScopeSubQuery_BookmarkCategoryByCreatedByListMap == null) { + _userId_InScopeSubQuery_BookmarkCategoryByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_InScopeSubQuery_BookmarkCategoryByCreatedByListMap + .size() + 1); + _userId_InScopeSubQuery_BookmarkCategoryByCreatedByListMap.put(key, + subQuery); + return "userId_InScopeSubQuery_BookmarkCategoryByCreatedByList." + key; + } + + protected Map<String, BookmarkCategoryCQ> _userId_InScopeSubQuery_BookmarkCategoryByUpdatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_InScopeSubQuery_BookmarkCategoryByUpdatedByList() { + return _userId_InScopeSubQuery_BookmarkCategoryByUpdatedByListMap; + } + + public String keepUserId_InScopeSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_InScopeSubQuery_BookmarkCategoryByUpdatedByListMap == null) { + _userId_InScopeSubQuery_BookmarkCategoryByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_InScopeSubQuery_BookmarkCategoryByUpdatedByListMap + .size() + 1); + _userId_InScopeSubQuery_BookmarkCategoryByUpdatedByListMap.put(key, + subQuery); + return "userId_InScopeSubQuery_BookmarkCategoryByUpdatedByList." + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_InScopeSubQuery_BookmarkLinkByCreatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_InScopeSubQuery_BookmarkLinkByCreatedByList() { + return _userId_InScopeSubQuery_BookmarkLinkByCreatedByListMap; + } + + public String keepUserId_InScopeSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_InScopeSubQuery_BookmarkLinkByCreatedByListMap == null) { + _userId_InScopeSubQuery_BookmarkLinkByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_InScopeSubQuery_BookmarkLinkByCreatedByListMap + .size() + 1); + _userId_InScopeSubQuery_BookmarkLinkByCreatedByListMap.put(key, + subQuery); + return "userId_InScopeSubQuery_BookmarkLinkByCreatedByList." + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_InScopeSubQuery_BookmarkLinkByUpdatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_InScopeSubQuery_BookmarkLinkByUpdatedByList() { + return _userId_InScopeSubQuery_BookmarkLinkByUpdatedByListMap; + } + + public String keepUserId_InScopeSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_InScopeSubQuery_BookmarkLinkByUpdatedByListMap == null) { + _userId_InScopeSubQuery_BookmarkLinkByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_InScopeSubQuery_BookmarkLinkByUpdatedByListMap + .size() + 1); + _userId_InScopeSubQuery_BookmarkLinkByUpdatedByListMap.put(key, + subQuery); + return "userId_InScopeSubQuery_BookmarkLinkByUpdatedByList." + key; + } + protected Map<String, GroupMappingCQ> _userId_InScopeSubQuery_GroupMappingListMap; public Map<String, GroupMappingCQ> getUserId_InScopeSubQuery_GroupMappingList() { @@ -122,6 +200,84 @@ return "userId_InScopeSubQuery_RoleMappingList." + key; } + protected Map<String, BookmarkCategoryCQ> _userId_NotInScopeSubQuery_BookmarkCategoryByCreatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_NotInScopeSubQuery_BookmarkCategoryByCreatedByList() { + return _userId_NotInScopeSubQuery_BookmarkCategoryByCreatedByListMap; + } + + public String keepUserId_NotInScopeSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_NotInScopeSubQuery_BookmarkCategoryByCreatedByListMap == null) { + _userId_NotInScopeSubQuery_BookmarkCategoryByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_NotInScopeSubQuery_BookmarkCategoryByCreatedByListMap + .size() + 1); + _userId_NotInScopeSubQuery_BookmarkCategoryByCreatedByListMap.put(key, + subQuery); + return "userId_NotInScopeSubQuery_BookmarkCategoryByCreatedByList." + + key; + } + + protected Map<String, BookmarkCategoryCQ> _userId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByList() { + return _userId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByListMap; + } + + public String keepUserId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByListMap == null) { + _userId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByListMap + .size() + 1); + _userId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByListMap.put(key, + subQuery); + return "userId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByList." + + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_NotInScopeSubQuery_BookmarkLinkByCreatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_NotInScopeSubQuery_BookmarkLinkByCreatedByList() { + return _userId_NotInScopeSubQuery_BookmarkLinkByCreatedByListMap; + } + + public String keepUserId_NotInScopeSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_NotInScopeSubQuery_BookmarkLinkByCreatedByListMap == null) { + _userId_NotInScopeSubQuery_BookmarkLinkByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_NotInScopeSubQuery_BookmarkLinkByCreatedByListMap + .size() + 1); + _userId_NotInScopeSubQuery_BookmarkLinkByCreatedByListMap.put(key, + subQuery); + return "userId_NotInScopeSubQuery_BookmarkLinkByCreatedByList." + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_NotInScopeSubQuery_BookmarkLinkByUpdatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_NotInScopeSubQuery_BookmarkLinkByUpdatedByList() { + return _userId_NotInScopeSubQuery_BookmarkLinkByUpdatedByListMap; + } + + public String keepUserId_NotInScopeSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_NotInScopeSubQuery_BookmarkLinkByUpdatedByListMap == null) { + _userId_NotInScopeSubQuery_BookmarkLinkByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_NotInScopeSubQuery_BookmarkLinkByUpdatedByListMap + .size() + 1); + _userId_NotInScopeSubQuery_BookmarkLinkByUpdatedByListMap.put(key, + subQuery); + return "userId_NotInScopeSubQuery_BookmarkLinkByUpdatedByList." + key; + } + protected Map<String, GroupMappingCQ> _userId_NotInScopeSubQuery_GroupMappingListMap; public Map<String, GroupMappingCQ> getUserId_NotInScopeSubQuery_GroupMappingList() { @@ -156,6 +312,80 @@ return "userId_NotInScopeSubQuery_RoleMappingList." + key; } + protected Map<String, BookmarkCategoryCQ> _userId_ExistsSubQuery_BookmarkCategoryByCreatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_ExistsSubQuery_BookmarkCategoryByCreatedByList() { + return _userId_ExistsSubQuery_BookmarkCategoryByCreatedByListMap; + } + + public String keepUserId_ExistsSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_ExistsSubQuery_BookmarkCategoryByCreatedByListMap == null) { + _userId_ExistsSubQuery_BookmarkCategoryByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_ExistsSubQuery_BookmarkCategoryByCreatedByListMap + .size() + 1); + _userId_ExistsSubQuery_BookmarkCategoryByCreatedByListMap.put(key, + subQuery); + return "userId_ExistsSubQuery_BookmarkCategoryByCreatedByList." + key; + } + + protected Map<String, BookmarkCategoryCQ> _userId_ExistsSubQuery_BookmarkCategoryByUpdatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_ExistsSubQuery_BookmarkCategoryByUpdatedByList() { + return _userId_ExistsSubQuery_BookmarkCategoryByUpdatedByListMap; + } + + public String keepUserId_ExistsSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_ExistsSubQuery_BookmarkCategoryByUpdatedByListMap == null) { + _userId_ExistsSubQuery_BookmarkCategoryByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_ExistsSubQuery_BookmarkCategoryByUpdatedByListMap + .size() + 1); + _userId_ExistsSubQuery_BookmarkCategoryByUpdatedByListMap.put(key, + subQuery); + return "userId_ExistsSubQuery_BookmarkCategoryByUpdatedByList." + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_ExistsSubQuery_BookmarkLinkByCreatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_ExistsSubQuery_BookmarkLinkByCreatedByList() { + return _userId_ExistsSubQuery_BookmarkLinkByCreatedByListMap; + } + + public String keepUserId_ExistsSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_ExistsSubQuery_BookmarkLinkByCreatedByListMap == null) { + _userId_ExistsSubQuery_BookmarkLinkByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_ExistsSubQuery_BookmarkLinkByCreatedByListMap.size() + 1); + _userId_ExistsSubQuery_BookmarkLinkByCreatedByListMap + .put(key, subQuery); + return "userId_ExistsSubQuery_BookmarkLinkByCreatedByList." + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_ExistsSubQuery_BookmarkLinkByUpdatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_ExistsSubQuery_BookmarkLinkByUpdatedByList() { + return _userId_ExistsSubQuery_BookmarkLinkByUpdatedByListMap; + } + + public String keepUserId_ExistsSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_ExistsSubQuery_BookmarkLinkByUpdatedByListMap == null) { + _userId_ExistsSubQuery_BookmarkLinkByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_ExistsSubQuery_BookmarkLinkByUpdatedByListMap.size() + 1); + _userId_ExistsSubQuery_BookmarkLinkByUpdatedByListMap + .put(key, subQuery); + return "userId_ExistsSubQuery_BookmarkLinkByUpdatedByList." + key; + } + protected Map<String, GroupMappingCQ> _userId_ExistsSubQuery_GroupMappingListMap; public Map<String, GroupMappingCQ> getUserId_ExistsSubQuery_GroupMappingList() { @@ -190,6 +420,84 @@ return "userId_ExistsSubQuery_RoleMappingList." + key; } + protected Map<String, BookmarkCategoryCQ> _userId_NotExistsSubQuery_BookmarkCategoryByCreatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_NotExistsSubQuery_BookmarkCategoryByCreatedByList() { + return _userId_NotExistsSubQuery_BookmarkCategoryByCreatedByListMap; + } + + public String keepUserId_NotExistsSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_NotExistsSubQuery_BookmarkCategoryByCreatedByListMap == null) { + _userId_NotExistsSubQuery_BookmarkCategoryByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_NotExistsSubQuery_BookmarkCategoryByCreatedByListMap + .size() + 1); + _userId_NotExistsSubQuery_BookmarkCategoryByCreatedByListMap.put(key, + subQuery); + return "userId_NotExistsSubQuery_BookmarkCategoryByCreatedByList." + + key; + } + + protected Map<String, BookmarkCategoryCQ> _userId_NotExistsSubQuery_BookmarkCategoryByUpdatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_NotExistsSubQuery_BookmarkCategoryByUpdatedByList() { + return _userId_NotExistsSubQuery_BookmarkCategoryByUpdatedByListMap; + } + + public String keepUserId_NotExistsSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_NotExistsSubQuery_BookmarkCategoryByUpdatedByListMap == null) { + _userId_NotExistsSubQuery_BookmarkCategoryByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_NotExistsSubQuery_BookmarkCategoryByUpdatedByListMap + .size() + 1); + _userId_NotExistsSubQuery_BookmarkCategoryByUpdatedByListMap.put(key, + subQuery); + return "userId_NotExistsSubQuery_BookmarkCategoryByUpdatedByList." + + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_NotExistsSubQuery_BookmarkLinkByCreatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_NotExistsSubQuery_BookmarkLinkByCreatedByList() { + return _userId_NotExistsSubQuery_BookmarkLinkByCreatedByListMap; + } + + public String keepUserId_NotExistsSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_NotExistsSubQuery_BookmarkLinkByCreatedByListMap == null) { + _userId_NotExistsSubQuery_BookmarkLinkByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_NotExistsSubQuery_BookmarkLinkByCreatedByListMap + .size() + 1); + _userId_NotExistsSubQuery_BookmarkLinkByCreatedByListMap.put(key, + subQuery); + return "userId_NotExistsSubQuery_BookmarkLinkByCreatedByList." + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_NotExistsSubQuery_BookmarkLinkByUpdatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_NotExistsSubQuery_BookmarkLinkByUpdatedByList() { + return _userId_NotExistsSubQuery_BookmarkLinkByUpdatedByListMap; + } + + public String keepUserId_NotExistsSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_NotExistsSubQuery_BookmarkLinkByUpdatedByListMap == null) { + _userId_NotExistsSubQuery_BookmarkLinkByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_NotExistsSubQuery_BookmarkLinkByUpdatedByListMap + .size() + 1); + _userId_NotExistsSubQuery_BookmarkLinkByUpdatedByListMap.put(key, + subQuery); + return "userId_NotExistsSubQuery_BookmarkLinkByUpdatedByList." + key; + } + protected Map<String, GroupMappingCQ> _userId_NotExistsSubQuery_GroupMappingListMap; public Map<String, GroupMappingCQ> getUserId_NotExistsSubQuery_GroupMappingList() { @@ -224,6 +532,80 @@ return "userId_NotExistsSubQuery_RoleMappingList." + key; } + protected Map<String, BookmarkCategoryCQ> _userId_DeriveSubQuery_BookmarkCategoryByCreatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_DeriveSubQuery_BookmarkCategoryByCreatedByList() { + return _userId_DeriveSubQuery_BookmarkCategoryByCreatedByListMap; + } + + public String keepUserId_DeriveSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_DeriveSubQuery_BookmarkCategoryByCreatedByListMap == null) { + _userId_DeriveSubQuery_BookmarkCategoryByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_DeriveSubQuery_BookmarkCategoryByCreatedByListMap + .size() + 1); + _userId_DeriveSubQuery_BookmarkCategoryByCreatedByListMap.put(key, + subQuery); + return "userId_DeriveSubQuery_BookmarkCategoryByCreatedByList." + key; + } + + protected Map<String, BookmarkCategoryCQ> _userId_DeriveSubQuery_BookmarkCategoryByUpdatedByListMap; + + public Map<String, BookmarkCategoryCQ> getUserId_DeriveSubQuery_BookmarkCategoryByUpdatedByList() { + return _userId_DeriveSubQuery_BookmarkCategoryByUpdatedByListMap; + } + + public String keepUserId_DeriveSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + if (_userId_DeriveSubQuery_BookmarkCategoryByUpdatedByListMap == null) { + _userId_DeriveSubQuery_BookmarkCategoryByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_DeriveSubQuery_BookmarkCategoryByUpdatedByListMap + .size() + 1); + _userId_DeriveSubQuery_BookmarkCategoryByUpdatedByListMap.put(key, + subQuery); + return "userId_DeriveSubQuery_BookmarkCategoryByUpdatedByList." + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_DeriveSubQuery_BookmarkLinkByCreatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_DeriveSubQuery_BookmarkLinkByCreatedByList() { + return _userId_DeriveSubQuery_BookmarkLinkByCreatedByListMap; + } + + public String keepUserId_DeriveSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_DeriveSubQuery_BookmarkLinkByCreatedByListMap == null) { + _userId_DeriveSubQuery_BookmarkLinkByCreatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_DeriveSubQuery_BookmarkLinkByCreatedByListMap.size() + 1); + _userId_DeriveSubQuery_BookmarkLinkByCreatedByListMap + .put(key, subQuery); + return "userId_DeriveSubQuery_BookmarkLinkByCreatedByList." + key; + } + + protected Map<String, BookmarkLinkCQ> _userId_DeriveSubQuery_BookmarkLinkByUpdatedByListMap; + + public Map<String, BookmarkLinkCQ> getUserId_DeriveSubQuery_BookmarkLinkByUpdatedByList() { + return _userId_DeriveSubQuery_BookmarkLinkByUpdatedByListMap; + } + + public String keepUserId_DeriveSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + if (_userId_DeriveSubQuery_BookmarkLinkByUpdatedByListMap == null) { + _userId_DeriveSubQuery_BookmarkLinkByUpdatedByListMap = newLinkedHashMap(); + } + String key = "subQueryMapKey" + + (_userId_DeriveSubQuery_BookmarkLinkByUpdatedByListMap.size() + 1); + _userId_DeriveSubQuery_BookmarkLinkByUpdatedByListMap + .put(key, subQuery); + return "userId_DeriveSubQuery_BookmarkLinkByUpdatedByList." + key; + } + protected Map<String, GroupMappingCQ> _userId_DeriveSubQuery_GroupMappingListMap; public Map<String, GroupMappingCQ> getUserId_DeriveSubQuery_GroupMappingList() { Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/BookmarkCategoryCIQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/BookmarkCategoryCIQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/BookmarkCategoryCIQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -7,6 +7,7 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; +import jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ; import jp.sf.pal.bookmark.db.cbean.cq.bs.AbstractBsBookmarkCategoryCQ; import jp.sf.pal.bookmark.db.cbean.cq.bs.BsBookmarkCategoryCQ; @@ -145,6 +146,12 @@ return _myCQ.getCreatedBy(); } + public String keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy( + UserInfoCQ subQuery) { + return _myCQ + .keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy(subQuery); + } + protected ConditionValue getCValueUpdatedTime() { return _myCQ.getUpdatedTime(); } @@ -153,6 +160,12 @@ return _myCQ.getUpdatedBy(); } + public String keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy( + UserInfoCQ subQuery) { + return _myCQ + .keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy(subQuery); + } + protected ConditionValue getCValueDeletedTime() { return _myCQ.getDeletedTime(); } Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/BookmarkLinkCIQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/BookmarkLinkCIQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/BookmarkLinkCIQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -7,6 +7,7 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; +import jp.sf.pal.bookmark.db.cbean.cq.UserInfoCQ; import jp.sf.pal.bookmark.db.cbean.cq.bs.AbstractBsBookmarkLinkCQ; import jp.sf.pal.bookmark.db.cbean.cq.bs.BsBookmarkLinkCQ; @@ -132,6 +133,12 @@ return _myCQ.getCreatedBy(); } + public String keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy( + UserInfoCQ subQuery) { + return _myCQ + .keepCreatedBy_InScopeSubQuery_UserInfoByCreatedBy(subQuery); + } + protected ConditionValue getCValueUpdatedTime() { return _myCQ.getUpdatedTime(); } @@ -140,6 +147,12 @@ return _myCQ.getUpdatedBy(); } + public String keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy( + UserInfoCQ subQuery) { + return _myCQ + .keepUpdatedBy_InScopeSubQuery_UserInfoByUpdatedBy(subQuery); + } + protected ConditionValue getCValueDeletedTime() { return _myCQ.getDeletedTime(); } Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/UserInfoCIQ.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/UserInfoCIQ.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/cq/ciq/UserInfoCIQ.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -5,6 +5,8 @@ import jp.sf.pal.bookmark.db.allcommon.cbean.coption.ConditionOption; import jp.sf.pal.bookmark.db.allcommon.cbean.cvalue.ConditionValue; import jp.sf.pal.bookmark.db.allcommon.cbean.sqlclause.SqlClause; +import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; +import jp.sf.pal.bookmark.db.cbean.cq.BookmarkLinkCQ; import jp.sf.pal.bookmark.db.cbean.cq.GroupInfoCQ; import jp.sf.pal.bookmark.db.cbean.cq.GroupMappingCQ; import jp.sf.pal.bookmark.db.cbean.cq.RoleInfoCQ; @@ -98,6 +100,30 @@ return _myCQ.getUserId(); } + public String keepUserId_InScopeSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + return _myCQ + .keepUserId_InScopeSubQuery_BookmarkCategoryByCreatedByList(subQuery); + } + + public String keepUserId_InScopeSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + return _myCQ + .keepUserId_InScopeSubQuery_BookmarkCategoryByUpdatedByList(subQuery); + } + + public String keepUserId_InScopeSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + return _myCQ + .keepUserId_InScopeSubQuery_BookmarkLinkByCreatedByList(subQuery); + } + + public String keepUserId_InScopeSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + return _myCQ + .keepUserId_InScopeSubQuery_BookmarkLinkByUpdatedByList(subQuery); + } + public String keepUserId_InScopeSubQuery_GroupMappingList( GroupMappingCQ subQuery) { return _myCQ.keepUserId_InScopeSubQuery_GroupMappingList(subQuery); @@ -108,6 +134,30 @@ return _myCQ.keepUserId_InScopeSubQuery_RoleMappingList(subQuery); } + public String keepUserId_NotInScopeSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + return _myCQ + .keepUserId_NotInScopeSubQuery_BookmarkCategoryByCreatedByList(subQuery); + } + + public String keepUserId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + return _myCQ + .keepUserId_NotInScopeSubQuery_BookmarkCategoryByUpdatedByList(subQuery); + } + + public String keepUserId_NotInScopeSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + return _myCQ + .keepUserId_NotInScopeSubQuery_BookmarkLinkByCreatedByList(subQuery); + } + + public String keepUserId_NotInScopeSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + return _myCQ + .keepUserId_NotInScopeSubQuery_BookmarkLinkByUpdatedByList(subQuery); + } + public String keepUserId_NotInScopeSubQuery_GroupMappingList( GroupMappingCQ subQuery) { return _myCQ.keepUserId_NotInScopeSubQuery_GroupMappingList(subQuery); @@ -118,6 +168,30 @@ return _myCQ.keepUserId_NotInScopeSubQuery_RoleMappingList(subQuery); } + public String keepUserId_ExistsSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + throw new UnsupportedOperationException( + "ExistsSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_ExistsSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + throw new UnsupportedOperationException( + "ExistsSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_ExistsSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + throw new UnsupportedOperationException( + "ExistsSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_ExistsSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + throw new UnsupportedOperationException( + "ExistsSubQuery at inline() is unsupported! Sorry!"); + } + public String keepUserId_ExistsSubQuery_GroupMappingList( GroupMappingCQ subQuery) { throw new UnsupportedOperationException( @@ -130,6 +204,30 @@ "ExistsSubQuery at inline() is unsupported! Sorry!"); } + public String keepUserId_NotExistsSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + throw new UnsupportedOperationException( + "NotExistsSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_NotExistsSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + throw new UnsupportedOperationException( + "NotExistsSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_NotExistsSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + throw new UnsupportedOperationException( + "NotExistsSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_NotExistsSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + throw new UnsupportedOperationException( + "NotExistsSubQuery at inline() is unsupported! Sorry!"); + } + public String keepUserId_NotExistsSubQuery_GroupMappingList( GroupMappingCQ subQuery) { throw new UnsupportedOperationException( @@ -142,6 +240,30 @@ "NotExistsSubQuery at inline() is unsupported! Sorry!"); } + public String keepUserId_DeriveSubQuery_BookmarkCategoryByCreatedByList( + BookmarkCategoryCQ subQuery) { + throw new UnsupportedOperationException( + "DeriveSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_DeriveSubQuery_BookmarkCategoryByUpdatedByList( + BookmarkCategoryCQ subQuery) { + throw new UnsupportedOperationException( + "DeriveSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_DeriveSubQuery_BookmarkLinkByCreatedByList( + BookmarkLinkCQ subQuery) { + throw new UnsupportedOperationException( + "DeriveSubQuery at inline() is unsupported! Sorry!"); + } + + public String keepUserId_DeriveSubQuery_BookmarkLinkByUpdatedByList( + BookmarkLinkCQ subQuery) { + throw new UnsupportedOperationException( + "DeriveSubQuery at inline() is unsupported! Sorry!"); + } + public String keepUserId_DeriveSubQuery_GroupMappingList( GroupMappingCQ subQuery) { throw new UnsupportedOperationException( Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/nss/BookmarkCategoryNss.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/nss/BookmarkCategoryNss.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/nss/BookmarkCategoryNss.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -1,5 +1,6 @@ package jp.sf.pal.bookmark.db.cbean.nss; +import jp.sf.pal.bookmark.db.allcommon.cbean.ConditionQuery; import jp.sf.pal.bookmark.db.cbean.cq.BookmarkCategoryCQ; /** @@ -24,7 +25,24 @@ // ========= // With Nested Foreign Table // ========================= + public UserInfoNss withUserInfoByCreatedBy() { + _query.doNss(new BookmarkCategoryCQ.NssCall() { + public ConditionQuery qf() { + return _query.queryUserInfoByCreatedBy(); + } + }); + return new UserInfoNss(_query.queryUserInfoByCreatedBy()); + } + public UserInfoNss withUserInfoByUpdatedBy() { + _query.doNss(new BookmarkCategoryCQ.NssCall() { + public ConditionQuery qf() { + return _query.queryUserInfoByUpdatedBy(); + } + }); + return new UserInfoNss(_query.queryUserInfoByUpdatedBy()); + } + //========================================================================== // ========= // With Nested Referrer Table Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/nss/BookmarkLinkNss.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/nss/BookmarkLinkNss.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/db/cbean/nss/BookmarkLinkNss.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -34,6 +34,24 @@ return new BookmarkCategoryNss(_query.queryBookmarkCategory()); } + public UserInfoNss withUserInfoByCreatedBy() { + _query.doNss(new BookmarkLinkCQ.NssCall() { + public ConditionQuery qf() { + return _query.queryUserInfoByCreatedBy(); + } + }); + return new UserInfoNss(_query.queryUserInfoByCreatedBy()); + } + + public UserInfoNss withUserInfoByUpdatedBy() { + _query.doNss(new BookmarkLinkCQ.NssCall() { + public ConditionQuery qf() { + return _query.queryUserInfoByUpdatedBy(); + } + }); + return new UserInfoNss(_query.queryUserInfoByUpdatedBy()); + } + //========================================================================== // ========= // With Nested Referrer Table Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/dxo/CategoryDxo.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/dxo/CategoryDxo.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/dxo/CategoryDxo.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -3,8 +3,7 @@ import java.io.Serializable; import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; -import jp.sf.pal.bookmark.form.admin.CategoryForm; -import jp.sf.pal.bookmark.form.category.EditForm; +import jp.sf.pal.bookmark.form.user.CategoryForm; import org.seasar.extension.dxo.annotation.ConversionRule; import org.seasar.extension.dxo.annotation.DatePattern; @@ -30,7 +29,7 @@ // + ", versionno : versionno" // ) public void convertFromCategoryToForm(BookmarkCategory category, - EditForm form); + CategoryForm form); @ExcludeNull @ConversionRule(// @@ -46,7 +45,7 @@ // + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromFormToCategory(EditForm form, + public void convertFromFormToCategory(CategoryForm form, BookmarkCategory category); @ExcludeNull @@ -66,7 +65,7 @@ // + ", versionno : versionno" // ) public void convertFromCategoryToForm(BookmarkCategory category, - CategoryForm form); + jp.sf.pal.bookmark.form.admin.CategoryForm form); @ExcludeNull @ConversionRule(// @@ -82,6 +81,7 @@ // + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromFormToCategory(CategoryForm form, + public void convertFromFormToCategory( + jp.sf.pal.bookmark.form.admin.CategoryForm form, BookmarkCategory category); } Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/dxo/LinkDxo.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/dxo/LinkDxo.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/dxo/LinkDxo.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -3,8 +3,7 @@ import java.io.Serializable; import jp.sf.pal.bookmark.db.exentity.BookmarkLink; -import jp.sf.pal.bookmark.form.admin.LinkForm; -import jp.sf.pal.bookmark.form.link.ViewForm; +import jp.sf.pal.bookmark.form.user.LinkForm; import org.seasar.extension.dxo.annotation.ConversionRule; import org.seasar.extension.dxo.annotation.DatePattern; @@ -31,7 +30,7 @@ + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromLinkToForm(BookmarkLink link, ViewForm form); + public void convertFromLinkToForm(BookmarkLink link, LinkForm form); @ExcludeNull @TimestampPattern("yyyy/MM/dd HH:mm:ss") @@ -50,7 +49,7 @@ // + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromFormToLink(ViewForm form, BookmarkLink link); + public void convertFromFormToLink(LinkForm form, BookmarkLink link); @ExcludeNull @DatePattern("yyyy/MM/dd") @@ -70,7 +69,8 @@ + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromLinkToForm(BookmarkLink link, LinkForm form); + public void convertFromLinkToForm(BookmarkLink link, + jp.sf.pal.bookmark.form.admin.LinkForm form); @ExcludeNull @TimestampPattern("yyyy/MM/dd HH:mm:ss") @@ -89,5 +89,6 @@ // + ", deletedBy : deletedBy" // // + ", versionno : versionno" // ) - public void convertFromFormToLink(LinkForm form, BookmarkLink link); + public void convertFromFormToLink( + jp.sf.pal.bookmark.form.admin.LinkForm form, BookmarkLink link); } Added: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/CategoryForm.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/CategoryForm.java (rev 0) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/CategoryForm.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,73 @@ +package jp.sf.pal.bookmark.form.user; + +import java.io.Serializable; + +import jp.sf.pal.bookmark.BookmarkConstants; +import jp.sf.pal.bookmark.common.form.PagingResultForm; + +import org.seasar.struts.annotation.DateType; +import org.seasar.struts.annotation.IntegerType; +import org.seasar.struts.annotation.LongType; +import org.seasar.struts.annotation.Maxbytelength; +import org.seasar.struts.annotation.Required; + +public class CategoryForm implements Serializable, PagingResultForm { + + private static final long serialVersionUID = 1L; + + @LongType + public String id; + + @IntegerType + public int mode; + + @IntegerType + public String pageNumber; + + @Required(target = "confirm,create,update,delete") + @Maxbytelength(maxbytelength = 100) + public String name; + + @Maxbytelength(maxbytelength = 200) + public String memo; + + @Maxbytelength(maxbytelength = 1) + public String type; + + @IntegerType + public String sortOrder; + + @DateType + public String createdTime; + + @Maxbytelength(maxbytelength = 255) + public String createdBy; + + @DateType + public String updatedTime; + + @Maxbytelength(maxbytelength = 255) + public String updatedBy; + + @DateType + public String deletedTime; + + @Maxbytelength(maxbytelength = 255) + public String deletedBy; + + public void initialize() { + mode = BookmarkConstants.LIST_MODE; + id = null; + name = null; + memo = null; + type = null; + sortOrder = null; + createdTime = null; + createdBy = null; + updatedTime = null; + updatedBy = null; + deletedTime = null; + deletedBy = null; + + } +} Property changes on: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/CategoryForm.java ___________________________________________________________________ Name: svn:eol-style + native Added: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/LinkForm.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/LinkForm.java (rev 0) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/LinkForm.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,79 @@ +package jp.sf.pal.bookmark.form.user; + +import java.io.Serializable; + +import jp.sf.pal.bookmark.BookmarkConstants; +import jp.sf.pal.bookmark.common.form.PagingResultForm; + +import org.seasar.struts.annotation.DateType; +import org.seasar.struts.annotation.IntegerType; +import org.seasar.struts.annotation.Maxbytelength; +import org.seasar.struts.annotation.Required; + +public class LinkForm implements Serializable, PagingResultForm { + + private static final long serialVersionUID = 1L; + + @IntegerType + public String id; + + @IntegerType + public int mode; + + @Required(target = "confirm,create,update,delete") + @Maxbytelength(maxbytelength = 100) + public String name; + + @Maxbytelength(maxbytelength = 200) + public String memo; + + public String url; + + public String type; + + public String sortOrder; + + @Required(target = "confirm,create,update,delete") + @IntegerType + public String categoryId; + + @DateType + public String createdTime; + + @Maxbytelength(maxbytelength = 255) + public String createdBy; + + @DateType + public String updatedTime; + + @Maxbytelength(maxbytelength = 255) + public String updatedBy; + + @DateType + public String deletedTime; + + @Maxbytelength(maxbytelength = 255) + public String deletedBy; + + @IntegerType + public String pageNumber; + + public void initialize() { + mode = BookmarkConstants.LIST_MODE; + id = null; + name = null; + memo = null; + url = null; + type = null; + sortOrder = null; + categoryId = null; + createdTime = null; + createdBy = null; + updatedTime = null; + updatedBy = null; + deletedTime = null; + deletedBy = null; + + } + +} Property changes on: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/form/user/LinkForm.java ___________________________________________________________________ Name: svn:eol-style + native Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/service/CategoryService.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/service/CategoryService.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/service/CategoryService.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -11,8 +11,11 @@ import jp.sf.pal.bookmark.common.util.PagingResultBeanWrapper; import jp.sf.pal.bookmark.db.allcommon.cbean.PagingResultBean; import jp.sf.pal.bookmark.db.cbean.BookmarkCategoryCB; +import jp.sf.pal.bookmark.db.cbean.UserInfoCB; import jp.sf.pal.bookmark.db.exbhv.BookmarkCategoryBhv; +import jp.sf.pal.bookmark.db.exbhv.UserInfoBhv; import jp.sf.pal.bookmark.db.exentity.BookmarkCategory; +import jp.sf.pal.bookmark.db.exentity.UserInfo; import jp.sf.pal.bookmark.pager.CategoryPager; import org.seasar.framework.container.hotdeploy.HotdeployUtil; @@ -26,6 +29,25 @@ private PagerDxo pagerDxo; + private transient UserInfoBhv userInfoBhv; + + private void initUserInfo(String userId) { + UserInfoCB cb = new UserInfoCB(); + cb.query().setUserId_Equal(userId); + cb.query().setDeletedBy_IsNull(); + UserInfo userInfo = userInfoBhv.selectEntity(cb); + if (userInfo == null) { + Timestamp now = new Timestamp(new Date().getTime()); + userInfo = new UserInfo(); + userInfo.setUserId(userId); + userInfo.setCreatedBy(userId); + userInfo.setCreatedTime(now); + userInfo.setUpdatedBy(userId); + userInfo.setUpdatedTime(now); + userInfoBhv.insert(userInfo); + } + } + public List<BookmarkCategory> getCategoryList(CategoryPager categoryPager) { HotdeployUtil.rebuildValue(categoryPager); @@ -72,6 +94,9 @@ Timestamp now = new Timestamp(System.currentTimeMillis()); category.setUpdatedTime(now); + initUserInfo(category.getCreatedBy()); + initUserInfo(category.getUpdatedBy()); + // Category if (isUpdate) { bookmarkCategoryBhv.update(category); @@ -196,4 +221,12 @@ public void setPagerDxo(PagerDxo pagerDxo) { this.pagerDxo = pagerDxo; } + + public UserInfoBhv getUserInfoBhv() { + return userInfoBhv; + } + + public void setUserInfoBhv(UserInfoBhv userInfoBhv) { + this.userInfoBhv = userInfoBhv; + } } Modified: bookmark/trunk/src/main/java/jp/sf/pal/bookmark/service/LinkService.java =================================================================== --- bookmark/trunk/src/main/java/jp/sf/pal/bookmark/service/LinkService.java 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/java/jp/sf/pal/bookmark/service/LinkService.java 2008-11-11 13:35:52 UTC (rev 1332) @@ -10,8 +10,11 @@ import jp.sf.pal.bookmark.common.util.PagingResultBeanWrapper; import jp.sf.pal.bookmark.db.allcommon.cbean.PagingResultBean; import jp.sf.pal.bookmark.db.cbean.BookmarkLinkCB; +import jp.sf.pal.bookmark.db.cbean.UserInfoCB; import jp.sf.pal.bookmark.db.exbhv.BookmarkLinkBhv; +import jp.sf.pal.bookmark.db.exbhv.UserInfoBhv; import jp.sf.pal.bookmark.db.exentity.BookmarkLink; +import jp.sf.pal.bookmark.db.exentity.UserInfo; import jp.sf.pal.bookmark.pager.LinkPager; import org.seasar.framework.container.hotdeploy.HotdeployUtil; @@ -25,6 +28,25 @@ private PagerDxo pagerDxo; + private transient UserInfoBhv userInfoBhv; + + private void initUserInfo(String userId) { + UserInfoCB cb = new UserInfoCB(); + cb.query().setUserId_Equal(userId); + cb.query().setDeletedBy_IsNull(); + UserInfo userInfo = userInfoBhv.selectEntity(cb); + if (userInfo == null) { + Timestamp now = new Timestamp(new Date().getTime()); + userInfo = new UserInfo(); + userInfo.setUserId(userId); + userInfo.setCreatedBy(userId); + userInfo.setCreatedTime(now); + userInfo.setUpdatedBy(userId); + userInfo.setUpdatedTime(now); + userInfoBhv.insert(userInfo); + } + } + public List<BookmarkLink> getLinkList(LinkPager linkPager) { HotdeployUtil.rebuildValue(linkPager); @@ -79,6 +101,9 @@ Timestamp now = new Timestamp(System.currentTimeMillis()); link.setUpdatedTime(now); + initUserInfo(link.getCreatedBy()); + initUserInfo(link.getUpdatedBy()); + // Link if (isUpdate) { bookmarkLinkBhv.update(link); @@ -176,4 +201,12 @@ this.pagerDxo = pagerDxo; } + public UserInfoBhv getUserInfoBhv() { + return userInfoBhv; + } + + public void setUserInfoBhv(UserInfoBhv userInfoBhv) { + this.userInfoBhv = userInfoBhv; + } + } Added: bookmark/trunk/src/main/webapp/WEB-INF/db/bookmark.1.log.db =================================================================== (Binary files differ) Property changes on: bookmark/trunk/src/main/webapp/WEB-INF/db/bookmark.1.log.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: bookmark/trunk/src/main/webapp/WEB-INF/db/bookmark.data.db =================================================================== (Binary files differ) Modified: bookmark/trunk/src/main/webapp/WEB-INF/db/bookmark.index.db =================================================================== (Binary files differ) Modified: bookmark/trunk/src/main/webapp/WEB-INF/portlet.xml =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/portlet.xml 2008-11-11 09:47:30 UTC (rev 1331) +++ bookmark/trunk/src/main/webapp/WEB-INF/portlet.xml 2008-11-11 13:35:52 UTC (rev 1332) @@ -7,7 +7,7 @@ <portlet-class>org.seasar.struts.portlet.SAStrutsPortlet</portlet-class> <init-param> <name>viewPage</name> - <value>/link/view/</value> + <value>/user/link/</value> </init-param> <expiration-cache>0</expiration-cache> <supports> Copied: bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/confirm.jsp (from rev 1326, bookmark/trunk/src/main/webapp/WEB-INF/view/category/edit/confirm.jsp) =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/confirm.jsp (rev 0) +++ bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/confirm.jsp 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,60 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> +<div class="form-table"> + <s:form> + <html:hidden property="id"/> + <html:hidden property="mode"/> + <table style="width: 500px"> + <caption><bean:message key="labels.category_info"/></caption> + <tbody> + <tr> + <th style="width: 100px;"><bean:message key="labels.category_name"/></th> + <td>${f:h(name)}<html:hidden property="name"/></td> + </tr> + <tr> + <th><bean:message key="labels.memo"/></th> + <td>${f:br(f:nbsp(f:h(memo)))}<html:hidden property="memo"/></td> + </tr> + <tr> + <th><bean:message key="labels.shared"/></th> + <td> +<c:if test="${type=='P'}"><bean:message key="labels.public"/></c:if> +<c:if test="${type=='C'}"><bean:message key="labels.personal"/></c:if> +<html:hidden property="type"/> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td colspan="2"> + <c:if test="${mode == 1}"> + <input type="submit" name="create" value="<bean:message key="labels.create"/>"/> + <input type="submit" name="editagain" value="<bean:message key="labels.back"/>"/> + </c:if> + <c:if test="${mode == 2}"> + <input type="submit" name="update" value="<bean:message key="labels.update"/>"/> + <input type="submit" name="editagain" value="<bean:message key="labels.back"/>"/> + </c:if> + <c:if test="${mode == 3}"> + <input type="submit" name="delete" value="<bean:message key="labels.delete"/>"/> + <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> + </c:if> + <c:if test="${mode == 4}"> + <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> + </c:if> + </td> + </tr> + </tfoot> + </table> + </s:form> +</div> +</div> +</body> +</html> Copied: bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/edit.jsp (from rev 1326, bookmark/trunk/src/main/webapp/WEB-INF/view/category/edit/edit.jsp) =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/edit.jsp (rev 0) +++ bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/edit.jsp 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,48 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> +<div class="form-table"> + <s:form> + <html:hidden property="id"/> + <html:hidden property="mode"/> + <table style="width: 500px"> + <caption><bean:message key="labels.category_info"/></caption> + <tbody> + <tr> + <th style="width: 100px;"><bean:message key="labels.category_name"/></th> + <td><html:text property="name" size="40"/></td> + </tr> + <tr> + <th><bean:message key="labels.memo"/></th> + <td><html:textarea property="memo" cols="40" rows="5"/></td> + </tr> + <tr> + <th><bean:message key="labels.shared"/></th> + <td> +<html:select property="type"> +<html:option value="P"><bean:message key="labels.public"/></html:option> +<html:option value="C"><bean:message key="labels.personal"/></html:option> +</html:select> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td colspan="2"> + <input type="submit" name="confirm" value="<bean:message key="labels.confirm"/>"/> + <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> + </td> + </tr> + </tfoot> + </table> + </s:form> +</div> +</div> +</body> +</html> Copied: bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/error.jsp (from rev 1325, bookmark/trunk/src/main/webapp/WEB-INF/view/category/edit/error.jsp) =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/error.jsp (rev 0) +++ bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/error.jsp 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,11 @@ +<%@page pageEncoding="UTF-8" %> +<html> +<head> +<title></title> +</head> +<body> +<html:errors/> +<br> +<s:link href="index"><bean:message key="labels.back"/></s:link> +</body> +</html> Copied: bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/index.jsp (from rev 1325, bookmark/trunk/src/main/webapp/WEB-INF/view/category/edit/index.jsp) =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/index.jsp (rev 0) +++ bookmark/trunk/src/main/webapp/WEB-INF/view/user/category/index.jsp 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,86 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> + +<div class="list-table"> +<s:link href="createpage"><bean:message key="labels.create_category"/></s:link> +| +<s:link href="/user/link/"><bean:message key="labels.link_list"/></s:link> +<table> + <thead> + <tr> + <th style="width:200px;text-align: center;"><bean:message key="labels.category_name"/></th> + <th style="width:100px;text-align: center;""><bean:message key="labels.order"/></th> + <th style="width:150px;text-align: center;"><bean:message key="labels.action"/></th> + </tr> + </thead> + <tbody> + <c:forEach var="c" varStatus="s" items="${categoryItems}"> + <tr> + <td>${f:h(c.name)}(${c.sortOrder})</td> + <td> + <table border="0" cellpadding="0" cellspacing="0" style="border: 0;"> + <tr> + <td style="width:50px;text-align: center;border: 0;"> + <c:if test="${!s.last || categoryPager.currentPageNumber!=categoryPager.allPageCount}"> + <s:link href="moveup/${f:u(c.id)}">下へ</s:link> + </c:if> + + </td> + <td style="width:50px;text-align: center;border: 0;"> + <c:if test="${!s.first || categoryPager.currentPageNumber!=1}"> + <s:link href="movedown/${f:u(c.id)}">上へ</s:link> + </c:if> + + </td> + </tr> + </table> + </td> + <td align="center"> + <s:link href="editpage/2/${f:u(c.id)}"><bean:message key="labels.edit"/></s:link> + <s:link href="deletepage/3/${f:u(c.id)}"><bean:message key="labels.delete"/></s:link> + </td> + </tr> + </c:forEach> + </tbody> +</table> +<!-- page navi --> +<div style="width: 450px;text-align: center;"> + <span> + <c:if test="${categoryPager.existPrePage}"> + <s:link href="list/${categoryPager.currentPageNumber - 1}"><bean:message key="labels.to_back"/></s:link> + </c:if> + </span> + <span> + <c:forEach var="p" varStatus="s" items="${categoryPager.pageNumberList}"> + <span> + <c:if test="${p == categoryPager.currentPageNumber}"> + ${p} + </c:if> + <c:if test="${p != categoryPager.currentPageNumber}"> + <s:link href="list/${p}">${p}</s:link> + </c:if> + </span> + </c:forEach> + </span> + <span> + <c:if test="${categoryPager.existNextPage}"> + <s:link href="list/${categoryPager.currentPageNumber + 1}"><bean:message key="labels.to_next"/></s:link> + </c:if> + </span> +</div> +<div style="width: 450px;text-align: center;"> + <span> + ${categoryPager.currentPageNumber}/${categoryPager.allPageCount} (${categoryPager.allRecordCount}) + </span> +</div> +</div> +</div> +</body> +</html> Copied: bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/confirm.jsp (from rev 1331, bookmark/trunk/src/main/webapp/WEB-INF/view/link/view/confirm.jsp) =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/confirm.jsp (rev 0) +++ bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/confirm.jsp 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,96 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> +<div style="float: left; width: 150px;" class="portlet-menu"> + <div style="padding:3px;"> + <div class="portlet-menu-caption"><bean:message key="labels.category"/></div> + <ul> + <c:forEach var="c" varStatus="s" items="${categoryItems}"> + <c:if test="${linkPager.categoryId==c.id}"> + <li class="portlet-menu-item-selected">${f:h(c.name)}</li> + </c:if> + <c:if test="${linkPager.categoryId!=c.id}"> + <li class="portlet-menu-item"><s:link href="select/${f:u(c.id)}">${f:h(c.name)}</s:link></li> + </c:if> + </c:forEach> + </ul> + </div> +</div> + +<div style="float: left;margin-left:10px;"> + <s:form> + <html:hidden property="id"/> + <html:hidden property="mode"/> + <div class="form-table"> + <table style="width: 580px;"> + <caption><bean:message key="labels.confirm_link"/></caption> + <tbody> + <tr> + <th style="width: 80px;"><bean:message key="labels.name"/></th> + <td>${f:h(name)}<html:hidden property="name"/></td> + </tr> + <tr> + <th><bean:message key="labels.URL"/></th> + <td>${f:h(url)}<html:hidden property="url"/></td> + </tr> + <tr> + <th><bean:message key="labels.memo"/></th> + <td>${f:br(f:nbsp(f:h(memo)))}<html:hidden property="memo"/></td> + </tr> + <tr> + <th><bean:message key="labels.category"/></th> + <td> +<c:forEach var="category" varStatus="s" items="${categoryItems}"> + <c:if test="${categoryId == category.id}">${f:h(category.name)}</c:if> +</c:forEach> +<html:hidden property="categoryId"/> + </td> + </tr> + <tr> + <th><bean:message key="labels.type"/></th> + <td> +<c:if test="${type=='W'}"><bean:message key="labels.open_new_window"/></c:if> +<c:if test="${type=='L'}"><bean:message key="labels.open_same_window"/></c:if> +<html:hidden property="type"/> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td colspan="2"> + <c:if test="${mode == 1}"> + <input type="submit" name="create" value="<bean:message key="labels.create"/>"/> + <input type="submit" name="editagain" value="<bean:message key="labels.back"/>"/> + </c:if> + <c:if test="${mode == 2}"> + <input type="submit" name="update" value="<bean:message key="labels.update"/>"/> + <input type="submit" name="editagain" value="<bean:message key="labels.back"/>"/> + </c:if> + <c:if test="${mode == 3}"> + <input type="submit" name="delete" value="<bean:message key="labels.delete"/>"/> + <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> + </c:if> + <c:if test="${mode == 4}"> + <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> + <c:if test="${categoryId!=2}"> + <input type="submit" name="editpage" value="<bean:message key="labels.edit"/>"/> + <input type="submit" name="deletepage" value="<bean:message key="labels.delete"/>"/> + </c:if> + </c:if> + </td> + </tr> + </tfoot> + </table> + </div> + </s:form> +</div> +</div> + +</body> +</html> Copied: bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/edit.jsp (from rev 1331, bookmark/trunk/src/main/webapp/WEB-INF/view/link/view/edit.jsp) =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/edit.jsp (rev 0) +++ bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/edit.jsp 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,81 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> +<div style="float: left; width: 150px;" class="portlet-menu"> + <div style="padding:3px;"> + <div class="portlet-menu-caption"><bean:message key="labels.category"/></div> + <ul> + <c:forEach var="c" varStatus="s" items="${categoryItems}"> + <c:if test="${linkPager.categoryId==c.id}"> + <li class="portlet-menu-item-selected">${f:h(c.name)}</li> + </c:if> + <c:if test="${linkPager.categoryId!=c.id}"> + <li class="portlet-menu-item"><s:link href="select/${f:u(c.id)}">${f:h(c.name)}</s:link></li> + </c:if> + </c:forEach> + </ul> + </div> +</div> + +<div style="float: left;margin-left:10px;"> + <s:form> + <html:hidden property="id"/> + <html:hidden property="mode"/> + <div class="form-table"> + <table style="width: 580px;"> + <caption><bean:message key="labels.create_link_2"/></caption> + <tbody> + <tr> + <th style="width: 80px;"><bean:message key="labels.name"/></th> + <td><html:text property="name" size="20"/></td> + </tr> + <tr> + <th><bean:message key="labels.URL"/></th> + <td><html:text property="url" size="50"/></td> + </tr> + <tr> + <th><bean:message key="labels.memo"/></th> + <td><html:textarea property="memo" cols="50" rows="5"/></td> + </tr> + <tr> + <th><bean:message key="labels.category"/></th> + <td> + <html:select property="categoryId"> + <c:forEach var="category" varStatus="s" items="${categoryItems}"> + <html:option value="${f:h(category.id)}">${f:h(category.name)}</html:option> + </c:forEach> + </html:select> + </td> + </tr> + <tr> + <th><bean:message key="labels.type"/></th> + <td> + <html:select property="type"> +<html:option value="W"><bean:message key="labels.open_new_window"/></html:option> +<html:option value="L"><bean:message key="labels.open_same_window"/></html:option> + </html:select> + </td> + </tr> + </tbody> + <tfoot> + <tr> + <td colspan="2"> + <input type="submit" name="confirm" value="<bean:message key="labels.confirm"/>"/> + <input type="submit" name="back" value="<bean:message key="labels.back"/>"/> + </td> + </tr> + </tfoot> + </table> + </div> + </s:form> +</div> +</div> + +</body> +</html> Copied: bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/error.jsp (from rev 1325, bookmark/trunk/src/main/webapp/WEB-INF/view/link/view/error.jsp) =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/error.jsp (rev 0) +++ bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/error.jsp 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,11 @@ +<%@page pageEncoding="UTF-8" %> +<html> +<head> +<title></title> +</head> +<body> +<html:errors/> +<br> +<s:link href="index"><bean:message key="labels.back"/></s:link> +</body> +</html> Copied: bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/index.jsp (from rev 1326, bookmark/trunk/src/main/webapp/WEB-INF/view/link/view/index.jsp) =================================================================== --- bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/index.jsp (rev 0) +++ bookmark/trunk/src/main/webapp/WEB-INF/view/user/link/index.jsp 2008-11-11 13:35:52 UTC (rev 1332) @@ -0,0 +1,104 @@ +<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<title></title> +</head> +<body> +<div style="padding:3px;"> +<div><html:messages id="msg" message="true"><bean:write name="msg" ignore="true"/></html:messages><html:errors/></div> +<div style="float: left; width: 150px;" class="portlet-menu"> + <div style="padding:3px;"> + <div class="portlet-menu-caption"><bean:message key="labels.category"/></div> + <ul> + <c:forEach var="c" varStatus="s" items="${categoryItems}"> + <c:if test="${linkPager.categoryId==c.id}"> + <li class="portlet-menu-item-selected">${f:h(c.name)}</li> + </c:if> + <c:if test="${linkPager.categoryId!=c.id}"> + <li class="portlet-menu-item"><s:link href="select/${f:u(c.id)}">${f:h(c.name)}</s:link></li> + </c:if> + </c:forEach> + </ul> + </div> +</div> + +<div style="float: left;margin-left:10px;" class="list-table"> +<div> +<s:link href="createpage"><bean:message key="labels.create_link"/></s:link> +| +<s:link href="/user/category/"><bean:message key="labels.category_list"/></s:link> +</div> +<table border="1"> + <thead> + <tr> + <th style="width:300px;text-align: center;"><bean:message key="labels.name"/></th> + <th style="width:100px;text-align: center;""><bean:message key="labels.order"/></th> + <th style="width:50px;text-align: center;"> </th> + </tr> + </thead> + <tbody> + <c:forEach var="l" varStatus="s" items="${linkItems}"> + <tr class="${s.index %2 == 0 ? 'row1' : 'row2'}"> + <td><a href="${l.url}" target="${l.type == 'W' ? '_blank' : '_self'}">${f:h(l.name)}</a></td> + <td> + <c:if test="${linkPager.categoryId!=2}"> + <table border="0" cellpadding="0" cellspacing="0" style="border: 0;"> + <tr> + <td style="width:50px;text-align: center;border: 0;"> + <c:if test="${!s.last || linkPager.currentPageNumber!=linkPager.allPageCount}"> + <s:link href="moveup/${f:u(l.id)}"><bean:message key="labels.move_down"/></s:link> + </c:if> + + </td> + <td style="width:50px;text-align: center;border: 0;"> + <c:if test="${!s.first || linkPager.currentPageNumber!=1}"> + <s:link href="movedown/${f:u(l.id)}"><bean:message key="labels.move_up"/></s:link> + </c:if> + + </td> + </tr> + </table> + </c:if> + <c:if test="${linkPager.categoryId==2}"> </c:if> + </td> + <td align="center"><s:link href="confirmpage/4/${f:u(l.id)}"><bean:message key="labels.detail"/></s:link></td> + </tr> + </c:forEach> + </tbody> +</table> +<!-- page navi --> +<div style="width: 450px;text-align: center;"> + <span> + <c:if test="${linkPager.existPrePage}"> + <s:link href="list/${linkPager.currentPageNumber - 1}"><bean:message key="labels.to_back"/></s:link> + </c:if> + </span> + <span> + <c:forEach var="p" varStatus="s" items="${linkPager.pageNumberList}"> + <span> + <c:if test="${p == linkPager.currentPageNumber}"> + ${p} + </c:if> + <c:if test="${p != linkPager.currentPageNumber}"> + <s:link href="list/${p}">${p}</s:link> + </c:if> + </span> + </c:forEach> + </span> + <span> + <c:if test="${linkPager.existNextPage}"> + <s:link href="list/${linkPager.currentPageNumber + 1}"><bean:message key="labels.to_next"/></s:link> + </c:if> + </span> +</div> +<div style="width: 450px;text-align: center;"> + <span> + ${linkPager.currentPageNumber}/${linkPager.allPageCount} (${linkPager.allRecordCount}) + </span> +</div> +</div> +</div> + +</body> +</html>