svnno****@sourc*****
svnno****@sourc*****
2007年 10月 12日 (金) 17:26:16 JST
Revision: 623 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=623 Author: shinsuke Date: 2007-10-12 17:26:15 +0900 (Fri, 12 Oct 2007) Log Message: ----------- orderNotificationId is autoincrement. Modified Paths: -------------- pompei/portlets/pompei-core/trunk/dbflute/schema/project-schema-pompei.xml pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrderNotificationBhv.java pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrderNotificationDao.java pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrderNotification.java pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrderNotificationDbm.java pompei/portlets/pompei-core/trunk/src/main/webapp/WEB-INF/db/create_table.sql -------------- next part -------------- Modified: pompei/portlets/pompei-core/trunk/dbflute/schema/project-schema-pompei.xml =================================================================== --- pompei/portlets/pompei-core/trunk/dbflute/schema/project-schema-pompei.xml 2007-10-12 07:13:39 UTC (rev 622) +++ pompei/portlets/pompei-core/trunk/dbflute/schema/project-schema-pompei.xml 2007-10-12 08:26:15 UTC (rev 623) @@ -547,10 +547,11 @@ </foreign-key> </table> <table name="ORDER_NOTIFICATION" schema="APP" type="TABLE"> + <column autoIncrement="true" dbType="INTEGER" + default="GENERATED_BY_DEFAULT" + javaType="java.math.BigDecimal" name="ORDER_NOTIFICATION_ID" + primaryKey="true" required="true" type="INTEGER"/> <column dbType="INTEGER" javaType="java.math.BigDecimal" - name="ORDER_NOTIFICATION_ID" primaryKey="true" - required="true" type="INTEGER"/> - <column dbType="INTEGER" javaType="java.math.BigDecimal" name="ORDER_STATUS_ID" required="true" type="INTEGER"/> <column dbType="VARCHAR" javaType="String" name="EMAIL_ADDRESS" size="128" type="VARCHAR"/> Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrderNotificationBhv.java =================================================================== --- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrderNotificationBhv.java 2007-10-12 07:13:39 UTC (rev 622) +++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsbhv/BsOrderNotificationBhv.java 2007-10-12 08:26:15 UTC (rev 623) @@ -40,7 +40,7 @@ * * * [identity] - * + * orderNotificationId * * [update-date] * @@ -751,6 +751,30 @@ // =================================================================================== // Various Insert // ============== + + /* (non-javadoc) + * Copy-insert. + * + * @param primaryKey Primary-keys. (NotNull) + * @return Inserted count. + * @exception jp.sf.pal.pompei.allcommon.exception.RecordHasAlreadyBeenDeletedException + */ + public int copyInsertByPKValueAfterSelect(java.math.BigDecimal orderNotificationId) { + OrderNotification entity = new OrderNotification(); + entity.setOrderNotificationId(orderNotificationId); + final OrderNotificationCB cb = newMyConditionBean(); + cb.acceptPrimaryKeyMapString(getDBMeta().extractPrimaryKeyMapString(entity)); + final OrderNotification currentEntity = selectEntityWithDeletedCheck(cb); + return delegateInsert(currentEntity); + } + + /** + * Filter 'copy-insert' entity. + * + * @param orderNotification Entity. (NotNull) + */ + protected void filterCopyInsertEntity(OrderNotification orderNotification) { + } // =================================================================================== // Hierarchy Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrderNotificationDao.java =================================================================== --- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrderNotificationDao.java 2007-10-12 07:13:39 UTC (rev 622) +++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsdao/BsOrderNotificationDao.java 2007-10-12 08:26:15 UTC (rev 623) @@ -23,7 +23,7 @@ * * * [identity] - * + * orderNotificationId * * [update-date] * Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrderNotification.java =================================================================== --- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrderNotification.java 2007-10-12 07:13:39 UTC (rev 622) +++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsentity/BsOrderNotification.java 2007-10-12 08:26:15 UTC (rev 623) @@ -26,7 +26,7 @@ * * * [identity] - * + * orderNotificationId * * [update-date] * @@ -47,6 +47,9 @@ /** TABLE-Annotation for S2Dao. The value is ORDER_NOTIFICATION. */ public static final String TABLE = "ORDER_NOTIFICATION"; + + /** ID-Annotation */ + public static final String orderNotificationId_ID = "identity"; // =================================================================================== // Attribute @@ -54,7 +57,7 @@ /** Entity modified properties. (for S2Dao) */ protected EntityModifiedProperties _modifiedProperties = newEntityModifiedProperties(); - /** The value of orderNotificationId. PK : INTEGER : NotNull */ + /** The value of orderNotificationId. PK : INC : INTEGER : NotNull : Default=[GENERATED_BY_DEFAULT] */ protected java.math.BigDecimal _orderNotificationId; /** The value of orderStatusId. INTEGER : NotNull : FK to ORDER_STATUS */ @@ -134,12 +137,12 @@ // Accessor // ======== - /** Column Annotation for S2Dao. PK : INTEGER : NotNull */ + /** Column Annotation for S2Dao. PK : INC : INTEGER : NotNull : Default=[GENERATED_BY_DEFAULT] */ public static final String orderNotificationId_COLUMN = "ORDER_NOTIFICATION_ID"; /** * Get the value of orderNotificationId. <br /> - * {PK : INTEGER : NotNull} + * {PK : INC : INTEGER : NotNull : Default=[GENERATED_BY_DEFAULT]} * * @return The value of orderNotificationId. (Nullable) */ @@ -149,7 +152,7 @@ /** * Set the value of orderNotificationId. <br /> - * {PK : INTEGER : NotNull} + * {PK : INC : INTEGER : NotNull : Default=[GENERATED_BY_DEFAULT]} * * @param orderNotificationId The value of orderNotificationId. (Nullable) */ Modified: pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrderNotificationDbm.java =================================================================== --- pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrderNotificationDbm.java 2007-10-12 07:13:39 UTC (rev 622) +++ pompei/portlets/pompei-core/trunk/src/main/java/jp/sf/pal/pompei/bsentity/dbmeta/OrderNotificationDbm.java 2007-10-12 08:26:15 UTC (rev 623) @@ -28,7 +28,7 @@ * * * [identity] - * + * orderNotificationId * * [update-date] * @@ -93,7 +93,7 @@ // ----------------------------------------------------- // Column DB-Name // -------------- - /** Db-name of ORDER_NOTIFICATION_ID. PK : INTEGER : NotNull */ + /** Db-name of ORDER_NOTIFICATION_ID. PK : INC : INTEGER : NotNull : Default=[GENERATED_BY_DEFAULT] */ public static final String DB_NAME_ORDER_NOTIFICATION_ID = "ORDER_NOTIFICATION_ID"; /** Db-name of ORDER_STATUS_ID. INTEGER : NotNull : FK to ORDER_STATUS */ public static final String DB_NAME_ORDER_STATUS_ID = "ORDER_STATUS_ID"; @@ -118,7 +118,7 @@ // ----------------------------------------------------- // Column Prop-Name(JavaBeansRule) // ------------------------------- - /** Prop-name(JavaBeansRule) of orderNotificationId. PK : INTEGER : NotNull */ + /** Prop-name(JavaBeansRule) of orderNotificationId. PK : INC : INTEGER : NotNull : Default=[GENERATED_BY_DEFAULT] */ public static final String PROPERTY_NAME_orderNotificationId = "orderNotificationId"; /** Prop-name(JavaBeansRule) of orderStatusId. INTEGER : NotNull : FK to ORDER_STATUS */ public static final String PROPERTY_NAME_orderStatusId = "orderStatusId"; @@ -132,7 +132,7 @@ // ----------------------------------------------------- // Column Cap-Prop-Name // -------------------- - /** Cap-prop-name of orderNotificationId. PK : INTEGER : NotNull */ + /** Cap-prop-name of orderNotificationId. PK : INC : INTEGER : NotNull : Default=[GENERATED_BY_DEFAULT] */ public static final String CAP_PROP_NAME_OrderNotificationId = "OrderNotificationId"; /** Cap-prop-name of orderStatusId. INTEGER : NotNull : FK to ORDER_STATUS */ public static final String CAP_PROP_NAME_OrderStatusId = "OrderStatusId"; @@ -157,7 +157,7 @@ // ----------------------------------------------------- // Column Uncap-Prop-Name // ---------------------- - /** Uncap-prop-name of orderNotificationId. PK : INTEGER : NotNull */ + /** Uncap-prop-name of orderNotificationId. PK : INC : INTEGER : NotNull : Default=[GENERATED_BY_DEFAULT] */ public static final String UNCAP_PROP_NAME_orderNotificationId = "orderNotificationId"; /** Uncap-prop-name of orderStatusId. INTEGER : NotNull : FK to ORDER_STATUS */ public static final String UNCAP_PROP_NAME_orderStatusId = "orderStatusId"; Modified: pompei/portlets/pompei-core/trunk/src/main/webapp/WEB-INF/db/create_table.sql =================================================================== --- pompei/portlets/pompei-core/trunk/src/main/webapp/WEB-INF/db/create_table.sql 2007-10-12 07:13:39 UTC (rev 622) +++ pompei/portlets/pompei-core/trunk/src/main/webapp/WEB-INF/db/create_table.sql 2007-10-12 08:26:15 UTC (rev 623) @@ -480,7 +480,7 @@ ); CREATE TABLE ORDER_NOTIFICATION ( - ORDER_NOTIFICATION_ID INTEGER NOT NULL + ORDER_NOTIFICATION_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 100, INCREMENT BY 1) , ORDER_STATUS_ID INTEGER NOT NULL , EMAIL_ADDRESS VARCHAR(128) , TEMPLATE_NAME VARCHAR(32) NOT NULL